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

Can't download embedded video #5703

Closed
Llorx opened this issue May 14, 2015 · 3 comments
Closed

Can't download embedded video #5703

Llorx opened this issue May 14, 2015 · 3 comments
Labels

Comments

@Llorx
Copy link

@Llorx Llorx commented May 14, 2015

This last weekend I recorded some Live events. YouTube has a problem where not saved them like other events, and entering the link wont show the live event but an "event has ended" message: https://www.youtube.com/watch?v=CsmdDsKjzN8

The thing is that the embed link works: https://www.youtube.com/embed/CsmdDsKjzN8 so I thought that is time to download the video to not lose it, just in case YouTUbe definetely deletes it.

The problem comes here. I can't download the vídeo altough it can be watched with the embed code, so I suggest to add a second system to download videos where it uses the same method as the YT embed code instead of the YT main one.

I mean, if the main method fails, use this second method. The first method gives error 400.

I put log files of what I get when downloading:

youtube-dl https://www.youtube.com/embed/CsmdDsKjzN8 -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'https://www.youtube.com/embed/CsmdDsKjzN8', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.10
[debug] Python version 2.6.9 - Linux-3.14.35-28.38.amzn1.x86_64-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg git-2015-03-18-f832374, ffprobe git-2015-03-18-f832374, rtmpdump 2.3
[debug] Proxy map: {}
[youtube] CsmdDsKjzN8: Downloading webpage
[youtube] CsmdDsKjzN8: Downloading video info webpage
[youtube] CsmdDsKjzN8: Extracting video information
[youtube] CsmdDsKjzN8: Downloading formats manifest
[youtube] CsmdDsKjzN8: Downloading DASH manifest
[debug] Invoking downloader on 'https://r10---sn-5hn7sned.googlevideo.com/videoplayback/id/CsmdDsKjzN8.1/itag/135/source/yt_live_broadcast/requiressl/yes/pmbypass/yes/gcr/de/playlist_type/CLEAN/ratebypass/yes/cmbypass/yes/mime/video%2Fmp4/live/1/gir/yes/fexp/900220,9407117,9407712,9407898,9407991,9408142,9408594,9408706,9408710,9408868,9412906,9413011,9413341,945137,948124,952612,952637,952642/upn/GLlyGW8FK0o/sver/3/key/cms1/signature/43A5B1735789821A2A90F2B225831383AC5A561E.31DA0E4D92BFB481EC2EC6A9BAA12399EC5CD330/ip/52.28.90.107/ipbits/0/expire/1431652818/sparams/cmbypass,expire,gcr,gir,id,ip,ipbits,itag,live,mime,mm,mn,ms,mv,pl,playlist_type,pmbypass,ratebypass,requiressl,source/mm/32/mn/sn-5hn7sned/ms/lv/mt/1431630987/mv/u/pl/20'
ERROR: unable to download video data: HTTP Error 400: Bad Request
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1411, in process_info
partial_success = dl(fname, new_info)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1359, in dl
return fd.download(name, info)
File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 342, in download
return self.real_download(filename, info_dict)
File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 59, in real_download
data = self.ydl.urlopen(request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1710, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib64/python2.6/urllib2.py", line 397, in open
response = meth(req, response)
File "/usr/lib64/python2.6/urllib2.py", line 510, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.6/urllib2.py", line 435, in error
return self._call_chain(_args)
File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
result = func(_args)
File "/usr/lib64/python2.6/urllib2.py", line 518, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request

@yan12125 yan12125 added the broken-IE label May 17, 2015
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 17, 2015

@Llorx It's indeed a youtub-dl bug. Try -f best as a temporary workaround. For example:

youtube-dl -f best "https://www.youtube.com/embed/CsmdDsKjzN8" -v

For developers: The DASH manifest of this video uses SegmentURL element, which is not supported by youtube-dl yet.

@Llorx
Copy link
Author

@Llorx Llorx commented May 17, 2015

Perfect! It works!! Thank you :-)

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 20, 2015

Fixed by #5886, will work in the next version.

@jaimeMF jaimeMF closed this Jul 20, 2015
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.