Bug 216652

Summary: Safari reports WebM+VP9 support on macOS Big Sur Safari, but fails to play
Product: WebKit Reporter: Tomás Palmeirim <tomaspalmeirim>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: jer.noble, joeyparrish, jrjdavidson, naktinis, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Mac   
OS: Other   

Description Tomás Palmeirim 2020-09-17 10:34:26 PDT
Browser: Safari Version 14.0 (16610.2.2.4) / Safari Technology Preview Release 113 (Version 14.0.1, WebKit 16610.2.3.1)
OS: macOS Big Sur Version 11.0 Beta (20A5364e)

MediaSource.isTypeSupported('video/webm') returns true

However, the browser cannot play webm videos, as can be seen at: https://upload.wikimedia.org/wikipedia/commons/transcoded/c/c0/Big_Buck_Bunny_4K.webm/Big_Buck_Bunny_4K.webm.360p.vp9.webm or https://dl5.webmfiles.org/big-buck-bunny_trailer.webm

This also breaks libraries such as Shaka Player (https://github.com/google/shaka-player/issues/2852)

Interestingly, canPlayType correctly reports that this format is not supported
document.createElement('video').canPlayType('video/webm') returns ""
Comment 1 Jer Noble 2020-09-17 12:42:29 PDT
This behaves correctly. WebM is only supported in MSE, and is not supported through file-based playback. So it is expected that MediaSource.isTypeSupported('video/webm') returns true but canPlayType('video/webm') returns "" (not supported).
Comment 2 Jer Noble 2020-09-17 12:48:10 PDT
And the Shaka bug is unrelated to the query here; the video decoder returns an error (kVTVideoDecoderBadDataErr) when decoding the media in question.
Comment 3 Joey Parrish 2020-09-17 13:01:44 PDT
Thanks, Jer.  That is useful info.  I think it would be reasonable to close both bugs, since the underlying issue seems to be a failure to decode the content, presumably due to bad encoding.
Comment 4 Joey Parrish 2020-09-17 13:02:34 PDT
Unless, of course, you think the decoder error is a bug in Safari or macOS.  (I should have thought it through more before sending the last comment.)
Comment 5 Jer Noble 2020-09-17 16:10:51 PDT
> Unless, of course, you think the decoder error is a bug in Safari or macOS.  (I should have thought it through more before sending the last comment.)

No, I think the shaka behavior is a bug in our WebM parser; we haven't yet implemented support for WebM Frames without a duration present. So the frames emitted from our parser have zero duration, and get removed by subsequent samples.
Comment 6 Radar WebKit Bug Importer 2020-09-24 10:35:15 PDT
<rdar://problem/69512077>
Comment 7 naktinis 2020-11-16 07:46:00 PST
Just wanted to give a heads up that this or a related issue ("WebM Frames without a duration present" not being supported) seems to be live on machines that have updated to Big Sur Safari.

I am getting "Shaka Error MEDIA.VIDEO_ERROR (3,,)" on the shaka test page: https://shaka-player-demo.appspot.com/demo/#audiolang=en-gb;textlang=en-gb;uilang=en-gb;asset=https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd;panel=HOME;build=uncompiled

Could you confirm that you also see this? Should I file a separate issue about support for "WebM Frames without a duration present"?
Comment 8 Jonathan Davidson 2022-11-17 17:23:29 PST
I think I might have run into this issue, i've got webm encoded videos that play fine on most devices, only not on macOS (iOS seems to be fine?)