Repository: ytdl-org/youtube-dl

Issue:
Error downloading YouTube videos with new signature length 92
Hi,

I have problems when I try to downloads videos from YouTube since some hours ago. Apparently, there is a new signature length (92).

C:\yt-dl>youtube-dl http://www.youtube.com/watch?v=j5-yKhDd64s
[youtube] Setting language
[youtube] j5-yKhDd64s: Downloading video webpage
[youtube] j5-yKhDd64s: Downloading video info webpage
[youtube] j5-yKhDd64s: Extracting video information
[youtube] j5-yKhDd64s: Encrypted signatures detected.
ERROR: Unable to decrypt signature, key length 92 not supported; retrying might
work; please report this issue on https://yt-dl.org/bug . Be sure to call youtub
e-dl with the --verbose flag and include its complete output.

I don't know what can I do it. Any fix? Thank in advance.



Discussion:
> 3D3D876416369E6234F235A7483116074442365565DC8E47777B7DC2AAD3432D32FB8BF99F50E69.88D88.884884
> 95955B2D98434385FB7431903D82EA76C3911F289DB962463FD353DB4CAD09E6F29234DF8EA0F68.99B99.993993
> 656546EFD589B018A64C383752F6D4A9596D16F9A4E7CA8BD58660D507F85376EC7AD39556997A5.D8ED8.D84D84

Above are some sample signatures with this new length.

Some new real signature keys with length 92:

3030A80632B4979C3BA73C76585E3DD530FBF48EF357E4970C4AD86027D0D2A20ED25FE0054D502.58558.581581
9E9E073BF64A279A8278E80D31D691F345B175ADDD802ED6D1A9B089796D16ABFCBE3B4A98A818B.93893.936936
F6F6F965615E2DFA775F9AE2F6CD1C153FFAFD0F7F27F81F1F5192F1DEC80C42FED1E183822B044.6E26E.6EA6EA

@speedyapocalypse @Baqan Can you post a couple of pairs of both sample and real signatures? That would be immensely helpful and allow us to resolve this issue almost immediately. Having just one (real or input) is not that helpful, unfortunately.

@phihag Here is the HTML code from "url_encoded_fmt_stream_map" Vevo video with length 92:

"url_encoded_fmt_stream_map": "itag=46\u0026s=4646F7498DC8662089F278E00176C7C55C77FB2D3E9264899182DA8D4066D842DCBC0BDD512E268.F39F3.F3DF3D\u0026type=video/webm; codecs="vp8.0, vorbis"\u0026fallback_host=tc.v23.cache4.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=cp,gcr,id,ip,ipbits,itag,ratebypass,source,upn,expire&key=yt1&itag=46&ip=200.104.36.78&ms=au&gcr=cl&source=youtube&expire=1374044953&ratebypass=yes&ipbits=8&id=8f9fb22a10ddeb8b&sver=3&upn=7HrAT7GMvDI&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=hd1080,itag=37\u0026s=1D1DBE31C6BAD83A294897AEA4E7DF29C9187B2114038D5FAA3F9698FF63011F89C32D4CEAAC027.CE0CE.CE6CE6\u0026type=video/mp4; codecs="avc1.64001F, mp4a.40.2"\u0026fallback_host=tc.v10.cache7.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=cp,gcr,id,ip,ipbits,itag,ratebypass,source,upn,expire&key=yt1&itag=37&ip=200.104.36.78&ms=au&gcr=cl&source=youtube&expire=1374044953&ratebypass=yes&ipbits=8&id=8f9fb22a10ddeb8b&sver=3&upn=7HrAT7GMvDI&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=hd1080,itag=45\u0026s=AEAEB5404EDBF20A51667F5725B49636F44EE9DA3113BFA01C6A0239FA0F7EE50762C8F8E88B869.1E11E.1E51E5\u0026type=video/webm; codecs="vp8.0, vorbis"\u0026fallback_host=tc.v9.cache2.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=cp,gcr,id,ip,ipbits,itag,ratebypass,source,upn,expire&key=yt1&itag=45&ip=200.104.36.78&ms=au&gcr=cl&source=youtube&expire=1374044953&ratebypass=yes&ipbits=8&id=8f9fb22a10ddeb8b&sver=3&upn=7HrAT7GMvDI&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=hd720,itag=22\u0026s=57574A622FD3BDE359B78F4B28722DC7103C0A4DFF73EFDA2CC72A5CA566C9BF86A92F1BFC23DA3.8F78F.8F08F0\u0026type=video/mp4; codecs="avc1.64001F, mp4a.40.2"\u0026fallback_host=tc.v9.cache5.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=cp,gcr,id,ip,ipbits,itag,ratebypass,source,upn,expire&key=yt1&itag=22&ip=200.104.36.78&ms=au&gcr=cl&source=youtube&expire=1374044953&ratebypass=yes&ipbits=8&id=8f9fb22a10ddeb8b&sver=3&upn=7HrAT7GMvDI&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=hd720,itag=44\u0026s=404076165B2ADAD5D5A68CC585D39EDA1926536123.D884D04E71D8EC3CFCBB0E8F808BF0F7BF88B28B88BB8BB\u0026type=video/webm; codecs="vp8.0, vorbis"\u0026fallback_host=tc.v19.cache5.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=cp,gcr,id,ip,ipbits,itag,ratebypass,source,upn,expire&key=yt1&itag=44&ip=200.104.36.78&ms=au&gcr=cl&source=youtube&expire=1374044953&ratebypass=yes&ipbits=8&id=8f9fb22a10ddeb8b&sver=3&upn=7HrAT7GMvDI&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=large,itag=35\u0026s=BCBCF2B1F6154464A10BA27FCAC17C8F7F56EA940FF0C1F381A3D33CDAB473B566B2C7AAE5928EA.C7FC7.C79C79\u0026type=video/x-flv\u0026fallback_host=tc.v19.cache1.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,cp,factor,gcr,id,ip,ipbits,itag,source,upn,expire&burst=40&key=yt1&itag=35&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&expire=1374044953&upn=7HrAT7GMvDI&ipbits=8&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&factor=1.25&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=large,itag=43\u0026s=9E9EA263BC7410D8FC6B71F420307035DEB431ABA0433225F680DB803E05F3D67233E071ED3F3.BEABE.BE3BE3\u0026type=video/webm; codecs="vp8.0, vorbis"\u0026fallback_host=tc.v17.cache4.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=cp,gcr,id,ip,ipbits,itag,ratebypass,source,upn,expire&key=yt1&itag=43&ip=200.104.36.78&ms=au&gcr=cl&source=youtube&expire=1374044953&ratebypass=yes&ipbits=8&id=8f9fb22a10ddeb8b&sver=3&upn=7HrAT7GMvDI&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=medium,itag=34\u0026s=75754AF080F8C65266A67744214064A35CBAF3DBB19B28AE515A0A3DB3FE1D9ACE367D27C41BE45.57957.57B57B\u0026type=video/x-flv\u0026fallback_host=tc.v17.cache2.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,cp,factor,gcr,id,ip,ipbits,itag,source,upn,expire&burst=40&key=yt1&itag=34&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&expire=1374044953&upn=7HrAT7GMvDI&ipbits=8&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&factor=1.25&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=medium,itag=18\u0026s=BCBC665C861300747F2CF4A521979C964C6B49297D574CAC4384A9177C11252B827F856F1E2AA5C.0A50A.0AF0AF\u0026type=video/mp4; codecs="avc1.42001E, mp4a.40.2"\u0026fallback_host=tc.v4.cache7.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=cp,gcr,id,ip,ipbits,itag,ratebypass,source,upn,expire&key=yt1&itag=18&ip=200.104.36.78&ms=au&gcr=cl&source=youtube&expire=1374044953&ratebypass=yes&ipbits=8&id=8f9fb22a10ddeb8b&sver=3&upn=7HrAT7GMvDI&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=medium,itag=5\u0026s=9F9F4DAE97F6AA1E6E59A7FA4133DB3F4EA6D9E770136219F991B876E78729C43D3AE0DA15F5A62.E21E2.E2DE2D\u0026type=video/x-flv\u0026fallback_host=tc.v19.cache3.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,cp,factor,gcr,id,ip,ipbits,itag,source,upn,expire&burst=40&key=yt1&itag=5&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&expire=1374044953&upn=7HrAT7GMvDI&ipbits=8&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&factor=1.25&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=small,itag=36\u0026s=4F4F32066C1F371F26C22E90E7FACCF49FDF19A40D57152ED5B7F9DD599DE47A966E4E2787DFC79.95595.950950\u0026type=video/3gpp; codecs="mp4v.20.3, mp4a.40.2"\u0026fallback_host=tc.v8.cache4.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,cp,factor,gcr,id,ip,ipbits,itag,source,upn,expire&burst=40&key=yt1&itag=36&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&expire=1374044953&upn=7HrAT7GMvDI&ipbits=8&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&factor=1.25&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=small,itag=17\u0026s=2B2BA710FE00BF6A26CF5EE28B1AEF867260AA4E02B2C240B882E31478C898B42095E1D3C13EC93.E3BE3.E3CE3C\u0026type=video/3gpp; codecs="mp4v.20.3, mp4a.40.2"\u0026fallback_host=tc.v4.cache1.c.youtube.com\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,cp,factor,gcr,id,ip,ipbits,itag,source,upn,expire&burst=40&key=yt1&itag=17&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&expire=1374044953&upn=7HrAT7GMvDI&ipbits=8&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&factor=1.25&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&mt=1374019415&mv=m&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\u0026quality=small", "account_playback_token": "ezo1_yGK5Ca_ljJ0YaaFBf6Uq-l8MTM3NDEwNTg1NEAxMzc0MDE5NDU0", "vid": "j5-yKhDd64s", "rvs": "playlist_length=49\u0026thumbnail_ids=uelHwf8o7_U\u0026list=RD02j5-yKhDd64s\u0026playlist_title=Relacionados de YouTube\u0026video_id=uelHwf8o7_U,view_count=153.087.930\u0026length_seconds=369\u0026id=1wYNFfgrXTI\u0026title=Eminem - When I'm Gone\u0026author=EminemVEVO,view_count=30.324.849\u0026length_seconds=315\u0026id=UbQhKxxrq04\u0026title=Eminem - No Love ft. Lil Wayne\u0026author=EminemVEVO,view_count=576.071.813\u0026length_seconds=268\u0026id=uelHwf8o7_U\u0026title=Eminem - Love The Way You Lie ft. Rihanna\u0026author=EminemVEVO,view_count=92.152.341\u0026length_seconds=265\u0026id=JByDbPn6A1o\u0026title=Eminem - Space Bound\u0026author=EminemVEVO,view_count=8.101.610\u0026length_seconds=296\u0026id=Wt2yxFOrwxA\u0026title=Турник   брусья, сильный парень из Днепропетровска\u0026author=Apaew,view_count=526.262\u0026length_seconds=220\u0026id=0xFATSkmvzQ\u0026title=NEW 2013 - Eminem - Live For The Morning Feat. Diggy _HOT_\u0026author=OfficialDJMdman,view_count=323.647\u0026length_seconds=1370\u0026id=Z_HphQFlp1E\u0026title=Minecraft Trucos: #04 - Hacer una granja de experiencia\u0026author=Mind1Less,view_count=498.306\u0026length_seconds=249\u0026id=b4mHXnC-elE\u0026title=10 razones para amar a taylor lautner\u0026author=Karycats,view_count=1.847.286\u0026length_seconds=718\u0026id=y5Zgj8j_998\u0026title=GTA: The Ballad of Gay Tony - FINAL MISSION! - Departure Time\u0026author=Willzyyy,view_count=123.058.584\u0026length_seconds=215\u0026id=T3E9Wjbq44E\u0026title=Gym Class Heroes: Stereo Hearts ft. Adam Levine [OFFICIAL VIDEO]\u0026author=Fueled By Ramen,view_count=11.525.049\u0026length_seconds=272\u0026id=dg8QgUIKXHw\u0026title=Christina Aguilera - Can't Hold Us Down\u0026author=CAguileraVEVO", "idpj": "-4", "pltype": "content", "fmt_list": "46\/1920x1080\/99\/0\/0,37\/1920x1080\/9\/0\/115,45\/1280x720\/99\/0\/0,22\/1280x720\/9\/0\/115,44\/854x480\/99\/0\/0,35\/854x480\/9\/0\/115,43\/640x360\/99\/0\/0,34\/640x360\/9\/0\/115,18\/640x360\/9\/0\/115,5\/320x240\/7\/0\/0,36\/320x240\/99\/0\/0,17\/176x144\/99\/0\/0", "ad_device": 1, "title": "Eminem - Not Afraid", "dclk": true, "focEnabled": "1", "video_id": "j5-yKhDd64s", "pprl": "http:\/\/vevo.ly\/zDK6YR", "showpopout": 1, "enablejsapi": 1, "ad_tag": "http:\/\/ad.doubleclick.net\/N4061\/pfadx\/com.ytpwatch.music\/main_10481;sz=WIDTHxHEIGHT;kvid=j5-yKhDd64s;kpu=EminemVEVO;kpeid=20vb-R_px4CguHzzBPhoyQ;kpid=10481;u=j5-yKhDd64s|10481;mpvid=AAThqdV5CuTbGxhw;plat=pc;afct=site_content;afv=1;k5=3_35_592_1030;kclt=1;kcr=cl;kga=-1;kgg=-1;klg=es-419;kmsrd=1;ko=p;kr=F;kvz=205;longads=1;nlfb=1;shortform=1;tves=0;yt_vrallowed=1;ytcat=10;ytdevice=1;ytexp=916903,904824,919515;ytps=default;ytvt=w;!c=10481;k2=3;k2=35;k2=592;k2=1030;kvlg=en;", "t": "vjVQa1PpcFOgdUTM2Nml_RpawQAZaanZWaQKAhvtK7A=", "cid": 10481, "ptchn": "EminemVEVO", "ad_host": "ca-host-pub-4404692103537709", "dashmpd": "http:\/\/www.youtube.com\/api\/manifest\/dash\/sparams\/as,cp,id,ip,ipbits,source,expire\/key\/yt1\/cp\/U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq\/ip\/200.104.36.78\/fexp\/916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309\/source\/youtube\/expire\/1374044953\/upn\/TEwBIcUQj2o\/ipbits\/8\/id\/8f9fb22a10ddeb8b\/sver\/3\/as\/fmp4_audio_clear,webm_audio_clear,fmp4_sd_hd_clear,webm_sd_hd_clear\/signature\/CD7D9AD9ED079B3F476714BDCF84657C44ADB140.89F2338A3DB9087E0C9D645418EEE87ADE9B2406", "plid": "AAThqdV4c_atjwMN", "ytfocHistoryEnabled": false, "loeid": "916903,904824,919515", "cosver": "6.1", "ad_channel_code_instream": "afv_instream,Vertical_3,Vertical_35,Vertical_592,Vertical_1030,yt_mpvid_AAThqdV5CuTbGxhw,yt_cid_10481,ytdevice_1,ytps_default,ytel_detailpage", "mpu": true, "enablecsi": "1", "host_language": "es", "advideo": "1", "dash": "1", "oid": "yZJtHRi2SvzOOKZfbA-GRA", "length_seconds": 259, "ad_host_tier": "3816642", "as_launched_in_country": "1", "rmktEnabled": "1", "keywords": "yt:crop=24:10,Eminem,Not,Afraid,Aftermath,Hip,Hop,New,Song,Recovery,Relapse,Em", "sffb": true, "prefetch_ad_live_stream": true, "autohide": "2", "ad_preroll": "1", "pprs": "http:\/\/s.ytimg.com\/yts\/swf\/Vevo-vflSbabQz.swf", "pyv_in_related_cafe_experiment_id": "", "ad_logging_flag": 1, "allow_embed": 1, "instream": true, "rmktPingThreshold": 0, "ucid": "UC20vb-R_px4CguHzzBPhoyQ", "dynamic_allocation_ad_tag": "http:\/\/ad.doubleclick.net\/N4061\/pfadx\/com.ytpwatch.music\/main_10481;sz=WIDTHxHEIGHT;kvid=j5-yKhDd64s;kpu=EminemVEVO;kpeid=20vb-R_px4CguHzzBPhoyQ;kpid=10481;u=j5-yKhDd64s|10481;mpvid=AAThqdV5CuTbGxhw;plat=pc;afct=site_content;afv=1;afvbase=eJxVkF1z4iAUhn-N3NkBQr4uuIi6drpuW1s1O_aGwQQNDkloAjH46xf1psswc87DOfDynkGWomWFrikO4W0B2ylaGaMnQTbBS78vl8uTa62xB_FUtLU_GW6XfDyHU7eqFmVEelC0XScUN21HURATiFISElAZJksaJCiKCAaNrRkve4pAzUefsdJ23Mi2oSjy6kD4XgIxghBj4EwpBlkI363aWyVFUQqDCZ6nkCSY3BKUhigEhmk3UDEWypYCVG1vaMGntzjV9jAlBJIo9a8GYRDHMAVe2Dgt6N0GqBQV_vsVbxqh6Kts5romCRxjuBW9QRM848eByaY3neDe_SwXnZEFVyz4D8KfFKb4J3pt6NkZVmuvyrJsW32XeTi328PzWF0etcJXkPeG7vhwzx6ge1aKI7fK3FEoj4ZLpflJ-EkxbWi2PgRLnCbxdRjeyNfJLMw-WW_wSwfPug-uTf7lZnGU_ZbSkWQxro5bqV7y63f1cVC_io7t_5KdqJaJ8bNie3dNw8bu-udNvR75ZtPPYXZZ_SHvwe5tYclndLWjdc3JuX03f0-Kj3V-yrdLXb4dXz97rs7csvIfTErIQg;dc_backfill=1;k5=3_35_592_1030;kclt=1;kcr=cl;kga=-1;kgg=-1;klg=es-419;kmsrd=1;ko=p;kr=F;kvz=205;longads=1;nlfb=1;shortform=1;tves=0;yt_vrallowed=1;ytcat=10;ytdevice=1;ytexp=916903,904824,919515;ytps=default;ytvt=w;!c=10481;k2=3;k2=35;k2=592;k2=1030;kvlg=en;", "ptk": "vevo", "loudness": -22.0699996948, "adaptive_fmts": "index=710-1365\u0026itag=137\u0026init=0-709\u0026s=8B8BC0C61FECD0AEBF75397AB63FAFA921B602CFFFCACA479BCE625C0C0B0B91CE2F7E895074F36.B2CB2.B23B23\u0026type=video/mp4; codecs="avc1.640028"\u0026size=1920x1080\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,clen,cp,dur,factor,gcr,gir,id,ip,ipbits,itag,lmt,source,upn,expire&key=yt1&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&expire=1374044953&upn=OsLSNR4uxLA&ipbits=8&dur=258.633&factor=1.25&lmt=1360910567660460&itag=137&burst=40&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&mv=m&mt=1374019415&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&clen=81494651&gir=yes\u0026bitrate=4110930,index=708-1363\u0026itag=136\u0026init=0-707\u0026s=6161EB652B971BC07B171C15C4700EF232BCA4B9B3E2AB9FCB5E38E309FB363F1E398AD1C952B.6AB6A.6AE6AE\u0026type=video/mp4; codecs="avc1.4d401f"\u0026size=1280x720\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,clen,cp,dur,factor,gcr,gir,id,ip,ipbits,itag,lmt,source,upn,expire&key=yt1&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&expire=1374044953&upn=OsLSNR4uxLA&ipbits=8&dur=258.633&factor=1.25&lmt=1360910487934986&itag=136&burst=40&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&mv=m&mt=1374019415&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&clen=42415299&gir=yes\u0026bitrate=2239785,index=708-1363\u0026itag=135\u0026init=0-707\u0026s=5B5BC022944FFAD62896A6C6A862DAA48D2F3EA5A8F5A7D14313337E4735F47FC52F962419149BA.B4FB4.B4BB4B\u0026type=video/mp4; codecs="avc1.4d401e"\u0026size=854x480\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,clen,cp,dur,factor,gcr,gir,id,ip,ipbits,itag,lmt,source,upn,expire&key=yt1&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&expire=1374044953&upn=OsLSNR4uxLA&ipbits=8&dur=258.633&factor=1.25&lmt=1360910533308650&itag=135&burst=40&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&mv=m&mt=1374019415&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&clen=21960893&gir=yes\u0026bitrate=1118610,index=708-1363\u0026itag=134\u0026init=0-707\u0026s=D6D6748CF8547B95880AEF0F48DBAEED5A94EF2A2F349FE6F734E16B4CEBF570A2D81305E0ACC52.0E30E.0EE0EE\u0026type=video/mp4; codecs="avc1.4d401e"\u0026size=640x360\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,clen,cp,dur,factor,gcr,gir,id,ip,ipbits,itag,lmt,source,upn,expire&key=yt1&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&expire=1374044953&upn=OsLSNR4uxLA&ipbits=8&dur=258.633&factor=1.25&lmt=1360906528947517&itag=134&burst=40&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&mv=m&mt=1374019415&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&clen=11324363&gir=yes\u0026bitrate=611669,index=672-1327\u0026itag=133\u0026init=0-671\u0026s=F7F7E5DC78D671D498B91EC957F6BDDF40090E58F21AE5E4FA231EE97D4B6C46D28372CD604FF1A.F31F3.F34F34\u0026type=video/mp4; codecs="avc1.4d4015"\u0026size=426x240\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,clen,cp,dur,factor,gcr,gir,id,ip,ipbits,itag,lmt,source,upn,expire&key=yt1&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&expire=1374044953&upn=OsLSNR4uxLA&ipbits=8&dur=258.633&factor=1.25&lmt=1360906163818867&itag=133&burst=40&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&mv=m&mt=1374019415&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&clen=8590527&gir=yes\u0026bitrate=276902,index=671-1326\u0026itag=160\u0026init=0-670\u0026s=BFBF4684435F5E816E3AF31E91D86919517ACE35E3860D0B1D66CB474D8EAABF3037BFD6252363B.6E86E.6E46E4\u0026type=video/mp4; codecs="avc1.42c00b"\u0026size=256x144\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,clen,cp,dur,factor,gcr,gir,id,ip,ipbits,itag,lmt,source,upn,expire&key=yt1&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&expire=1374044953&upn=OsLSNR4uxLA&ipbits=8&dur=258.633&factor=1.25&lmt=1360906465317527&itag=160&burst=40&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&mv=m&mt=1374019415&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&clen=3087757&gir=yes\u0026bitrate=100071,index=592-935\u0026itag=139\u0026init=0-591\u0026s=1A1A04F576C0554C8178BC28C142E69D15F98501F0B1C40B533CA44D6034C1978AF86BA899814B9.51B51.51E51E\u0026type=audio/mp4; codecs="mp4a.40.5"\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,clen,cp,dur,factor,gcr,gir,id,ip,ipbits,itag,lmt,source,upn,expire&key=yt1&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&expire=1374044953&upn=OsLSNR4uxLA&ipbits=8&dur=258.856&factor=1.25&lmt=1360904861601502&itag=139&burst=40&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&mv=m&mt=1374019415&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&clen=1539950&gir=yes\u0026bitrate=48610,index=592-935\u0026itag=140\u0026init=0-591\u0026s=11114AF6F22CEBA4F6A9280E65D5A9F6FFD04A543B5B7839C4377A4FB459AC18640A7DA9D391D2A.DF5DF.DF1DF1\u0026type=audio/mp4; codecs="mp4a.40.2"\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,clen,cp,dur,factor,gcr,gir,id,ip,ipbits,itag,lmt,source,upn,expire&key=yt1&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&expire=1374044953&upn=OsLSNR4uxLA&ipbits=8&dur=258.786&factor=1.25&lmt=1360904127847213&itag=140&burst=40&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&mv=m&mt=1374019415&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&clen=4110683&gir=yes\u0026bitrate=128004,index=592-935\u0026itag=141\u0026init=0-591\u0026s=CCCCBA6320D17EBADFB7436AB7930D924E416575C70CEA898FD17E0A9FA5E17DC5D3140C6738A9C.38038.380380\u0026type=audio/mp4; codecs="mp4a.40.2"\u0026url=http://r1---sn-upfn-hp5e.c.youtube.com/videoplayback?sparams=algorithm,burst,clen,cp,dur,factor,gcr,gir,id,ip,ipbits,itag,lmt,source,upn,expire&key=yt1&cp=U0hWSVBPUl9KTUNONl9ISVZKOmFLZlo1MUcwcUFq&fexp=916903,904824,919515,909546,916914,929117,929121,929906,929907,929127,929129,929131,925720,925722,925718,925714,929917,929919,912521,904830,919373,904122,908534,936303,900816,912711,935000,921057,929309&expire=1374044953&upn=OsLSNR4uxLA&ipbits=8&dur=258.786&factor=1.25&lmt=1360904058215806&itag=141&burst=40&source=youtube&ms=au&gcr=cl&ip=200.104.36.78&mv=m&mt=1374019415&algorithm=throttle-factor&id=8f9fb22a10ddeb8b&sver=3&clen=8251265&gir=yes\u0026bitrate=255812", "hl": "es_MX", "gut_tag": "\/4061\/ytpwatch\/main_10481", "cr": "CL", "baseUrl": "http:\/\/googleads.g.doubleclick.net\/pagead\/viewthroughconversion\/962985656\/", "ldpj": "-11", "aftv": true, "endscreen_module": "http:\/\/s.ytimg.com\/yts\/swfbin\/endscreen-vflNZxGCw.swf", "share_icons": "http:\/\/s.ytimg.com\/yts\/swfbin\/sharing-vflF4tO1T.swf", "cafe_experiment_id": "40210022", "yt_pt": "APb3F2987zvvN4ZgtDtY8PS2Ir0jps3znVZyB76AJiiy48DxKfTilIVzqhQblEcr_YW4UehF8t921_Yyz95nuUsGSmPxaSSsC0AwKL4O3UNDu4R6zuxuyngyyYrCO8cQPVgVTFpdNfMRsaljau_d", "ad_video_pub_id": "ca-pub-6219811747049371", "cos": "Windows", "c": "WEB", "mpvid": "AAThqdV5CuTbGxhw", "ad_flags": 0, "sk": "S2fA9Qvk1-oMUKejt5ereRc8qEcNWWhcC", "referrer": null, "storyboard_spec": "http:\/\/i1.ytimg.com\/sb\/j5-yKhDd64s\/storyboard3_L$L\/$N.jpg|48#27#100#10#10#0#default#B3CpGcEeICDrbphR5b_J1FOS2ew|80#45#131#10#10#2000#M$M#S2ZuxKfiru4PpxJ9NBKOHivN_AQ|160#90#131#5#5#2000#M$M#p4aMUYZA-HzHQYFPaPOVn5W_78E|320#180#131#3#3#2000#M$M#wjrihP5sFuBuCO2AhiYmCFezOH4", "trueview": true, "sw": "1.0", "ad3_module": "http:\/\/s.ytimg.com\/yts\/swfbin\/ad3-vflncwGeR.swf", "afv_ad_tag": "http:\/\/googleads.g.doubleclick.net\/pagead\/ads?video_cpm=2500000\u0026ht_id=3816642\u0026description_url=http://www.youtube.com/video/j5-yKhDd64s\u0026max_ad_duration=15000\u0026ytdevice=1\u0026loeid=916903,904824,919515\u0026client=ca-pub-6219811747049371\u0026host=ca-host-pub-4404692103537709\u0026ad_type=video\u0026hl=es\u0026channel=afv_instream Vertical_3 Vertical_35 Vertical_592 Vertical_1030 yt_mpvid_AAThqdV5CuTbGxhw yt_cid_10481 ytdevice_1 ytps_default ytel_detailpage\u0026yt_pt=APb3F2987zvvN4ZgtDtY8PS2Ir0jps3znVZyB76AJiiy48DxKfTilIVzqhQblEcr_YW4UehF8t921_Yyz95nuUsGSmPxaSSsC0AwKL4O3UNDu4R6zuxuyngyyYrCO8cQPVgVTFpdNfMRsaljau_d", "afv": true, "timestamp": 1374019454, "interstitial": "http:\/\/s.ytimg.com\/yts\/swf\/vevo_preload-vfl9Lfx8C.swf", "no_get_video_log": "1"}, "params": {"allowfullscreen": "true", "allowscriptaccess": "always", "bgcolor": "#000000"}, "url_v8": "http:\/\/s.ytimg.com\/yts\/swfbin\/cps-vflw1ASnh.swf", "assets": {"css": "http:\/\/s.ytimg.com\/yts\/cssbin\/www-player-vflHkPfde.css", "html": "\/html5_player_template", "js": "http:\/\/s.ytimg.com\/yts\/jsbin\/html5player-vflQw-fB4.js"}};</script>    <script>

