RESOLVED FIXED201401
[GStreamer] cnn.com videos don't work
https://bugs.webkit.org/show_bug.cgi?id=201401
Summary [GStreamer] cnn.com videos don't work
Michael Catanzaro
Reported 2019-09-02 07:42:47 PDT
I can't play the videos on https://www.cnn.com/2019/08/30/us/st-louis-child-shooting-arrest/index.html in Tech Preview with 2.25.4. There's two videos on this page: "At least 12 children have been killed by gunfire in St. Louis since April" and then "Kids remember friends lost to gun violence in St. Louis". Both videos display only a black window, even though we have H.264 support in Tech Preview. The second video sometimes plays a couple seconds of audio, but not always. In both cases, the duration of the video -- the second number -- changes, which should not happen. After a few seconds, which seems to vary, the first number (the progress) stops changing as well.
Attachments
Patch (2.18 KB, patch)
2019-09-07 03:23 PDT, Alicia Boya García
no flags
Patch (31.25 KB, patch)
2019-10-06 09:48 PDT, Alicia Boya García
no flags
Patch (31.96 KB, patch)
2019-10-06 10:03 PDT, Alicia Boya García
no flags
Patch (41.41 KB, patch)
2019-10-07 05:11 PDT, Alicia Boya García
no flags
Patch (34.24 KB, patch)
2019-10-07 10:18 PDT, Alicia Boya García
no flags
Patch (35.27 KB, patch)
2019-10-09 07:59 PDT, Alicia Boya García
no flags
Patch (2.21 KB, patch)
2019-10-24 08:05 PDT, Alicia Boya García
no flags
Philippe Normand
Comment 1 2019-09-03 02:36:57 PDT
I can reproduce on trunk / MiniBrowser. Going back to the revision before the MSE source element rewrite fixes the issue. So I'm afraid this could be a regression introduced in r249205
Philippe Normand
Comment 2 2019-09-03 02:45:37 PDT
The video track is not enabled. Commenting out the early return in MediaPlayerPrivateGStreamer::enableTrack() line 814, I now see video ;)
Michael Catanzaro
Comment 3 2019-09-03 04:05:47 PDT
But we have 2.25.4 in Tech Preview, and 2.25.4 does not have the MSE source element rewrite. So that cannot be the cause of the bug I'm experiencing. There must be something else wrong too. Right?
Philippe Normand
Comment 4 2019-09-03 04:19:11 PDT
Oh yes, this is a different issue indeed. Here in Ephy TP I have *NO* H.264 decoder: [📦 org.gnome.Epiphany.Devel ~]$ gst-play-1.0 --videosink "glsinkbin sink=gtkglsink" "https://cnnios-f.akamaihd.net/i/cnn/big/us/2019/08/14/caption/7-year-old-killed-in-st-louis-gunfire-lc-orig.cnn_2782230_ios_,440,650,840,1240,3000,5500,.mp4.csmil/master.m3u8?__b__=650" Press 'k' to see a list of keyboard shortcuts. Now playing https://cnnios-f.akamaihd.net/i/cnn/big/us/2019/08/14/caption/7-year-old-killed-in-st-louis-gunfire-lc-orig.cnn_2782230_ios_,440,650,840,1240,3000,5500,.mp4.csmil/master.m3u8?__b__=650 WARNING No decoder available for type 'video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal, parsed=(boolean)true'. WARNING debug information: ../gst/playback/gsturidecodebin.c(920): unknown_type_cb (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0 And HLS is used, whereas in trunk MSE is used... What a mess.
Philippe Normand
Comment 5 2019-09-03 04:25:52 PDT
So to sum up, in TP 2.25.4, HLS is used but the runtime lost (again?) H.264 decoding support. That's not a WebKit bug. However in trunk, MSE is used but only audio plays, no video. See comment 2.
Michael Catanzaro
Comment 6 2019-09-03 04:45:43 PDT
(In reply to Philippe Normand from comment #4) > Oh yes, this is a different issue indeed. Here in Ephy TP I have *NO* H.264 > decoder: lol....
Michael Catanzaro
Comment 7 2019-09-03 04:49:39 PDT
Let's repurpose this bug for the problem in trunk. For losing H.264 again: https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues/858
Alicia Boya García
Comment 8 2019-09-04 11:44:01 PDT
I got a local repro. The bug occurs 100% of the time when the audio initialization segment is appended before the video initialization segment, and 0% of the time when the order is the opposite.
Michael Catanzaro
Comment 9 2019-09-06 06:01:05 PDT
(In reply to Philippe Normand from comment #5) > So to sum up, in TP 2.25.4, HLS is used but the runtime lost (again?) H.264 > decoding support. That's not a WebKit bug. This is "fixed," now we support H.264 but any attempt to play it causes the web process to immediately crash: https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues/863 I think help from WebKit multimedia experts will be needed to solve it.
Philippe Normand
Comment 10 2019-09-06 07:48:28 PDT
Seems like Mario is your expert, since he wrote(?) this "noopenh264" lib which I had no idea exists, until 5 minutes ago. :)
Michael Catanzaro
Comment 11 2019-09-06 08:00:01 PDT
It looks like freedesktop-sdk developers will deal with it. It's a bit confusing discussing two different issues in the same place. I'll shut up and leave this one to Alicia.
Alicia Boya García
Comment 12 2019-09-06 09:52:01 PDT
Yeah, that looks like a completely different issue. This one is about the video track not showing about half of the time.
Alicia Boya García
Comment 13 2019-09-07 03:23:36 PDT
Michael Catanzaro
Comment 14 2019-09-07 06:51:38 PDT
Comment on attachment 378288 [details] Patch Is it really not testable? Or it doesn't fix any existing layout tests?
Xabier Rodríguez Calvar
Comment 15 2019-09-09 01:53:21 PDT
Comment on attachment 378288 [details] Patch A test is needed.
Alicia Boya García
Comment 16 2019-09-10 11:21:12 PDT
As far as I know, this is not testable with LayoutTests. I tried using canvas to check the content of the video, but even when the video sink is using the wrong context and the displayed textures in the <video> are wrong, painting them on a canvas will download the correct ones, so testing this can't be automated in JS.
Xabier Rodríguez Calvar
Comment 17 2019-09-11 00:47:42 PDT
(In reply to Alicia Boya García from comment #16) > As far as I know, this is not testable with LayoutTests. I tried using > canvas to check the content of the video, but even when the video sink is > using the wrong context and the displayed textures in the <video> are wrong, > painting them on a canvas will download the correct ones, so testing this > can't be automated in JS. Isn't there any way with the internals?
Alicia Boya García
Comment 18 2019-09-11 03:34:06 PDT
(In reply to Xabier Rodríguez Calvar from comment #17) > (In reply to Alicia Boya García from comment #16) > > As far as I know, this is not testable with LayoutTests. I tried using > > canvas to check the content of the video, but even when the video sink is > > using the wrong context and the displayed textures in the <video> are wrong, > > painting them on a canvas will download the correct ones, so testing this > > can't be automated in JS. > > Isn't there any way with the internals? Maybe it would work if I had a way to get a screenshot of the whole page (since getting the video alone doesn't reproduce the issue as I explained). Reftests are supposed to do that, so that may be the way, if they happen to reproduce the bug. I'll give it a look.
Alicia Boya García
Comment 19 2019-10-06 09:48:46 PDT
Alicia Boya García
Comment 20 2019-10-06 10:03:11 PDT
Philippe Normand
Comment 21 2019-10-07 02:01:11 PDT
The test needs mac-specific expectation files it seems. You can get them from the EWS.
Alicia Boya García
Comment 22 2019-10-07 05:11:25 PDT
Alicia Boya García
Comment 23 2019-10-07 10:18:06 PDT
Philippe Normand
Comment 24 2019-10-09 01:31:29 PDT
There's a 2 pixel difference now in the mac test results. How come? :(
Alicia Boya García
Comment 25 2019-10-09 04:24:12 PDT
(In reply to Philippe Normand from comment #24) > There's a 2 pixel difference now in the mac test results. How come? :( I have no idea. I can't even see it in an image editor using Difference blending mode. And the difference is near the text, which is produced by identical HTML and CSS. I guess I'll just mark the test as skip in Mac, since I see no way to account for that couple of pixels.
Philippe Normand
Comment 26 2019-10-09 04:39:42 PDT
Go for it. We can't block this forever due to unwilling bots.
Alicia Boya García
Comment 27 2019-10-09 07:59:47 PDT
WebKit Commit Bot
Comment 28 2019-10-09 12:40:12 PDT
Comment on attachment 380535 [details] Patch Clearing flags on attachment: 380535 Committed r250922: <https://trac.webkit.org/changeset/250922>
WebKit Commit Bot
Comment 29 2019-10-09 12:40:14 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 30 2019-10-09 12:41:17 PDT
Alicia Boya García
Comment 31 2019-10-24 07:40:51 PDT
This patch was almost mechanically reverted temporarily along the rest of the WebKitMediaSrc rework. In theory this should have been OK since this was supposed to fix a regression of that patch... But actually the bug was already causing problems before, the WebKitMediaSrc rework just exposed a more common case. It has been reported that the same bug arise when adding some CSS styles to the <video> element, and the patch fixes the issue. And the patch actually makes sense in any case... since without it some perfectly valid state transitions are not covered! So I'm reintroducing it.
Alicia Boya García
Comment 32 2019-10-24 08:05:45 PDT
WebKit Commit Bot
Comment 33 2019-10-24 09:40:04 PDT
Comment on attachment 381810 [details] Patch Clearing flags on attachment: 381810 Committed r251544: <https://trac.webkit.org/changeset/251544>
WebKit Commit Bot
Comment 34 2019-10-24 09:40:06 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.