-
Notifications
You must be signed in to change notification settings - Fork 7
I/O Error during YouTube playback #10
Comments
YouTube revokes streaming urls on ANDROID clients if they detect significant backpressure. You can alleviate this pressure by using a different client, e.g. WEB (but you will have to decode signatures), or IOS (but you lose webm+opus). If that doesn't work, you can proxy https://*.googlevideo.com/* requests through your own proxy that breaks up the file into 160kB segments to prevent backpressure. I'm not sure what changes happened in FFmpeg but rather than reporting 403 Forbidden as an error, they now return I/O error (maybe try downgrading to FFmpeg 4.x?). The behavior upon 403 is to re-fetch another set of streaming urls and re-start playback but that doesn't happen with I/O error. Even if that were fixed, you'd notice 2-3 interruptions on average for a 3 minute track. |
If your bot does not serve a large number of users, my best solution for you is to simply change |
Changing |
Fixed by #12 |
Since some days, an IO Error occurs while playing songs from YouTube.
Test script:
I'm testing this on WSL2 with Debian unstable inside a Docker container, this worked fine for several months. This is my Dockerfile:
Log with strace: https://pastebin.com/szVcRfaF
The text was updated successfully, but these errors were encountered: