RESOLVED FIXED 233861
REGRESSION(r284711): [GStreamer] Buffering, seek broken on youtube.com
https://bugs.webkit.org/show_bug.cgi?id=233861
Summary REGRESSION(r284711): [GStreamer] Buffering, seek broken on youtube.com
Michael Catanzaro
Reported 2021-12-05 08:42:55 PST
Since 2.35.1, we seem to be somehow really bad at buffering YouTube videos. WebKit has always been very unreliable at this -- it's been common for years to have to refresh the entire page when a video begins buffering -- but now it seems to have gotten much, much worse. I've been trying to watch a particular YouTube video that I've had to restart *dozens* of times now because it seems to just stop downloading additional data, and when this happens the only way to get it to continue is to refresh the entire page. Between this and bug #233859 we have a pretty big problem with YouTube. I can try to upload a GStreamer debug log next week if requested. I wonder if network debug might be helpful too.
Attachments
Buffer health decreasing after entering fullscreen (31.87 MB, video/mp4)
2022-02-21 23:00 PST, Kdwk
no flags
Patch (12.09 KB, patch)
2022-03-10 04:35 PST, Philippe Normand
no flags
Patch for landing (12.10 KB, patch)
2022-03-10 05:49 PST, Michael Catanzaro
no flags
Michael Catanzaro
Comment 1 2022-02-11 08:16:29 PST
This error seems to occur quite frequently during the first two minutes of video playback. It rarely ever occurs otherwise. If the video begins to buffer within the first two minutes, it will never finish buffering and the only way to continue video playback is Ctrl+R.
Michael Catanzaro
Comment 2 2022-02-20 14:21:09 PST
I found a workaround to make YouTube usable: manually seek to just before the end of the buffered region, and WebKit will reliably buffer more content.
Kdwk
Comment 3 2022-02-21 23:00:23 PST
Created attachment 452828 [details] Buffer health decreasing after entering fullscreen I would like to say that I'm able to reproduce this with WebKitGTK 2.35.3 on Gnome Web 42.beta-really-33-gd3ed97c96+. Video tested: https://youtu.be/FIWE0hjrDNE (VP9/ opus) Buffering is fine when the video is not maximized (resolution 1280*720). YouTube maintains a buffer of around 90 seconds. However, when the video is maximized (resolution 1920*1080) the buffer is no longer maintained and buffer health drops rapidly until it becomes 0 seconds and the video stops.
Kdwk
Comment 4 2022-02-21 23:25:13 PST
I have also observed that this behaviour only occurs for certain videos, like the one linked above. For other videos, playback is normal.
Michael Catanzaro
Comment 5 2022-02-22 07:56:39 PST
(In reply to kdwkleung from comment #3) > Created attachment 452828 [details] > Buffer health decreasing after entering fullscreen (Unrelated: note that I am unable to play this video due to bug #183259. It seems WebKit is unable to play any video attached to WebKit Bugzilla.)
Michael Catanzaro
Comment 6 2022-03-08 18:06:44 PST
I've bisected this to r283609: before this revision, seeking YouTube videos works fine, but starting with this revision seek never works. Also, normal buffering usually (but not always?) fails even in the absence of any seek. Now, r283609 got reverted in r284087, then landed again in r284711, so r284711 is probably the commit we need to revert. However, I haven't yet tested r284710 vs. r284711 to be 100% sure. Will check this very soon.
Michael Catanzaro
Comment 7 2022-03-09 09:46:53 PST
Confirmed: r284710 is good, r284711 is not.
Philippe Normand
Comment 8 2022-03-10 04:35:32 PST
Michael Catanzaro
Comment 9 2022-03-10 05:12:31 PST
Comment on attachment 454335 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454335&action=review Thank you! > Source/WebCore/platform/graphics/SourceBufferPrivate.h:156 > + virtual MediaTime timeFudgeFactor() const { return {2002, 24000}; } Style bot is complaining about this, should have extra space: { 2002, 24000 }
Michael Catanzaro
Comment 10 2022-03-10 05:49:44 PST
Created attachment 454347 [details] Patch for landing
EWS
Comment 11 2022-03-10 08:26:27 PST
Committed r291111 (248273@main): <https://commits.webkit.org/248273@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 454347 [details].
Radar WebKit Bug Importer
Comment 12 2022-03-10 08:27:28 PST
Note You need to log in before you can comment on or make changes to this bug.