@phihag I'd definitely like to provide both as obviously just providing one isn't much help.  However, how would one go about doing this?  When I attempt to see the URL of the streaming video through, say, the network inspector within Chrome, the videos playing have an itag of 140 and 134 and the links played are not the ones inside of the `url_encoded_fmt_stream_map`.

This video is broken also:

> youtube-dl -f 43 -t http://www.youtube.com/watch?v=J9XwFecNXyU --verbose
> [debug] System config: []
> [debug] User config: []
> [debug] Command-line args: ['-f', '43', '-t', 'http://www.youtube.com/watch?v=J9XwFecNXyU', '--verbose']
> [debug] youtube-dl version 2013.07.12
> [debug] Python version 3.3.2 - Linux-3.9.9-1-ARCH-i686-with-arch-Arch-Linux
> [debug] Proxy map: {}
> [youtube] Setting language
> [youtube] J9XwFecNXyU: Downloading video webpage
> [youtube] J9XwFecNXyU: Downloading video info webpage
> [youtube] J9XwFecNXyU: Extracting video information
> [youtube] J9XwFecNXyU: Encrypted signatures detected.
> [youtube] encrypted signature length 92 (79.5), itag 46, html5 player vflQw-fB4
> ERROR: Unable to decrypt signature, key length 92 not supported; retrying might work; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output.
> Traceback (most recent call last):
>   File "/usr/lib/python3.3/site-packages/youtube_dl/YoutubeDL.py", line 312, in extract_info
>     ie_result = ie.extract(url)
>   File "/usr/lib/python3.3/site-packages/youtube_dl/extractor/common.py", line 95, in extract
>     return self._real_extract(url)
>   File "/usr/lib/python3.3/site-packages/youtube_dl/extractor/youtube.py", line 594, in _real_extract
>     signature = self._decrypt_signature(url_data['s'][0])
>   File "/usr/lib/python3.3/site-packages/youtube_dl/extractor/youtube.py", line 200, in _decrypt_signature
>     raise ExtractorError(u'Unable to decrypt signature, key length %d not supported; retrying might work' % (len(s)))
> youtube_dl.utils.ExtractorError: Unable to decrypt signature, key length 92 not supported; retrying might work; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output.

$ ./youtube-dl --verbose https://www.youtube.com/watch?v=LrUvu1mlWco
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=LrUvu1mlWco']
[debug] youtube-dl version 2013.07.12
[debug] Python version 2.7.1 - Darwin-11.4.2-x86_64-i386-64bit
[debug] Proxy map: {}
[youtube] Setting language
[youtube] LrUvu1mlWco: Downloading video webpage
[youtube] LrUvu1mlWco: Downloading video info webpage
[youtube] LrUvu1mlWco: Extracting video information
[youtube] LrUvu1mlWco: Encrypted signatures detected.
[youtube] encrypted signature length 92 (79.5), itag 46, html5 player vflQw-fB4
ERROR: Unable to decrypt signature, key length 92 not supported; retrying might work; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 312, in extract_info
    ie_result = ie.extract(url)
  File "./youtube-dl/youtube_dl/extractor/common.py", line 95, in extract
    return self._real_extract(url)
  File "./youtube-dl/youtube_dl/extractor/youtube.py", line 594, in _real_extract
    signature = self._decrypt_signature(url_data['s'][0])
  File "./youtube-dl/youtube_dl/extractor/youtube.py", line 200, in _decrypt_signature
    raise ExtractorError(u'Unable to decrypt signature, key length %d not supported; retrying might work' % (len(s)))
