Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
I have been trying to play videos using links extracted using the youtube-dl -g -x -f... command and only a few of them actually play.
I am however able to download the file if i use the youtube-dl [video-url] command.
Here is the output when using the --verbose flag
youtube-dl -g -x -f 140 https://www.youtube.com/watch?v=oC-GflRB0y4 --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-g', u'-x', u'-f', u'140', u'https://www.youtube.com/watch?v=oC-GflRB0y4', u'--verbose']
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2016.01.23
[debug] Python version 2.7.9 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.2
[debug] exe versions: ffmpeg 2.6.5, ffprobe 2.6.5
[debug] Proxy map: {}
https://r7---sn-25ge7n7r.googlevideo.com/videoplayback?id=a02f867e5441d32e&itag=140&source=youtube&requiressl=yes&nh=IgpwcjAxLnBhcjEwKgkxMjcuMC4wLjE&pl=26&mn=sn-25ge7n7r&mm=31&ms=au&mv=u&ratebypass=yes&mime=audio/mp4&gir=yes&clen=2740957&lmt=1417334863913776&dur=170.689&fexp=9416126,9416674,9420452,9422596,9422970,9423292,9423662,9424115,9425281,9425741,9426338,9426471,9426538,9427536,9427597&upn=0XDzhvx8DP4&key=dg_yt0&signature=4EF3F4197DCA29ABE452DB0F8414D1A9FC46C8E0.4FC12D9001D6AD6DE89CC14FE8F48B2412B8FF05&sver=3&mt=1453728175&ip=159.8.85.168&ipbits=0&expire=1453749825&sparams=ip,ipbits,expire,id,itag,source,requiressl,nh,pl,mn,mm,ms,mv,ratebypass,mime,gir,clen,lmt,dur
and the output when i try to download the same file:
youtube-dl -x -f 140 https://www.youtube.com/watch?v=YqeW9_5kURI --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-x', u'-f', u'140', u'https://www.youtube.com/watch?v=YqeW9_5kURI', u'--verbose']
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2016.01.23
[debug] Python version 2.7.9 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.2
[debug] exe versions: ffmpeg 2.6.5, ffprobe 2.6.5
[debug] Proxy map: {}
[youtube] YqeW9_5kURI: Downloading webpage
[youtube] YqeW9_5kURI: Downloading video info webpage
[youtube] YqeW9_5kURI: Extracting video information
[youtube] {22} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {43} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {18} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {5} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {36} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {17} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {137} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {136} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {135} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {134} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {133} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {160} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {140} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {171} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {249} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {250} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] {251} signature length 44.41, html5 player en_US-vfl0zK-iw
[youtube] YqeW9_5kURI: Downloading DASH manifest
[debug] Invoking downloader on u'https://r19---sn-25ge7nek.googlevideo.com/videoplayback?id=62a796f7fe645112&itag=140&source=youtube&requiressl=yes&mn=sn-25ge7nek&gcr=gb&mm=31&ms=au&nh=IgpwcjAxLnBhcjEwKgkxMjcuMC4wLjE&pl=26&mv=u&ratebypass=yes&mime=audio/mp4&gir=yes&clen=2873201&lmt=1427313829324648&dur=178.932&mt=1453728175&fexp=9406984,9416126,9420452,9422596,9423662&upn=zMee2KFJ4Z4&sver=3&key=dg_yt0&signature=088517CA0008C23AF464672DD9E4573E57401E3C.26920C928833F63CA2529F819CCEB97FF1EF849D&ip=159.8.85.168&ipbits=0&expire=1453750129&sparams=ip,ipbits,expire,id,itag,source,requiressl,mn,gcr,mm,ms,nh,pl,mv,ratebypass,mime,gir,clen,lmt,dur'
[download] Major Lazer & DJ Snake - Lean On (feat. M) (Official Music Video)-YqeW9_5kURI.m4a has already been downloaded
[download] 100% of 2.72MiB
[ffmpeg] Correcting container in "Major Lazer & DJ Snake - Lean On (feat. M) (Official Music Video)-YqeW9_5kURI.m4a"
[debug] ffmpeg command line: ffmpeg -y -i 'file:Major Lazer & DJ Snake - Lean On (feat. M) (Official Music Video)-YqeW9_5kURI.m4a' -c copy -f mp4 'file:Major Lazer & DJ Snake - Lean On (feat. M) (Official Music Video)-YqeW9_5kURI.temp.m4a'
[debug] ffmpeg command line: ffprobe -show_streams 'file:Major Lazer & DJ Snake - Lean On (feat. M) (Official Music Video)-YqeW9_5kURI.m4a'
[ffmpeg] Post-process file Major Lazer & DJ Snake - Lean On (feat. M) (Official Music Video)-YqeW9_5kURI.m4a exists, skipping
So why does extracted audio link forbidden but the file is itself downloadable? Please assist.