Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP error 403 Forbidden on Youtube Live Stream #1407

Closed
superxuxin opened this issue Sep 11, 2013 · 5 comments
Closed

HTTP error 403 Forbidden on Youtube Live Stream #1407

superxuxin opened this issue Sep 11, 2013 · 5 comments
Labels
bug

Comments

@superxuxin
Copy link

@superxuxin superxuxin commented Sep 11, 2013

Thank you so much if anyone can help!

./youtube-dl -v "http://www.youtube.com/watch?v=rdcvn4W-6xM"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.youtube.com/watch?v=rdcvn4W-6xM']
[debug] youtube-dl version 2013.09.10
[debug] Python version 2.7.2 - Darwin-12.4.0-x86_64-i386-64bit
[debug] Proxy map: {}
[youtube] Setting language
[youtube] rdcvn4W-6xM: Downloading video webpage
[youtube] rdcvn4W-6xM: Downloading video info webpage
[youtube] rdcvn4W-6xM: Extracting video information
[youtube] rdcvn4W-6xM: Downloading formats manifest
[download] Destination: Table Tennis - Men Team Finals & VC - London 2012 Olympic Games-rdcvn4W-6xM.mp4
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 10 2013 15:22:59 with Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[http @ 0x7fbd72250400] HTTP error 403 Forbidden
Unable to open key file http://www.youtube.com/api/drm/hlskey?id=add72f9f85beeb13&itag=96&source=youtube&ratebypass=yes&pfa=1&pbr=yes&hls_chunk_host=www.youtube.com&gir=yes&clen=5547517760&lmt=1347749241948586&dur=8870.400&cp=U0hWTVhUU19NU0NONl9QTldIOnNZMW4xTDgxaFRa&playlist_type=DVR&maudio=1&pmbypass=yes&upn=FAVTiUAHwBs&fexp=935203,932247,916807,935010,916624,924606,929117,929121,929906,929907,929922,929127,929129,929131,929930,936403,925726,936310,925720,925722,925718,925714,929917,906945,929933,920302,906842,927704,913428,919811,913563,919373,930803,938701,931924,940501,936308,909549,900816,912711,904494,904497,939903,935012,900375,900382,934507,907231,936312,906001&sver=3&ip=128.138.43.238&ipbits=8&expire=1378895789&sparams=ip,ipbits,expire,id,itag,source,ratebypass,pfa,pbr,hls_chunk_host,gir,clen,lmt,dur,cp,playlist_type,maudio,pmbypass&signature=2F6F9F6E907B4DE46AFA7B2F7263866D0C166F7B.2E1CF42BD6C49CD8AEBBEBEB6EC9F50B1CB5ECAF&key=dg_yt0&ek=00d1d2078d07e911274516317c3229cce139c648113fc4167a59e8a6
[hls,applehttp @ 0x7fbd72006600] Error when loading first segment 'http://www.youtube.com/videoplayback/id/add72f9f85beeb13/itag/96/source/youtube/range/0-1606463/file/seg.ts?ratebypass=yes&pfa=1&pbr=yes&hls_chunk_host=www.youtube.com&gir=yes&clen=5547517760&lmt=1347749241948586&dur=8870.400&cp=U0hWTVhUU19NU0NONl9QTldIOnNZMW4xTDgxaFRa&playlist_type=DVR&maudio=1&pmbypass=yes&upn=FAVTiUAHwBs&fexp=935203,932247,916807,935010,916624,924606,929117,929121,929906,929907,929922,929127,929129,929131,929930,936403,925726,936310,925720,925722,925718,925714,929917,906945,929933,920302,906842,927704,913428,919811,913563,919373,930803,938701,931924,940501,936308,909549,900816,912711,904494,904497,939903,935012,900375,900382,934507,907231,936312,906001&sver=3&ip=128.138.43.238&ipbits=8&expire=1378895789&sparams=ip,ipbits,expire,id,itag,source,ratebypass,pfa,pbr,hls_chunk_host,gir,clen,lmt,dur,cp,playlist_type,maudio,pmbypass&signature=2F6F9F6E907B4DE46AFA7B2F7263866D0C166F7B.2E1CF42BD6C49CD8AEBBEBEB6EC9F50B1CB5ECAF&key=dg_yt0'
http://www.youtube.com/api/manifest/hls_playlist/id/add72f9f85beeb13/itag/96/source/youtube/ratebypass/yes/pfa/1/pbr/yes/hls_chunk_host/www.youtube.com/gir/yes/clen/5547517760/lmt/1347749241948586/dur/8870.400/cp/U0hWTVhUU19NU0NONl9QTldIOnNZMW4xTDgxaFRa/playlist_type/DVR/maudio/1/pmbypass/yes/upn/FAVTiUAHwBs/fexp/935203,932247,916807,935010,916624,924606,929117,929121,929906,929907,929922,929127,929129,929131,929930,936403,925726,936310,925720,925722,925718,925714,929917,906945,929933,920302,906842,927704,913428,919811,913563,919373,930803,938701,931924,940501,936308,909549,900816,912711,904494,904497,939903,935012,900375,900382,934507,907231,936312,906001/sver/3/ip/128.138.43.238/ipbits/8/expire/1378895789/sparams/ip,ipbits,expire,id,itag,source,ratebypass,pfa,pbr,hls_chunk_host,gir,clen,lmt,dur,cp,playlist_type,maudio,pmbypass/signature/2F6F9F6E907B4DE46AFA7B2F7263866D0C166F7B.2E1CF42BD6C49CD8AEBBEBEB6EC9F50B1CB5ECAF/key/dg_yt0/file/index.m3u8: Invalid data found when processing input

