media-source: Test H.264 SEI recovery points as MSE random access points#59019
Open
LTe wants to merge 1 commit intoweb-platform-tests:masterfrom
Open
media-source: Test H.264 SEI recovery points as MSE random access points#59019LTe wants to merge 1 commit intoweb-platform-tests:masterfrom
LTe wants to merge 1 commit intoweb-platform-tests:masterfrom
Conversation
Add a test that verifies MSE accepts non-IDR H.264 frames with SEI
recovery points (recovery_frame_cnt=0) as valid random access points.
The test appends only the SEI recovery point segment (without an IDR
segment first), forcing MSE to treat it as a new coded frame group.
If the browser doesn't recognize the recovery point as a keyframe,
all frames are silently dropped and the buffered range is empty.
Test data generated with:
ffmpeg -y -f lavfi -i "testsrc2=size=320x240:rate=24:duration=2" \
-c:v libx264 -preset fast -profile:v high -level 41 \
-x264-params "keyint=24:min-keyint=24:bframes=3:open-gop=1" \
-pix_fmt yuv420p -an \
-movflags +frag_keyframe+empty_moov+default_base_moof \
output.mp4
Then split into init segment (ftyp+moov) and second media segment
(moof+mdat starting with SEI recovery point).
Firefox has supported this since 2017 (Bug 1347518). Safari supports
it natively (WebKit trusts container sync sample metadata). Chromium
support is tracked in https://crbug.com/40625346.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a test that verifies MSE accepts non-IDR H.264 frames with SEI
recovery points (recovery_frame_cnt=0) as valid random access points.
The test appends only the SEI recovery point segment (without an IDR
segment first), forcing MSE to treat it as a new coded frame group.
If the browser doesn't recognize the recovery point as a keyframe,
all frames are silently dropped and the buffered range is empty.
This is the MSE equivalent of the WebCodecs SEI recovery point test
added in #55741.
Browser support
Test data
Open-GOP H.264 fMP4 generated with x264 (
open-gop=1), split intoinit segment (ftyp+moov) and a media segment starting with SEI
recovery point + non-IDR frames. See
mp4/h264-sei-recovery-README.mdfor generation instructions.
Related