[wpt-sync] Sync PR 64652 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=281816
Categories
(Core :: Audio/Video: Recording, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64652 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64652
Details from upstream follow.
Jean-Yves Avenard <jya@apple.com> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=281816
WebKit export from bug: All MediaRecorderPrivate should be running in the web content process.<!---->
<pre>
All MediaRecorderPrivate should be running in the web content process.We extend on the work started with the MediaRecorderPrivateWriterWebM introduced in <a href="https://commits.webkit.org/285061@main">285061@main</a>.
We add a new MediaRecorderPrivateEncoder that performs the encoding, encoded frames interleaving management
and writing through the specialised MediaRecorderPrivateWriter.This new MediaRecorderPrivate can encode into any audio codec supported by AVFoundation (though only opus and AAC is enabled for now)
and all video codecs supported by VideoEncoder with webm (vp8, vp9) and mp4 (h264, h265, av1).The code runs in its dedicated WorkQueue.
One of the key change which added a significant amount of technical complexity is that while we will generate 2s GOP
a call to MediaRecorder.requestData() will return fully playable media segment, formed such as each new segment starts
with a keyframe. The generated media is MSE compatible.
This way, the page fully controls the duration of the media segments generated by either setting
a time slice when creating a MediaRecorder or calling requestData() at regular interval.When a new segment is required by the page, we flush all pending frames received to that point. As the audio encoder
has a certain latency, we may need to wait for a future audio frame to come which would allow the audio for the
current time to be available. When we are streaming, this is not a problem ; however if the recording has been paused
no audio will be coming. So instead will fully drain the encoder. As a side effect, resuming the recording
may cause an audible silence for the duration of the codec delay (55ms with Opus content).
In practice, this may not be noticeable as pausing and resuming a recording would produce noticeable
artifacts with audio.Another technical change with the previous webm recorder is that the video time is now set to use
the start time of the last appended audio frame rather than the end. This too is also a consequence of the audio encoder
having a set latency and allowed for some simplifications in the code.The new MediaRecorder add supports for the codec to be set and the mimetype for the content generated will
be mostly accurate (we use static values with common profiles rather than attempting to determing accurately
things like the codec level and profile.The RemoteMediaRecorder being no longer used is fully removed along the related files.
The class MediaRecorderProvider and its overrides are removed.Tests amended and corrected to reflect the more accurate behaviors.
Upstream has changed this file since WebKit last imported it, so this applies the change to upstream's current version. Its video regexes now also allow x- subtypes, so digits are allowed in the other alternative.
WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=281816">https://bugs.webkit.org/show_bug.cgi?id=281816</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/285726@main">https://commits.webkit.org/285726@main</a>
</pre>
| Assignee | ||
Updated•16 days ago
|
| Assignee | ||
Comment 1•16 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=119931
| Assignee | ||
Comment 2•16 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 120 tests and 5 subtests
Status Summary
Firefox
OK : 1[GitHub] 116[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 117[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 248[GitHub] 693[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 696[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 11[GitHub] 47[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 48[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
Chrome
OK : 1
PASS: 243
FAIL: 19
Safari
OK : 1
PASS: 236
FAIL: 24
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /mediacapture-record/MediaRecorder-events-and-exceptions.html?mimeType=video/webm;codecs=vp8,opus [wpt.fyi]:
SKIP - /mediacapture-record/MediaRecorder-pause-resume.html?mimeType=video/webm;codecs=vp8,opus [wpt.fyi]:
SKIP - /mediacapture-record/MediaRecorder-stop.html?mimeType=video/webm;codecs=vp8,opus [wpt.fyi]:
SKIP - /mediacapture-record/BlobEvent-constructor.html [wpt.fyi]
- The BlobEvent instance's timecode defaults to NaN when not specified.:
FAIL - The BlobEvent instance's timecode is set from BlobEventInit.:
FAIL
- The BlobEvent instance's timecode defaults to NaN when not specified.:
- /mediacapture-record/MediaRecorder-blob-timecode.https.html [wpt.fyi]
- MediaRecorder Blob timecode for first chunk must be 0 and monotonically increasing for video-only:
FAIL - MediaRecorder Blob timecode for first chunk must be 0 and monotonically increasing for audio-only:
FAIL - MediaRecorder Blob timecode for first chunk must be 0 and monotonically increasing for audio/video:
FAIL
- MediaRecorder Blob timecode for first chunk must be 0 and monotonically increasing for video-only:
- /mediacapture-record/MediaRecorder-canvas-media-source.https.html?mimeType=video/webm;codecs=vp8,opus [wpt.fyi]
- MediaRecorder returns frames containing video content:
FAIL
- MediaRecorder returns frames containing video content:
- /mediacapture-record/MediaRecorder-detached-context.html [wpt.fyi]
- MediaRecorder creation with detached context:
FAIL
- MediaRecorder creation with detached context:
- /mediacapture-record/MediaRecorder-error.html [wpt.fyi]
- MediaRecorder will stop recording when any of track is added and error event will be fired:
FAIL - MediaRecorder will stop recording when any of track is removed and error event will be fired:
FAIL - MediaRecorder throws NotSupportedError when given both videoKeyFrameIntervalDuration and videoKeyFrameIntervalCount:
FAIL
- MediaRecorder will stop recording when any of track is added and error event will be fired:
- /mediacapture-record/MediaRecorder-mimetype.html [wpt.fyi]
- Profile ignored for mimeType video/webm; codecs="vp8.madeup.profile":
FAIL(Chrome:PASS, Safari:FAIL) - Support or lack thereof for newer mimeType audio/webm; codecs="futureaudiocodec" is detected asynchronously.:
FAIL(Chrome:FAIL, Safari:FAIL) - Support or lack thereof for newer mimeType audio/matroska; codecs="futureaudiocodec" is detected asynchronously.:
FAIL(Chrome:FAIL, Safari:FAIL) - Support or lack thereof for newer mimeType audio/x-matroska; codecs="futureaudiocodec" is detected asynchronously.:
FAIL(Chrome:FAIL, Safari:FAIL) - Support or lack thereof for newer mimeType video/webm; codecs="av02" is detected asynchronously.:
FAIL(Chrome:FAIL, Safari:FAIL) - Support or lack thereof for newer mimeType video/matroska; codecs="av02" is detected asynchronously.:
FAIL(Chrome:FAIL, Safari:FAIL) - Support or lack thereof for newer mimeType video/x-matroska; codecs="av02" is detected asynchronously.:
FAIL(Chrome:FAIL, Safari:FAIL) - Support or lack thereof for newer mimeType video/webm; codecs="av02,opus" is detected asynchronously, unless opus is unsupported.:
FAIL(Chrome:FAIL, Safari:FAIL) - Support or lack thereof for newer mimeType video/webm; codecs="av02,futureaudiocodec" is detected asynchronously.:
FAIL(Chrome:FAIL, Safari:FAIL) - Support or lack thereof for newer mimeType video/matroska; codecs="av02,futureaudiocodec" is detected asynchronously.:
FAIL(Chrome:FAIL, Safari:FAIL) - Support or lack thereof for newer mimeType video/x-matroska; codecs="av02,futureaudiocodec" is detected asynchronously.:
FAIL(Chrome:FAIL, Safari:FAIL)
- Profile ignored for mimeType video/webm; codecs="vp8.madeup.profile":
- /mediacapture-record/MediaRecorder-peerconnection-no-sink.https.html [wpt.fyi]
- MediaRecorder records from PeerConnection without sinks, {"video":{}}:
FAIL[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview],PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]
- MediaRecorder records from PeerConnection without sinks, {"video":{}}:
- /mediacapture-record/MediaRecorder-peerconnection.https.html?kinds=video&mimeType=video/webm;codecs=vp8 [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview] - /mediacapture-record/MediaRecorder-requestData.html [wpt.fyi]
- requestData() after onstart fires dataavailable with non-empty data for video:
FAIL - requestData() after onstart fires dataavailable with non-empty data for audio:
FAIL - requestData() after onstart fires dataavailable with non-empty data for audio/video:
FAIL
- requestData() after onstart fires dataavailable with non-empty data for video:
- /mediacapture-record/MediaRecorder-stop.html?mimeType='' [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/mp4;codecs=hev1.1.6.L186.B0,opus [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/mp4;codecs=hev1.1.6.L186.B0,mp4a.40.2 [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/mp4;codecs=avc1.64003E,mp4a.40.2 [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/mp4 [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/mp4;codecs=av01,opus [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/mp4;codecs=av01,mp4a.40.2 [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/webm;codecs=av1,opus [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/x-matroska;codecs=hev1.1.6.L186.B0,opus [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/webm;codecs=vp9,opus [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/mp4;codecs=hvc1.1.6.L186.B0,mp4a.40.2 [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/mp4;codecs=hvc1.1.6.L186.B0,opus [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/mp4;codecs=vp9,opus [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/mp4;codecs=avc3.64003E,mp4a.40.2 [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-stop.html?mimeType=video/x-matroska;codecs=hvc1.1.6.L186.B0,opus [wpt.fyi]
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
FAIL
- MediaRecorder will not fire an error event if a recorder is stopped synchronously after a track is removed:
- /mediacapture-record/MediaRecorder-video-key-frame-distance.html [wpt.fyi]
- MediaRecorder interprets videoKeyFrameIntervalDuration:
FAIL - MediaRecorder interprets videoKeyFrameIntervalCount:
FAIL
- MediaRecorder interprets videoKeyFrameIntervalDuration:
- /mediacapture-record/idlharness.window.html [wpt.fyi]
- MediaRecorder interface: attribute audioBitrateMode:
FAIL - MediaRecorder interface: [object MediaRecorder] must inherit property "audioBitrateMode" with the proper type:
FAIL - BlobEvent interface: attribute timecode:
FAIL - BlobEvent interface: [object BlobEvent] must inherit property "timecode" with the proper type:
FAIL
- MediaRecorder interface: attribute audioBitrateMode:
- /mediacapture-record/passthrough/MediaRecorder-passthrough.https.html [wpt.fyi]
- PeerConnection passthrough MediaRecorder receives VP9 after onstart with a video stream.:
FAIL - PeerConnection passthrough MediaRecorder receives VP9 after onstart with a audio/video stream.:
FAIL
- PeerConnection passthrough MediaRecorder receives VP9 after onstart with a video stream.:
Tests Disabled in Gecko Infrastructure
- /mediacapture-record/MediaRecorder-events-and-exceptions.html?mimeType=video/webm;codecs=vp8,opus [wpt.fyi]:
SKIP - /mediacapture-record/MediaRecorder-pause-resume.html?mimeType=video/webm;codecs=vp8,opus [wpt.fyi]:
SKIP - /mediacapture-record/MediaRecorder-stop.html?mimeType=video/webm;codecs=vp8,opus [wpt.fyi]:
SKIP - /mediacapture-record/MediaRecorder-peerconnection.https.html?kinds=video&mimeType=video/webm;codecs=vp8 [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview]
Comment 4•12 days ago
|
||
| bugherder | ||
Description
•