ERROR: ffmpeg exited with code 1
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "./youtube-dl/main.py", line 18, in
youtube_dl.main()
File "./youtube-dl/youtube_dl/init.py", line 667, in main
_real_main(argv)
File "./youtube-dl/youtube_dl/init.py", line 651, in _real_main
retcode = ydl.download(all_urls)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 573, in download
videos = self.extract_info(url)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 339, in extract_info
return self.process_ie_result(ie_result, download=download)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 422, in process_ie_result
for r in ie_result['entries']
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 369, in process_ie_result
self.process_info(ie_result)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 548, in process_info
success = self.fd._do_download(filename, info_dict)
File "./youtube-dl/youtube_dl/FileDownloader.py", line 398, in _do_download
return self._download_m3u8_with_ffmpeg(filename, url)
File "./youtube-dl/youtube_dl/FileDownloader.py", line 368, in _download_m3u8_with_ffmpeg
self.report_error(u'ffmpeg exited with code %d' % retval)
File "./youtube-dl/youtube_dl/FileDownloader.py", line 148, in report_error
self.ydl.report_error(_args, *_kargs)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 217, in report_error
self.trouble(error_message, tb)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 184, in trouble
tb_data = traceback.format_list(traceback.extract_stack())

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 11, 2013

Thanks for reporting. it seems to be a problem with ffmpeg, in my case it tries to download the key from
http://www.youtube.com/api/drm/hlskey?id=add72f9f85beeb13&itag=92&source=youtube&ratebypass=yes&pfa=1&pbr=yes&hls_chunk_host=www.youtube.com&gir=yes&clen=383251744&lmt=1347659248675282&dur=8870.400&pmbypass=yes&maudio=1&cp=U0hWTVlMUV9NU0NONl9RRlVIOjNDVUZQMGZFTjFE&playlist_type=DVR&upn=sy6VOh12e-A&sver=3&fexp=939800,912302,920604,932245,935011,916623,936204,924606,929117,929121,929906,929907,929922,929127,929129,929131,929930,936403,925726,936310,925720,925722,925718,925714,929917,906945,929933,920302,906842,913428,920605,919811,913563,919373,930803,938701,931924,936308,909549,900816,912711,904494,904497,939903,900375,900382,934507,907231,936312,906001&ip={MYIP}&ipbits=8&expire=1378913789&sparams=ip,ipbits,expire,id,itag,source,ratebypass,pfa,pbr,hls_chunk_host,gir,clen,lmt,dur,pmbypass,maudio,cp,playlist_type&signature=6A41D205C2ADAEA78B74EFC7CF2AED739B2E8D58.087EDD20FF0D1777BD2140F774150795BAB96D6E&key=dg_yt0&ek=00d1d2078d570d326f6ea9ca989863db6e59a8105cc263d2200f30b9e1

The actual url for the key is longer than that:
http://www.youtube.com/api/drm/hlskey?id=add72f9f85beeb13&itag=92&source=youtube&ratebypass=yes&pfa=1&pbr=yes&hls_chunk_host=www.youtube.com&gir=yes&clen=383251744&lmt=1347659248675282&dur=8870.400&pmbypass=yes&maudio=1&cp=U0hWTVlMUV9NU0NONl9RRlVIOjNDVUZQMGZFTjFE&playlist_type=DVR&upn=sy6VOh12e-A&sver=3&fexp=939800,912302,920604,932245,935011,916623,936204,924606,929117,929121,929906,929907,929922,929127,929129,929131,929930,936403,925726,936310,925720,925722,925718,925714,929917,906945,929933,920302,906842,913428,920605,919811,913563,919373,930803,938701,931924,936308,909549,900816,912711,904494,904497,939903,900375,900382,934507,907231,936312,906001&ip={MYIP}&ipbits=8&expire=1378913789&sparams=ip,ipbits,expire,id,itag,source,ratebypass,pfa,pbr,hls_chunk_host,gir,clen,lmt,dur,pmbypass,maudio,cp,playlist_type&signature=6A41D205C2ADAEA78B74EFC7CF2AED739B2E8D58.087EDD20FF0D1777BD2140F774150795BAB96D6E&key=dg_yt0&ek=00d1d2078d570d326f6ea9ca989863db6e59a8105cc263d2200f30b9e10ab45c256c152d41e23bc6322dc513e86f71c3c0536401b90c45dd09f885f9f97d6ebb184c0305bbafcf2598

@superxuxin
Copy link
Author

@superxuxin superxuxin commented Sep 12, 2013

Thanks for looking into this. Hope there will be a fix.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 21, 2013

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 21, 2013

They have fixed it in the git repo, you'll have to install from it.

@jaimeMF jaimeMF closed this Sep 21, 2013
@poornerd
Copy link

@poornerd poornerd commented Nov 22, 2018

which branch fixed this? I want to see the code...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.