ExtractorError: Unable to decrypt signature, key length 92 not supported; retrying might work; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output.

Two 92 length sig pairs:

F9F9B6E6FD47029957AB911A964CC20D95A181A5D37A2DBEFD67D403DB0E8BE4F4910053E4E8A79.0B70B.0B80B8
69B6E6FD47029957AB911A9F4CC20D95A181A5D3.A2DBEFD67D403DB0E8BE4F4910053E4E8A7980B7

1212719B8F2A427D03510DCE7443E88F641398346564B1D3342F2F79CEC074BCF5DDE73C81387BC.D66D6.D65D65
42719B8F2A427D03510DCE7143E88F6413983465.4B1D3342F2F79CEC074BCF5DDE73C81387BC5D66

Looks pretty straightforward to decrypt...

@patrickslin how do you find those sig pairs?

Here is working Python code to decrypt those two signature pairs.  I've tested and this works in production for all Vevo videos.

Python:

```
signature = s[25] + s[3:25] + s[0] + s[26:42] + s[79] + s[43:79] + s[91] + s[80:83];
```

JavaScript Equivalent:

```
signature = s[25] + s.substring(3,25) + s[0] + s.substring(26,42) + s[79] + s.substring(43,79) + s[91] + s.substring(80,83);
```

here is working JavaScript code to decrypt all signature.. 

