Ios – How to stream only the sound of a video from YouTube?


I would like to stream only sound from youtube. I need this for IOS but others can be ok. I have searched on stackoverflow but I couldn't find. Because I don't want to use another software, I want to directly stream only sound of youtube video by code. Also It should work on background.

Best Solution

Flashgot (for Firefox) has a way to download only the audio of a Youtube video. It exposes links to the audio that looks like this:,dur,expire,gcr,gir,id,ip,ipbits,itag,lmt,mime,mm,ms,mv,ratebypass,requiressl,source&cmbypass=yes&req_id=3eb2c618c54ca3ee&redirect_counter=2&cms_redirect=yes&mm=26&ms=tsu&mt=1419909012&mv=m

OK, so that is a very big link. This is the same link dissected into pieces:
&mime=audio/mp4 #Here's where audio only is specified.
&ip= #Oh, look. My IP address.

Very interesting. This enables Flashgot to download only the audio and skip the video, thus saving bandwidth. I'm missing details, like how Flashgot created this link, but if Flashgot has a way to do it, it stands to reason that other HTTP clients could do it too.