firsttris / plugin.video.sendtokodi

:tv: plays various stream sites on kodi using youtube-dl
MIT License
121 stars 27 forks source link

[youtube-dl] Youtube's extractor is broken since yesterday #55

Closed pitsi closed 2 years ago

pitsi commented 2 years ago

As mentioned in the title, youtube-dl's extractor for youtube is broken since yesterday, February 4th 2022. Huge output from kodi's log on my kodi 18 system (the paste will be available for 1 month) https://pastebin.com/txj9QsaV

There is no similar issue report on youtube-dl's github. I might make one when I have time. I say "might" because I know it will stay unfixed for months, so there is no point wasting my time for it. I hope this guy here, who forked youtube-dl and has branches with fixes, has a fix for it too. https://github.com/dirkf/youtube-dl

On the other hand, yt-dlp had a new release yesterday and mentions the fix. I assume it is this bit here, but I have no idea how to backport it to youtube-dl https://github.com/yt-dlp/yt-dlp/commit/af5c1c553e0147fad5f386f42058186e1952ee4e

As usual, sendtokodi works with no issues on kodi 19 and yt-dlp and presents the forementioned issue when using youtube-dl as the resolver.

nullket commented 2 years ago

It seems like Dirk took over the original project: https://github.com/ytdl-org/youtube-dl/issues/30568

sendtokodi now uses the original master branch of the original youtube-dl while yt-dlp still remains the default for sendtokodi. youtube-dl seems to undergo heavy changes so it might break from time to time in the fixing process (there are no stable releases yet).

@pitsi please check version 0.9.69 (restart kodi after installing to be sure it is loaded correctly). Please report back here how/if it works for you.

dirkf commented 2 years ago

From the yt-dlp issue:

I've verified that this does not happen on youtube-dl, only on yt-dlp.

yt-dl HEAD:

$ python -m youtube_dl -v $(printf 'ytsearch:youtube-dl test video %s%s/\ä↭𝕐' '"' "'")
[debug] System config: [u'--prefer-ffmpeg']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'ytsearch:youtube-dl', u'test', u'video', u'"\'/\\\xe4\u21ad\U0001d550']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: 8248133e5
[debug] Python version 2.7.17 (CPython) - Linux-4.4.0-210-generic-i686-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 4.3, avprobe 4.3, ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
[download] Downloading playlist: youtube-dl
[youtube:search] query "youtube-dl": Downloading page 1
[youtube:search] playlist youtube-dl: Downloading 1 videos
[download] Downloading video 1 of 1
[youtube] yOhGkZ4U4lI: Downloading webpage
[debug] [youtube] Decrypted nsig WLA7balfWtlWu3dMu => pG80fZvxGGnpoQ
[debug] [youtube] Decrypted nsig dQuIz0bhJT1LVSWMt => lTPxNmHEO7CwaQ
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://rr5---sn-cu-aigsl.googlevideo.com/videoplayback?sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&fexp=24001373%2C24007246&ei=y3v-YYjSIarSxN8Py-yyuAU&ip=51.6.64.232&clen=12874799&id=o-AGalz5c7_MdsLdetN3GLWM6ztdRrACJzPmHphOtIgnvf&txp=5311222&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303&gir=yes&requiressl=yes&keepalive=yes&source=youtube&sig=AOq0QJ8wRQIhANJ7esi4kKN27NCcYBbUwx4q0Kgm2wl4CdcqvFsQzAowAiBkBYUvNYiAmYPSQF59dwAiXRZXtfz2lgRhORGfveeKZw%3D%3D&pcm2cms=yes&dur=319.283&ns=JjMLaXqp9shzxpGoXH8BR8cG&initcwndbps=1358750&vprv=1&lsig=AG3C_xAwRQIgHKlopnM5iUs1M8l8QnRkWD_-ossx-nV1_yYbMlygEdECIQD0YBuDQW7QvzyqwmH2WpysBxU0AR_mj-q0tqmDgM57ew%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lmt=1626155774757903&c=WEB&expire=1644089387&mime=video%2Fmp4&fvip=8&itag=299&mm=31%2C29&mn=sn-cu-aigsl%2Csn-cu-c9il&mh=kK&n=pG80fZvxGGnpoQ&mt=1644067504&mv=m&pl=25&ms=au%2Crdu&mvi=5'
[download] Destination: Basic guide to Youtube-DL on Windows-yOhGkZ4U4lI.f299.mp4
[download]   8.1% of 12.28MiB at  1.17MiB/s ETA 00:09
...

We've been able to incorporate quite a few YT-specific updates that were pending for ages and a new release RSN. The core program remains stable.

nullket commented 2 years ago

The core program remains stable.

I did the exact same test as you and that’s why I updated youtube_dl in our addon to your newest master. When I said it might break, I did not mean the core but just due to compatibility of the immense changes you actual need to incorporate. The same reasons you mentioned in your issue that there is no new stable release yet. I am happy that you are working on this project again not at least as it seems as quite a lot people are still using python2. Keep on :)

Btw yt-dlp seems to be already fixed again.

pitsi commented 2 years ago

sendtokodi now uses the original master branch of the original youtube-dl

Does this mean every commit that is applied to youtube-dl reaches sendtokodi? I just got the upgrade to 0.9.71 and youtube's extractor seems to be working again, so I am closing the issue. Thank you for your quick fix!

p.s. Sorry for not completely understanding the stuff in the code tags. However, I tried youtube-dl (v2021.12.17) earlier and its youtube extractor was working like it is supposed to. It even has that awful throttling I talked about on my previous issue.

$ youtube-dl -f 18 https://www.youtube.com/watch?v=C75GfC1y_nw
[youtube] C75GfC1y_nw: Downloading webpage
[youtube] C75GfC1y_nw: Downloading player 0cd11746
[download] Destination: Anser_-_Anthropos_Idios_Official_video_clip_Prod._by_Eversor-C75GfC1y_nw.mp4
[download]  27.1% of 14.96MiB at 68.28KiB/s ETA 02:43^C
ERROR: Interrupted by user