i found this code in youtube html5 player... 

function dj(a)
    {
        a = a.split("");
        a = a.slice(2);
        a = a.reverse();
        a = a.slice(3);
        a = ej(a, 9);
        a = a.slice(3);
        a = ej(a, 43);
        a = a.slice(3);
        a = a.reverse();
        a = ej(a, 23);
        return a.join("")
    }

```
function ej(a, b)
{
    var c = a[0];
    a[0] = a[b % a.length];
    a[b] = c;
    return a
};
```

@firmanelhakim I used @jaimeMF script here https://gist.github.com/jaimeMF/039134145e38dd9dcec6 in the browser javascript console of the interested page, in this case a Beyonce Vevo video. The network requests, along with the decrypted signature query parameter is found when you play the video. Match up the appropriate itags to get the encrypted/decrypted signature pairs. For the 92 length sig, it's pretty straightforward since the decrypt sig pattern matches the encrypted sig pretty closely. I did have to modify that script a bit since the 92 sig has two '.' instead of one.

@speedyapocalypse Cool. Exactly what I got. :)

@WithM posted the key to all of this though.  I just integrated that JavaScript code into my application which parses using JavaScript and it works like a charm.  Looks like it also works for all signature lengths.  Perhaps we should consider moving over to that algorithm instead of individually having code to handle each signature length.

@speedyapocalypse Saw that. Works for me also.

Here's the new algorithm that I suggest we use from now on thanks to @WithM:

**Python**

```
def voodoo(a, b):
    c = a[0];
    a[0] = a[b % len(a)];
    a[b] = c;
    return a;

def crack_signature(signature):
    s = signature.split("");
    s = s[2:len(s)];
    s = s[::-1];
    s = s[3:len(s)];
    s = voodoo(s, 9);
    s = s[3:len(s)];
    s = voodoo(s, 43);
    s = s[3:len(s)];
    s = s[::-1];
    s = voodoo(s, 23);
    s = "".join(s);
    return s;
```

**JavaScript:**

```
function crack_signature(signature) {

    var s = signature.split("");
    s = s.slice(2);
    s = s.reverse();
    s = s.slice(3);
    s = voodoo(s, 9);
    s = s.slice(3);
    s = voodoo(s, 43);
    s = s.slice(3);
    s = s.reverse();
    s = voodoo(s, 23);
    return s.join("");

}

function voodoo(a, b) {

    var c = a[0];
    a[0] = a[b % a.length];
    a[b] = c;
    return a;

}
```

And a simple Python test:

```
def voodoo(a, b):
    c = a[0];
    a[0] = a[b % len(a)];
    a[b] = c;
    return a;

def crack_signature(signature):
    s = signature.split("");
    s = s[2:len(s)];
    s = s[::-1];
    s = s[3:len(s)];
    s = voodoo(s, 9);
    s = s[3:len(s)];
    s = voodoo(s, 43);
    s = s[3:len(s)];
    s = s[::-1];
    s = voodoo(s, 23);
    s = "".join(s);
    return s;

signature = "F9F9B6E6FD47029957AB911A964CC20D95A181A5D37A2DBEFD67D403DB0E8BE4F4910053E4E8A79.0B70B.0B80B8";
print crack_signature(signature);
print "69B6E6FD47029957AB911A9F4CC20D95A181A5D3.A2DBEFD67D403DB0E8BE4F4910053E4E8A7980B7";
```


