-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
support download of webm videos from Youtube #115
Comments
It is impossible to detect it, because it is based on cookie in each browser. However some kind of flag to try first downloading webm (by setting cookie and extracting nacassary information from webpage) would be very useful. Somet time ago a Debian's youtube-dl version, was downloading webm and actually was trying it as first format. |
Perhaps a patch may be in order then. I can take a look at implementing |
WebM used be format codes 43 and 45. I think WebM downloading w/ youtube-dl stopped working when YouTube cut off access to format selection via format code (Dec 2010)? |
I have found the links to the WebM downloads as they are currently Apparently, it is possible to add "&html5=true" to the end of the Youtube's code to play a WebM video currently looks something like this: {Snip...} Note that / marks are escaped with \ characters, and & is written as |
I have a little more info about the link tail that makes Youtube output |
Looking at the video info URL that is requested by youtube-dl, I have found that adding "&html5=1" to the end returns an additional section called "html5_fmt_map" that lists the available WebM formats and also repeats the available mp4 formats. However, "fmt_url_map" is still needed to get the available flv formats. Changing the line in youtube-dl that says
to
will fetch the video info with all available formats. The immediate problem is that "html5_fmt_map" has extra options such as "Quality", "type" and "codecs," and includes plus signs, so it needs to be parsed differently. All attempts so far to add "html5_fmt_map" to the code with the intention to fallback to "fmt_url_map" to get the available flv formats have failed. I'll paste in the video info returned by the URL originally requested by youtube-dl for a video I uploaded, and underneath it I'll paste in the info returned from the same URL with "&html5=1" added. Perhaps someone else can help me wade through all the punctuation and URL encoding and properly parse the data. Thanks for any help anyone can provide. Video info URL: http://www.youtube.com/get_video_info?&video_id=gKPC2Kx07s8&ps=default&eurl=&gl=US&hl=en Video info URL: http://www.youtube.com/get_video_info?&video_id=gKPC2Kx07s8&ps=default&eurl=&gl=US&hl=en&html5=1 |
youtube-dl downloads webm videos by default now unless ultra high-quality mp4 videos are available. Set |
Youtube's html5 player is still quite new and experimental, but an opt-in trial is available. Is there a way to detect whether or not I have opted in to the html5 trial so that I can use youtube-dl to download videos in the webm format?
The text was updated successfully, but these errors were encountered: