Closed
Bug 956194
Opened 10 years ago
Closed 10 years ago
[MediaEncoder] Support ISO BMFF Byte Stream Format
Categories
(Core :: Audio/Video: Recording, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: ayang, Unassigned)
Details
Attachments
(1 file)
3.08 KB,
patch
|
cpearce
:
feedback+
|
Details | Diff | Splinter Review |
Updated•10 years ago
|
Blocks: MediaEncoder
Comment 1•10 years ago
|
||
I don't think our muxer should mux MP4 files that conform to the MSE constraints. Not all players on other platforms handle playing files that conform to the MSE constraints. We should instead mux regular fragmented MP4 and possibly even non-fragmented MP4, and change our mp4_demuxer to handle that format. I assume Android's demuxer already can demux fragmented MP4, so the MediaOMXReader probably already plays the fragmented MP4s muxed by our muxer?
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #1) > I don't think our muxer should mux MP4 files that conform to the MSE Ok, I'll close this bug. > constraints. Not all players on other platforms handle playing files that > conform to the MSE constraints. We should instead mux regular fragmented MP4 > and possibly even non-fragmented MP4, and change our mp4_demuxer to handle > that format. From my understanding, non-fragmented MP4 is not for streaming because its meta is placed at the end of file. Player can't initialize until whole file is downloaded. Or a muxer can reserve some space at the beginning and write back the meta data later (like Android MP4 muxer). Unfortunately MediaRecorder can't because there is no chance to write data to a pop out blob. Or we don't need to care about streaming? > > I assume Android's demuxer already can demux fragmented MP4, so the > MediaOMXReader probably already plays the fragmented MP4s muxed by our muxer? Yes, Android 4.3 supports fragmented MP4. I have tried some tests on B2G device it asserts at http://dxr.mozilla.org/mozilla-central/source/content/media/MediaDecoderStateMachine.cpp#1953, GetDuration() returns -1. I guess MediaDecoderStateMachine doesn't support fragment video yet.
Reporter | ||
Comment 3•10 years ago
|
||
(In reply to Alfredo Yang from comment #2) > > I assume Android's demuxer already can demux fragmented MP4, so the > > MediaOMXReader probably already plays the fragmented MP4s muxed by our muxer? > > > Yes, Android 4.3 supports fragmented MP4. > I have tried some tests on B2G device it asserts at > http://dxr.mozilla.org/mozilla-central/source/content/media/ > MediaDecoderStateMachine.cpp#1953, GetDuration() returns -1. I guess > MediaDecoderStateMachine doesn't support fragment video yet. it should be mMediaSeekable problem, needs more time to dig it out.
Comment 4•10 years ago
|
||
(In reply to Alfredo Yang from comment #2) > (In reply to Chris Pearce (:cpearce) from comment #1) > > I don't think our muxer should mux MP4 files that conform to the MSE > > Ok, I'll close this bug. ok. > > > constraints. Not all players on other platforms handle playing files that > > conform to the MSE constraints. We should instead mux regular fragmented MP4 > > and possibly even non-fragmented MP4, and change our mp4_demuxer to handle > > that format. > > From my understanding, non-fragmented MP4 is not for streaming because its > meta is placed at the end of file. Player can't initialize until whole file > is downloaded. > Or a muxer can reserve some space at the beginning and write back the meta > data later (like Android MP4 muxer). Unfortunately MediaRecorder can't > because there is no chance to write data to a pop out blob. > > Or we don't need to care about streaming? For writing data streaming from camera, I understand that writing fragmented MP4 is desirable. I just wonder if the videos recorded by our muxer would be playable on older PCs if we mux non fragmented MP4. I don't think we need to prioritize muxing non fragmented MP4. > Yes, Android 4.3 supports fragmented MP4. Great. > I have tried some tests on B2G device it asserts at > http://dxr.mozilla.org/mozilla-central/source/content/media/ > MediaDecoderStateMachine.cpp#1953, GetDuration() returns -1. I guess > MediaDecoderStateMachine doesn't support fragment video yet. That assert checks that if we can seek we have a duration. mMediaSeekable should be set to true by MediaOMXReader::ReadMetadata() if the underlying media can seek (it has an index, and the underlying decoder knows how to seek using it). mTransportSeekable should be set to true if the underlying transport can seek (if HTTP Byte Range Requests are available if we're downloading over HTTP, or if we're playing a local file and thus can seek in that). It may be the case that the media is seekable, but doesn't have a duration? Or perhaps the opposite is true? It may be the case that this assert doesn't make sense for fMP4?
Reporter | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Reporter | ||
Comment 5•10 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #4) > mMediaSeekable should be set to true by MediaOMXReader::ReadMetadata() if > the underlying media can seek (it has an index, and the underlying decoder > knows how to seek using it). > > mTransportSeekable should be set to true if the underlying transport can > seek (if HTTP Byte Range Requests are available if we're downloading over > HTTP, or if we're playing a local file and thus can seek in that). > > It may be the case that the media is seekable, but doesn't have a duration? > Or perhaps the opposite is true? > > It may be the case that this assert doesn't make sense for fMP4? MediaOMXReader::ReadMetadata() doesn't call MediaDecoder::SetMediaSeekable(), it'd be the main reason of this problem. I found android::MediaExtractor has flag to check if this is a seekable media [1] and MediaOMXReader uses MediaExtractor to initialize decoder on MediaOmxReader::InitOmxDecoder(), we can reuse this extractor to solve this problem. I will create a patch for feedback. [1] http://androidxref.com/4.3_r2.1/xref/frameworks/av/media/libstagefright/MPEG4Extractor.cpp#375
Reporter | ||
Comment 6•10 years ago
|
||
Attachment #8359713 -
Flags: feedback?(cpearce)
Reporter | ||
Comment 7•10 years ago
|
||
BTW, the test page is http://people.mozilla.org/~ayang/mp4/mp4.html. Left video is non-fragmented mp4 generated by Android video recorder, right one is fragmented mp4 generated by ISOMediaWriter.
Comment 8•10 years ago
|
||
Comment on attachment 8359713 [details] [diff] [review] set_omx_seekable_flag Review of attachment 8359713 [details] [diff] [review]: ----------------------------------------------------------------- Yup, this MediaOmxReader needs to do this.
Attachment #8359713 -
Flags: feedback?(cpearce) → feedback+
Reporter | ||
Comment 9•10 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #8) > Comment on attachment 8359713 [details] [diff] [review] > set_omx_seekable_flag > > Review of attachment 8359713 [details] [diff] [review]: > ----------------------------------------------------------------- > > Yup, this MediaOmxReader needs to do this. Thanks for feedback, I'll create a bug for this.
Updated•10 years ago
|
No longer blocks: MediaEncoder
No longer depends on: 891704
Updated•10 years ago
|
Component: Video/Audio → Video/Audio: Recording
You need to log in
before you can comment on or make changes to this bug.
Description
•