0xced / XCDYouTubeKit

YouTube video player for iOS, tvOS and macOS
MIT License
2.92k stars 626 forks source link

Some 1080p videos unable to fetch #354

Closed SoneeJohn closed 5 years ago

SoneeJohn commented 6 years ago

I know this might be beyond the scope of the library (1080p itag=137) however, as the title says some video cannot be fetched with the library anymore. E.g https://youtu.be/Jk3IjaSfB2A With that said youtube-dl doesn't suffer from this issue. I will investigate further :-)

SoneeJohn commented 6 years ago

Looks like some of the other DASH formats are stored somewhere else with certain videos.

SoneeJohn commented 6 years ago

I figured it out. The library currently gives you the URL to the DASH manifest. The key is dashmpd

Example URL: https://manifest.googlevideo.com/api/manifest/dash/initcwndbps/220000/mt/1508524783/playback_host/r1---sn-4avf-cbpe.googlevideo.com/key/yt6/expire/1508546454/id/264dc88da49f0760/hfr/all/mm/31/mn/sn-4avf-cbpe/ms/au/itag/0/ei/NkPqWf7HLJOm-wX3862AAQ/signature/4A9B5F82418E681D7AE33A5C7715215EE1CD6C99.94C7BD7AF80EF342CB394E075D209889CD83C6FB/as/fmp4_audio_clear%2Cfmp4_sd_hd_clear/mv/m/source/youtube/pl/24/ipbits/0/sparams/as%2Cei%2Chfr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cplayback_host%2Crequiressl%2Csource%2Cexpire/requiressl/yes/ip/XXXX

screen shot 2017-10-20 at 2 45 26 pm

I'll work on this over the weekend and send a PR 🙂

SoneeJohn commented 6 years ago

I've been working on it and trying to unscramble signatures. Some of the URLs appear to have encrypted signatures. @0xced any thoughts on this?

SoneeJohn commented 6 years ago

I began piecing it together and I believe I figured it out :-)

SoneeJohn commented 5 years ago

Fixed in version 2.6.0