-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can someone help me identify my youtube streaming buffering issue #11402
Comments
yt-dlp recently implemented a fix for the >10MB issue. Update your yt-dlp. |
@thebombzen let me rephrase my issue. I am not downloading videos with yt-dlp instead I am streaming them using mpv. When I download videos they download at full ISP speed but buffers when i stream them (even @ 480/720p). That's the issue I am looking to fix. Kindly go through log text and help me identify the issue and fix it. mpvlog.txt |
There's no way for you to fix this short of writing code for FFmpeg to make its HTTP implementation do the workarounds to evade youtube's throttling |
@CounterPillow Thanks. Can you help me explain a little bit more what actually is happening and ffmpeg needs to do (in layman terms) and does everyone faces this who streams with mpv? |
This may be related to #10745 Playing video-only formats seems to throttle the speed. Here are some tests that i did:
Merging videos+audio with audio doesn't seem to throttle, but with video-only it does:
Versions:
Logs: |
Thanks so much @eljamm for pointing out this to me as this basically solves my issue else I had the presumption that lower the video quality the less will it be prone to throttling. I have some other queries too, please address them if you have time:
I had a similar issue earlier where i want to stream videos in h264 but adding stuff to mpv.conf wasnt working but when i added
Edit: found a solution to point no. 1. where i added |
Only the formats with the https protocol are not throttled, but they can only go up to 720p. Also, you can put them in order of preference. If one isn't available it will go to the next:
yt-dlpThere are two protocols in yt-dlp for downloading files:
Youtube throttled downloading dash files using the https protocol, which yt-dlp fixed by changing the query1, but which also caused issues with how mpv handles fragments. mpvThere are two types of dash fragments:
Before #11398, the first fragment without a duration was considered as init and the ones after it as data:
However, yt-dlp splits fragments as 10MB chunks, so if the filesize is less than 10MB, it would be sent as 1 fragment. As a result, this fragment was considered to be init, and the data was left empty. ( As I understand, durations are used to order fragments, but if there is 1 fragment then this parameter is not included, as it's already in order. ) The fix here is to look for init fragments only if there are more than 1 fragments in total.
Without fix
This explains the videos with no audio. Applying fixTo apply this yourself, you must add the patched ytdl_hook file to
You might also need to use Footnotes |
I stream videos through mpv (generally at 480p at 2x speed). I face buffering issue even at 480p. From what i have found out going through issues at github where downloading videos progresses isp speed while buffers while streaming is that ffmpeg has not implemented workarounds for youtube throttling videos >10MB size. Leaving yt-dlp current issue where all users are facing throttled speeds, i face the previously described problem. Kindly go through log file and help me identify and fix the issue. Here are some system details:
mpv 0.35.1
yt-dlp version 2023.02.17
ffmpeg version 4.4.2-0ubuntu0.22.04.1
OS Linux mint 21 xfce
CPU i3-3110m with igpu
mpvlog.txt
The text was updated successfully, but these errors were encountered: