Bug 235714 - Unable to play video/webm;codecs="vp8" generated from Chrome MediaRecorder with MSE
Summary: Unable to play video/webm;codecs="vp8" generated from Chrome MediaRecorder wi...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 15
Hardware: Mac (Intel) macOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-01-27 06:59 PST by Branden
Modified: 2024-02-08 17:15 PST (History)
5 users (show)

See Also:


Attachments
Recording example (225.03 KB, application/x-gzip)
2022-01-27 06:59 PST, Branden
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Branden 2022-01-27 06:59:13 PST
Created attachment 450132 [details]
Recording example

I'm unable to get a screen recording taken from Chrome (97.0.4692.99) to render on Safari 15.2 (or STP) using MSE. I have had some success opening the resulting webm file using a file:// url, but not consistently (the webm file sent in the attached archive does not work when accessing directly with Safari).

I've attached an archive that has an example use of MSE and webm file generated from a Chrome screen recording that is not playing in Safari, however it plays fine in Chrome/Edge and Firefox.

In addition to a potential bug in Safari here, if there is any advice on how I could possible update the EBML of the file to get it working in Safari as a workaround, that would be greatly appreciated.

To run the example in the archive I take these steps:

```
$ tar -zxvf chrome-recording-for-webkit-issue.tar.gz
$ cd chrome-recording-for-webkit-issue
$ npx http-server
```

Then visit http://localhost:8080/player.html in a browser.
Comment 1 Branden 2022-01-27 10:35:03 PST
I've found that if I patch the webm to have a /Info/Duration of -1 and a /Tracks/TrackEntry/DefaultDuration of 100ms (I'm recording at 10fps) then I can get it to play.

However I don't think Duration is meant to be required like that, nor is DefaultDuration when all the SimpleBlock's have timecodes assigned to them.
Comment 2 Radar WebKit Bug Importer 2022-02-03 07:00:18 PST
<rdar://problem/88433300>
Comment 3 Karl Dubost 2024-02-08 17:15:06 PST
Thanks Branden for the report.

The WebKit team is analyzing this. It is probable there is a bug in Chrome’s MediaRecorder generating an invalid webm. If it's the same issue, it would be working in Firefox, because the media team at Firefox had to work around the bug.

Chrome is using ffmpeg for reading, and the player is very lenient and is able to parse the invalid file. 

All of the above with "maybe", as it needs to be diagnosed a bit more.
And find the right bug to point to.