Resolving patch:
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -179,25 +179,24 @@ def report_rtmp_download(self):
     def _decrypt_signature(self, s):
         """Turn the encrypted s field into a working signature"""
 
-        if len(s) == 88:
-            return s[48] + s[81:67:-1] + s[82] + s[66:62:-1] + s[85] + s[61:48:-1] + s[67] + s[47:12:-1] + s[3] + s[11:3:-1] + s[2] + s[12]
-        elif len(s) == 87:
-            return s[62] + s[82:62:-1] + s[83] + s[61:52:-1] + s[0] + s[51:2:-1]
-        elif len(s) == 86:
-            return s[2:63] + s[82] + s[64:82] + s[63]
-        elif len(s) == 85:
-            return s[76] + s[82:76:-1] + s[83] + s[75:60:-1] + s[0] + s[59:50:-1] + s[1] + s[49:2:-1]
-        elif len(s) == 84:
-            return s[83:36:-1] + s[2] + s[35:26:-1] + s[3] + s[25:3:-1] + s[26]
-        elif len(s) == 83:
-            return s[6] + s[3:6] + s[33] + s[7:24] + s[0] + s[25:33] + s[53] + s[34:53] + s[24] + s[54:]
-        elif len(s) == 82:
-            return s[36] + s[79:67:-1] + s[81] + s[66:40:-1] + s[33] + s[39:36:-1] + s[40] + s[35] + s[0] + s[67] + s[32:0:-1] + s[34]
-        elif len(s) == 81:
-            return s[6] + s[3:6] + s[33] + s[7:24] + s[0] + s[25:33] + s[2] + s[34:53] + s[24] + s[54:81]
-
-        else:
-            raise ExtractorError(u'Unable to decrypt signature, key length %d not supported; retrying might work' % (len(s)))
+        def voodoo(a, b):
+            c = a[0];
+            a[0] = a[b % len(a)];
+            a[b] = c;
+            return a;
+
+        s = list(s)
+        s = s[2:len(s)];
+        s = s[::-1];
+        s = s[3:len(s)];
+        s = voodoo(s, 9);
+        s = s[3:len(s)];
+        s = voodoo(s, 43);
+        s = s[3:len(s)];
+        s = s[::-1];
+        s = voodoo(s, 23);
+        s = "".join(s);
+        return s;
 
     def _get_available_subtitles(self, video_id):
         self.report_video_subtitles_download(video_id)


Test patch: