Closed ghost closed 13 years ago
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 this functionality and submitting a patch, but this will depend largely on how long it will be before HTML5 becomes the default on browsers that support it. If the opt-in trial is to continue for several months or more, it makes sense to patch the code to set the cookie. However, if Google intends to make it the default soon, say within the next month or two, it would likely make more sense to update the code once HTML5 is fully implemented.
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 presented on Youtube, and it seems possible to select the HTML5 version of the page without having to set a cookie.
Apparently, it is possible to add "&html5=true" to the end of the Youtube link to be downloaded, and it should have the same effect as setting the cookie. I can't seem to make youtube-dl see the WebM formats by doing this, but there may be some kind of Javascript to attempt to detect a supported browser, in which case, a workaround should be possible.
Youtube's code to play a WebM video currently looks something like this:
{Snip...}
"html5_fmt_map": [{"url":
"http:\/\/v17.lscache1.c.youtube.com\/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hPTFBTUl9FSkNOOV9ITVZF\u0026fexp=904418%2C904510%2C913502%2C907301\u0026itag=43\u0026ipbits=0\u0026signature=CC2E28AADD32CE68622F073CE62D520C7D86DC4E.8F88A126936DDF08C17EA02D40B7012EFCD58138\u0026sver=3\u0026ratebypass=yes\u0026expire=1307084400\u0026key=yt1\u0026ip=0.0.0.0\u0026id=80a3c2d8ac74eecf",
"type": "video\/webm; codecs=\"vp8.0, vorbis\"", "quality": "medium",
"itag": 43}, {"url":
"http:\/\/v18.lscache3.c.youtube.com\/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hPTFBTUl9FSkNOOV9ITVZF\u0026fexp=904418%2C904510%2C913502%2C907301\u0026itag=45\u0026ipbits=0\u0026signature=286777096546CECCBF3CAA6178C7C099FC3960E6.93B74D264FD0A55BEDEBF5176B753FDE015AECA9\u0026sver=3\u0026ratebypass=yes\u0026expire=1307084400\u0026key=yt1\u0026ip=0.0.0.0\u0026id=80a3c2d8ac74eecf",
"type": "video\/webm; codecs=\"vp8.0, vorbis\"", "quality": "hd720",
"itag": 45}
{Snip...}
Note that / marks are escaped with \ characters, and & is written as \u0026, so in order to paste one of those links into my browser, I had to search and replace those items. I'm also not sure how the 1080p format is coded, since I just used my own 720p video for this code snippit, but if 1080p is available, it should be in that code as well. Hope this helps. ~Kyle
I have a little more info about the link tail that makes Youtube output HTML5 without a cookie. In my previous post, I said that I had read that you can add "&html5=true" to the end of the link and get the WebM code. Unfortunately, this is slightly incorrect. The correct parameter to add is "&html5=1." This works using wget and gedit for now, but I still can't get youtube-dl to see the WebM files using this method, even if I use the --all-formats switch. It probably has to do with the fact that Youtube-dl currently doesn't look for the html5_fmt_map links, which appear to be in a separate part of the file from the Flash player links. I'll give the code a look and see what I can do with it. I may be able to submit a patch to make it work. ~Kyle
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
video_info_url = ('http://www.youtube.com/get_video_info?&video_id=%s%s&ps=default&eurl=&gl=US&hl=en'
to
video_info_url = ('http://www.youtube.com/get_video_info?&video_id=%s%s&ps=default&eurl=&gl=US&hl=en&html5=1'
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
status=ok&fexp=903931%2C907040%2C901602&watermark=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswf%2Flogo-vfl_bP6ud.swf%2Chttp%3A%2F%2Fs.ytimg.com%2Fyt%2Fswf%2Fhdlogo-vfloR6wva.swf×tamp=1307365282&has_cc=False&allow_embed=1&fmt_stream_map=22%7Chttp%3A%2F%2Fv11.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D903931%252C907040%252C901602%26itag%3D22%26ipbits%3D8%26signature%3DB0EB5F000C5FA6E9C3BAD0997ADE807EEBB3EC9E.6A58B0E7462472CDACABBA98B20BBC33AA04AB5E%26sver%3D3%26ratebypass%3Dyes%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26id%3D80a3c2d8ac74eecf%7C%7Ctc.v11.cache1.c.youtube.com%2C35%7Chttp%3A%2F%2Fv6.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D903931%252C907040%252C901602%26algorithm%3Dthrottle-factor%26itag%3D35%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D4270F4C6FF5E30182B30CDFF6ABC498DF6108F40.8FAFD09E0CC139711058A444611816396A25A7D2%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%7C%7Ctc.v6.cache1.c.youtube.com%2C34%7Chttp%3A%2F%2Fv3.lscache3.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D903931%252C907040%252C901602%26algorithm%3Dthrottle-factor%26itag%3D34%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D8C213CD3AAB650AE95F07868C495D1A0F9D131D8.5145858B8973CEA63D4D6C3D8522C4317FF6E933%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%7C%7Ctc.v3.cache3.c.youtube.com%2C18%7Chttp%3A%2F%2Fv21.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D903931%252C907040%252C901602%26algorithm%3Dthrottle-factor%26itag%3D18%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3DAA436B6D35D3B0C63F6F1E0BC6D2DC2B80F3FFC4.38E668048E31CE48C6D8F8CE4C1A23840D18A093%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%7C%7Ctc.v21.cache1.c.youtube.com%2C5%7Chttp%3A%2F%2Fv6.lscache5.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D903931%252C907040%252C901602%26algorithm%3Dthrottle-factor%26itag%3D5%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D97AAD7442B42201401493AB3943259E2B5149A7E.94D6F4C7FCC52D5D3A94488049204F1932A68A72%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%7C%7Ctc.v6.cache5.c.youtube.com&fmt_url_map=22%7Chttp%3A%2F%2Fv11.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D903931%252C907040%252C901602%26itag%3D22%26ipbits%3D8%26signature%3DB0EB5F000C5FA6E9C3BAD0997ADE807EEBB3EC9E.6A58B0E7462472CDACABBA98B20BBC33AA04AB5E%26sver%3D3%26ratebypass%3Dyes%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26id%3D80a3c2d8ac74eecf%2C35%7Chttp%3A%2F%2Fv6.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D903931%252C907040%252C901602%26algorithm%3Dthrottle-factor%26itag%3D35%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D4270F4C6FF5E30182B30CDFF6ABC498DF6108F40.8FAFD09E0CC139711058A444611816396A25A7D2%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%2C34%7Chttp%3A%2F%2Fv3.lscache3.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D903931%252C907040%252C901602%26algorithm%3Dthrottle-factor%26itag%3D34%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D8C213CD3AAB650AE95F07868C495D1A0F9D131D8.5145858B8973CEA63D4D6C3D8522C4317FF6E933%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%2C18%7Chttp%3A%2F%2Fv21.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D903931%252C907040%252C901602%26algorithm%3Dthrottle-factor%26itag%3D18%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3DAA436B6D35D3B0C63F6F1E0BC6D2DC2B80F3FFC4.38E668048E31CE48C6D8F8CE4C1A23840D18A093%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%2C5%7Chttp%3A%2F%2Fv6.lscache5.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D903931%252C907040%252C901602%26algorithm%3Dthrottle-factor%26itag%3D5%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D97AAD7442B42201401493AB3943259E2B5149A7E.94D6F4C7FCC52D5D3A94488049204F1932A68A72%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf&leanback_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fleanback_module-vflM9bCNe.swf&allow_ratings=1&tmi=1&keywords=God%2CJesus%2CHoly+Spirit%2CChurch%2CChristian%2Cworship%2Cmusic&track_embed=1&view_count=743&endscreen_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fendscreen-vfljMItjz.swf&fmt_list=22%2F1280x720%2F9%2F0%2F115%2C35%2F854x480%2F9%2F0%2F115%2C34%2F640x360%2F9%2F0%2F115%2C18%2F640x360%2F9%2F0%2F115%2C5%2F320x240%2F7%2F0%2F0&author=kylelives4jesus&muted=0&avg_rating=0.0&video_id=gKPC2Kx07s8&length_seconds=363&fmt_map=22%2F1280x720%2F9%2F0%2F115%2C35%2F854x480%2F9%2F0%2F115%2C34%2F640x360%2F9%2F0%2F115%2C18%2F640x360%2F9%2F0%2F115%2C5%2F320x240%2F7%2F0%2F0&vq=auto&token=vjVQa1PpcFOhEcczYbZRVx6uZ2Ecm39uMSm5ehBJvdA%3D&thumbnail_url=http%3A%2F%2Fi4.ytimg.com%2Fvi%2FgKPC2Kx07s8%2Fdefault.jpg&plid=AASlCrNHKUVmbG6n&title=Revival+Fire+Fall&ftoken=
Video info URL: http://www.youtube.com/get_video_info?&video_id=gKPC2Kx07s8&ps=default&eurl=&gl=US&hl=en&html5=1
status=ok&fexp=905236%2C907040&watermark=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswf%2Flogo-vfl_bP6ud.swf%2Chttp%3A%2F%2Fs.ytimg.com%2Fyt%2Fswf%2Fhdlogo-vfloR6wva.swf×tamp=1307366133&has_cc=False&allow_embed=1&fmt_stream_map=22%7Chttp%3A%2F%2Fv11.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D905236%252C907040%26itag%3D22%26ipbits%3D8%26signature%3DB0EB5F000C5FA6E9C3BAD0997ADE807EEBB3EC9E.6A58B0E7462472CDACABBA98B20BBC33AA04AB5E%26sver%3D3%26ratebypass%3Dyes%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26id%3D80a3c2d8ac74eecf%7C%7Ctc.v11.cache1.c.youtube.com%2C35%7Chttp%3A%2F%2Fv6.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D905236%252C907040%26algorithm%3Dthrottle-factor%26itag%3D35%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D4270F4C6FF5E30182B30CDFF6ABC498DF6108F40.8FAFD09E0CC139711058A444611816396A25A7D2%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%7C%7Ctc.v6.cache1.c.youtube.com%2C34%7Chttp%3A%2F%2Fv3.lscache3.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D905236%252C907040%26algorithm%3Dthrottle-factor%26itag%3D34%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D8C213CD3AAB650AE95F07868C495D1A0F9D131D8.5145858B8973CEA63D4D6C3D8522C4317FF6E933%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%7C%7Ctc.v3.cache3.c.youtube.com%2C18%7Chttp%3A%2F%2Fv21.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D905236%252C907040%26algorithm%3Dthrottle-factor%26itag%3D18%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3DAA436B6D35D3B0C63F6F1E0BC6D2DC2B80F3FFC4.38E668048E31CE48C6D8F8CE4C1A23840D18A093%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%7C%7Ctc.v21.cache1.c.youtube.com%2C5%7Chttp%3A%2F%2Fv6.lscache5.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D905236%252C907040%26algorithm%3Dthrottle-factor%26itag%3D5%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D97AAD7442B42201401493AB3943259E2B5149A7E.94D6F4C7FCC52D5D3A94488049204F1932A68A72%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%7C%7Ctc.v6.cache5.c.youtube.com&fmt_url_map=22%7Chttp%3A%2F%2Fv11.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D905236%252C907040%26itag%3D22%26ipbits%3D8%26signature%3DB0EB5F000C5FA6E9C3BAD0997ADE807EEBB3EC9E.6A58B0E7462472CDACABBA98B20BBC33AA04AB5E%26sver%3D3%26ratebypass%3Dyes%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26id%3D80a3c2d8ac74eecf%2C35%7Chttp%3A%2F%2Fv6.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D905236%252C907040%26algorithm%3Dthrottle-factor%26itag%3D35%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D4270F4C6FF5E30182B30CDFF6ABC498DF6108F40.8FAFD09E0CC139711058A444611816396A25A7D2%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%2C34%7Chttp%3A%2F%2Fv3.lscache3.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D905236%252C907040%26algorithm%3Dthrottle-factor%26itag%3D34%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D8C213CD3AAB650AE95F07868C495D1A0F9D131D8.5145858B8973CEA63D4D6C3D8522C4317FF6E933%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%2C18%7Chttp%3A%2F%2Fv21.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D905236%252C907040%26algorithm%3Dthrottle-factor%26itag%3D18%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3DAA436B6D35D3B0C63F6F1E0BC6D2DC2B80F3FFC4.38E668048E31CE48C6D8F8CE4C1A23840D18A093%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf%2C5%7Chttp%3A%2F%2Fv6.lscache5.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D905236%252C907040%26algorithm%3Dthrottle-factor%26itag%3D5%26ipbits%3D8%26burst%3D40%26sver%3D3%26signature%3D97AAD7442B42201401493AB3943259E2B5149A7E.94D6F4C7FCC52D5D3A94488049204F1932A68A72%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26factor%3D1.25%26id%3D80a3c2d8ac74eecf&leanback_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fleanback_module-vflM9bCNe.swf&allow_ratings=1&tmi=1&keywords=God%2CJesus%2CHoly+Spirit%2CChurch%2CChristian%2Cworship%2Cmusic&track_embed=1&html5_fmt_map=%5B%7B%27url%27%3A+%27http%3A%2F%2Fv17.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D905236%252C907040%26itag%3D43%26ipbits%3D8%26signature%3DA0ECBE5F762051F851905FE316734A08D764867A.90A361D023BED40970D8AA0218346D7197C56E7C%26sver%3D3%26ratebypass%3Dyes%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26id%3D80a3c2d8ac74eecf%27%2C+%27quality%27%3A+%27medium%27%2C+%27type%27%3A+%27video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22%27%2C+%27itag%27%3A+43%7D%2C+%7B%27url%27%3A+%27http%3A%2F%2Fv3.lscache3.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D905236%252C907040%26itag%3D44%26ipbits%3D8%26signature%3D55F3EEBAFD9670E6E3FBBE65D64802B4AB4AE9CA.D7B0E309BF888B41A2CE50BD361CC888EE4C3692%26sver%3D3%26ratebypass%3Dyes%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26id%3D80a3c2d8ac74eecf%27%2C+%27quality%27%3A+%27large%27%2C+%27type%27%3A+%27video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22%27%2C+%27itag%27%3A+44%7D%2C+%7B%27url%27%3A+%27http%3A%2F%2Fv18.lscache3.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D905236%252C907040%26itag%3D45%26ipbits%3D8%26signature%3D58F496BC4DB427F2B5E4389982D8F1DA27583F7B.6E781B00449D96CAF4B4CFC9EF732A91F19C1AE6%26sver%3D3%26ratebypass%3Dyes%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26id%3D80a3c2d8ac74eecf%27%2C+%27quality%27%3A+%27hd720%27%2C+%27type%27%3A+%27video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22%27%2C+%27itag%27%3A+45%7D%2C+%7B%27url%27%3A+%27http%3A%2F%2Fv21.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D905236%252C907040%26itag%3D18%26ipbits%3D8%26signature%3D9B5460B5874FF4B79BA55F22F1C09BE04AF4726E.A25E0E5907833C43D0E49414B9CE98559B696BEF%26sver%3D3%26ratebypass%3Dyes%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26id%3D80a3c2d8ac74eecf%27%2C+%27quality%27%3A+%27medium%27%2C+%27type%27%3A+%27video%2Fmp4%3B+codecs%3D%22avc1.42001E%2C+mp4a.40.2%22%27%2C+%27itag%27%3A+18%7D%2C+%7B%27url%27%3A+%27http%3A%2F%2Fv11.lscache1.c.youtube.com%2Fvideoplayback%3Fsparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D905236%252C907040%26itag%3D22%26ipbits%3D8%26signature%3DB0EB5F000C5FA6E9C3BAD0997ADE807EEBB3EC9E.6A58B0E7462472CDACABBA98B20BBC33AA04AB5E%26sver%3D3%26ratebypass%3Dyes%26expire%3D1307390400%26key%3Dyt1%26ip%3D71.0.0.0%26id%3D80a3c2d8ac74eecf%27%2C+%27quality%27%3A+%27hd720%27%2C+%27type%27%3A+%27video%2Fmp4%3B+codecs%3D%22avc1.64001F%2C+mp4a.40.2%22%27%2C+%27itag%27%3A+22%7D%5D&view_count=743&endscreen_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fendscreen-vfljMItjz.swf&fmt_list=22%2F1280x720%2F9%2F0%2F115%2C35%2F854x480%2F9%2F0%2F115%2C34%2F640x360%2F9%2F0%2F115%2C18%2F640x360%2F9%2F0%2F115%2C5%2F320x240%2F7%2F0%2F0&author=kylelives4jesus&muted=0&avg_rating=0.0&video_id=gKPC2Kx07s8&length_seconds=363&fmt_map=22%2F1280x720%2F9%2F0%2F115%2C35%2F854x480%2F9%2F0%2F115%2C34%2F640x360%2F9%2F0%2F115%2C18%2F640x360%2F9%2F0%2F115%2C5%2F320x240%2F7%2F0%2F0&vq=auto&token=vjVQa1PpcFNZW5lB_2REkoPfmp1JLFuhG5PC2XpRlyU%3D&thumbnail_url=http%3A%2F%2Fi4.ytimg.com%2Fvi%2FgKPC2Kx07s8%2Fdefault.jpg&plid=AASlCuYAovmay16M&title=Revival+Fire+Fall&ftoken=
youtube-dl downloads webm videos by default now unless ultra high-quality mp4 videos are available. Set -f
to 43, 44, or 45 to force one of the webm formats. If webm doesn't work with the current youtube-dl, open a new bug.
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?