Status Update
Comments
va...@google.com <va...@google.com> #2
cl...@electronjs.org <cl...@electronjs.org> #3
From testing, I've found this problem may be caused by the mp4 muxer (via the MediaRecorderEnableMp4Muxer
feature flag, recently enabled in
The mp4 files produced are not usable by many other common media software, e.g. the built-in media players in Android (ExoPlayer), iOS (AVPlayer), and macOS (QuickTime), when this feature is enabled.
I've attached a 5-second video recorded on Chromium 126.0.6478.57 of my cat using the demo mentioned in #1, with the format set as video/mp4;codecs=avc1,mp4a.40.2
. Chromium can play the video back, but QuickTime reports the video as unplayable.
Using ffprobe on the created video produces the following error that may give more context:
$ ffprobe test.mp4
[h264 @ 0xSNIP] sps_id 32 out of range
[h264 @ 0xSNIP] Invalid NAL unit size (1107304329 > 36197).
[h264 @ 0xSNIP] missing picture in access unit with size 36206
go...@google.com <go...@google.com> #4
Steps to reproduce
================
1. Launched Chrome
2. Navigated to the demo URL - "
3. Recorded a stream from a camera with the codec "video/mp4;codecs=avc1,mp4a.40.2" or "video/mp4"
4. Saved recording as .mp4 file
5. Opened saved file in QuickTime Player
6. Observed - Cannot be opened.
Attached screencast for reference
Reporter@: Could you please review the attached reference and let us know if anything being missed here.
Could we consider point 6 as a bad behaviour and issue you are pointing to?, otherwise please provide us with expected and actual results for better understanding of the issue.
**Note: Requesting you to copy-paste the entire content of chrome://version details to a .txt file format and attach it.
Thanks..!!
be...@gmail.com <be...@gmail.com> #5
It is expected that the recorded mp4 can be viewed in any browser that supports mp4, for example Safari, and can also be opened in any system player
pe...@google.com <pe...@google.com> #6
Thank you for providing more feedback. Adding the requester to the CC list.
da...@chromium.org <da...@chromium.org>
su...@microsoft.com <su...@microsoft.com> #7
da...@chromium.org <da...@chromium.org> #8
+Dan who can help out if you have corrupt samples.
su...@microsoft.com <su...@microsoft.com> #9
ap...@google.com <ap...@google.com> #10
Branch: main
commit 0cf881aea158b882f1b0768ef25e61421b3187e5
Author: Sunggook Chue <sunggch@microsoft.com>
Date: Wed Jul 10 18:32:37 2024
Convert NALU start code with NAL size for MP4 container.
h264 encoders produced NALU data that started with started
code and WebM container expected it.
Meanwhile, many MP4 player expected that MP4 file has NAL
size instead of NALU start code.
The change converts incoming encoded data to the NAL size
replaced data before adding to the MP4 mdat box data.
Bug: 348923066
Change-Id: I3f5f27f2863efd241300776f140aa19145a6eaf3
Reviewed-on:
Reviewed-by: Rahul Singh <rahsin@microsoft.com>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Sunggook Chue <sunggch@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1325638}
M media/muxers/mp4_muxer_delegate.cc
M media/muxers/mp4_muxer_delegate.h
M media/muxers/mp4_muxer_delegate_fragment.cc
M media/muxers/mp4_muxer_delegate_fragment.h
M media/muxers/mp4_muxer_delegate_unittest.cc
su...@microsoft.com <su...@microsoft.com>
ap...@google.com <ap...@google.com> #11
Branch: main
commit 8fd19c05188e3edea14b73fe622af46186f56b0e
Author: Sunggook Chue <sunggch@microsoft.com>
Date: Tue Jul 16 22:18:10 2024
Make quickPlayer/Safari runs MP4 file from Chromium MediaRecorder.
There are multiple changes here in order to compatible with
quick player.
1. Make default version as 0 with 1 (64bits) support only for the required boxes.
2. Add btrt box to the visual sample entry.
3. Fix small wrong formats in the tfra and tkhd boxes.
Bug: 348923066
Change-Id: Iac6fcb2cf3f2b4e870b9011573a4cf1b45ccd577
Reviewed-on:
Commit-Queue: Sunggook Chue <sunggch@microsoft.com>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1328476}
M media/formats/mp4/fourccs.h
M media/formats/mp4/writable_box_definitions.h
M media/muxers/box_byte_stream.h
M media/muxers/mp4_fragment_box_writer.cc
M media/muxers/mp4_movie_box_writer.cc
M media/muxers/mp4_muxer_delegate.cc
M media/muxers/mp4_muxer_delegate_fragment.cc
M media/muxers/mp4_muxer_delegate_fragment.h
M third_party/blink/renderer/modules/mediarecorder/media_recorder_handler_unittest.cc
su...@microsoft.com <su...@microsoft.com>
ni...@gmail.com <ni...@gmail.com> #12
be...@gmail.com <be...@gmail.com> #13
ni...@gmail.com <ni...@gmail.com> #14
he...@aneesiqbal.ai <he...@aneesiqbal.ai> #15
This was marked as fixed so sorry for reviving a dead issue, but I'm running into this with the current latest Chrome stable v131 with
users on both Windows & macOS. The MediaRecorder output is only playable in chrome and fails in QuickTime or ffmpeg, with the following logs
[h264 @ 0x129e05810] Unknown SAR index: 192.
[h264 @ 0x129e05810] Truncated VUI (-8)
[h264 @ 0x129e05810] Overread VUI by 8 bits
[h264 @ 0x129e05810] Invalid NAL unit size (1119887500 > 68351).
[h264 @ 0x129e05810] missing picture in access unit with size 68360
(repeated countless times)
The only reliable workaround for our usecase right now is to record in webm. Is what we're running into the same/similar bug that's resurfaced or
are we running into a unique bug?
Best Regards
da...@chromium.org <da...@chromium.org> #16
Re:
I couldn't repro using 132.0.6834.83. We'll likely need at least a sample app that uses the same codec string you're using as well as chrome://gpu information to debug.
zh...@bytedance.com <zh...@bytedance.com> #17
Is there a screen recording or mp4 recorded sample that could reproduce the issue? Thanks
Description
Steps to reproduce the problem
Problem Description
mp4 video recorded in Chrome 126 cannot be played by the system player or other browser. Only Chrome. It’s not clear what’s wrong and how it can be fixed. Do you need some specific configuration of the MediaRecorder or creation of a MediaStram with certain parameters?
Summary
mp4 video recorded in Chrome 126 cannot be played by the system player or other browser
Custom Questions
Which component does this fall under?
Not sure - I don't know
Does this work in other browsers?
Yes - This is just a Chrome problem
Additional Data
Category: API
Chrome Channel: Stable
Regression: N/A