Video: Add avc3
and hev1
muxer support for MediaRecorder
#49675
+46
−18
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.
Background: Safari initially supported
avc1
mp4 recording. Then,Chrome added avc1 support since version M126 this year. The benefit
of
avc1
is that it is the only H.264 tag natively supported byApple devices. The same situation applies to
hvc1
.However, there are some limitations for
avc1
andhvc1
. That is,they only allow "out of band" parameter sets and cannot change
parameter sets during encoding. So, if the capture device can
produce a video stream with a dynamically changing resolution,
then only
avc3
andhev1
can satisfy the needs as they support"in band" parameter sets so muxer can insert parameter sets into
the bitstream if they are changed.
This CL extends the existing
H264AnnexBToAvcBitstreamConverter
and
H265AnnexBToHevcBitstreamConverter
by adding a property toallow control the insertion of parameter sets into the bitstream.
Also wire the
Mp4MuxerDelegate
to write correct tag based onthe settings.
Bug: 381179823
Bug: 40276507
Change-Id: I6d104546e9cf46b18fae4dc1fd8af1124b918e7c
Reviewed-on: https://chromium-review.googlesource.com/6079351
WPT-Export-Revision: 4c012983f626e69ce0aa76a42709164d0ca03541