Bug 309824

Summary: [GStreamer][MSE] Some Youtube videos don't play
Product: WebKit Reporter: Przemyslaw Gorszkowski <pgorszkowski>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aboya, eocanha, fujii, nekohayo, philn, vwatermeier, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
GST logs
none
dots
none
log none

Przemyslaw Gorszkowski
Reported 2026-03-12 13:43:04 PDT
On https://www.igalia.com/industry/digital-tv there is a "featured media" : video "Signal in the streams" does not start at all. I attached gst logs and dots file.
Attachments
GST logs (4.42 KB, application/zip)
2026-03-12 13:43 PDT, Przemyslaw Gorszkowski
no flags
dots (1.06 MB, application/zip)
2026-03-12 13:43 PDT, Przemyslaw Gorszkowski
no flags
log (345.18 KB, application/gzip)
2026-03-20 02:01 PDT, Philippe Normand
no flags
Przemyslaw Gorszkowski
Comment 1 2026-03-12 13:43:30 PDT
Created attachment 478653 [details] GST logs
Przemyslaw Gorszkowski
Comment 2 2026-03-12 13:43:46 PDT
Fujii Hironori
Comment 3 2026-03-15 18:19:59 PDT
This is reproducible on YouTube. https://youtu.be/fr5na1EZbtk?si=OKyfxUm2J_YbO44K
Philippe Normand
Comment 4 2026-03-17 09:02:00 PDT
Well at least it works in 2.51.93. The bug seems to happen in main only, maybe I can bisect this actually.
Philippe Normand
Comment 5 2026-03-17 09:40:17 PDT
(In reply to Fujii Hironori from comment #3) > This is reproducible on YouTube. > https://youtu.be/fr5na1EZbtk?si=OKyfxUm2J_YbO44K But only that one? https://www.youtube.com/watch?v=dQw4w9WgXcQ plays fine in main :(
Philippe Normand
Comment 7 2026-03-18 10:15:35 PDT
I have dumped the audio and video MSE inputs to disk, the video is correctly demuxed, but the audio/webm isn't. So this might be a bug in matroskademux.
Philippe Normand
Comment 8 2026-03-18 10:52:26 PDT
(In reply to Philippe Normand from comment #7) > I have dumped the audio and video MSE inputs to disk, the video is correctly > demuxed, but the audio/webm isn't. So this might be a bug in matroskademux. That's for https://www.youtube.com/watch?v=yLdeJMA9TgU But on https://youtu.be/fr5na1EZbtk?si=OKyfxUm2J_YbO44K the input is OK...
Philippe Normand
Comment 9 2026-03-19 04:54:15 PDT
For https://youtu.be/fr5na1EZbtk?si=OKyfxUm2J_YbO44K I think the issue is related with the video content being encoded in h.264 with B-frames, the SourceBuffer ends-up removing most parsed samples and that triggers a re-enqueue, leading to the same removal, and so on...
Philippe Normand
Comment 10 2026-03-19 11:00:09 PDT
I experimented a bit with h264timestamper which makes DTS values monotonically increasing and then reorder samples by PTS before passing them to the SourceBuffer... which that I could hear the first second of audio but video quickly stopped because the decoder detected non-monotonic DTS (due to reordering of samples on PTS)... I think this should be somehow handled in the SourceBufferPrivate, there's supposedly code there to handle B-frames already, but it doesn't seem to work for us...
Philippe Normand
Comment 11 2026-03-20 02:01:55 PDT
Vivienne Watermeier
Comment 12 2026-04-09 10:02:28 PDT
PR: https://github.com/WebKit/WebKit/pull/62362 The issue was that this video uses b-frames, and is encoded at only 6 FPS. Since we don't support MP4 edit lists yet, b-frames can cause an initial gap in PTS, and with such a low framerate, that gap exceeds the current 100ms threshold we have set as workaround for fixing these gaps. The workaround here is just to increase that threshold, but this comes with the risk to cause regressions elsewhere, since all of this is just a hack until we have edit list support.
EWS
Comment 13 2026-05-05 02:24:33 PDT
Committed 312603@main (a3dfc3da7f4d): <https://commits.webkit.org/312603@main> Reviewed commits have been landed. Closing PR #62362 and removing active labels.
Radar WebKit Bug Importer
Comment 14 2026-05-05 02:25:12 PDT
EWS
Comment 15 2026-05-06 01:00:26 PDT
Committed 305877.480@webkitglib/2.52 (8da736e1c95b): <https://commits.webkit.org/305877.480@webkitglib/2.52> Reviewed commits have been landed. Closing PR #64298 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.