Bitstream format between demuxer and decoder

229 views
Skip to first unread message

Francis Tsui

unread,
Aug 6, 2013, 10:28:33 PM8/6/13
to chromi...@chromium.org
There seems to be difference between the output of the chunk demux and the ffmpeg demux when processing MP4 streams.
The Ffmpeg demuxer will convert H.264 to Annex-B format if EnableBitstreamConverter() is called (determined by the decoder), otherwise the output frames are not modified from the MP4 container.
For AAC, the frames are not modified.
The chunk demuxer will always convert H.264 bitstreams to Annex-B format and add ADTS headers to AAC frames.  EnableBitstreamConverter() is ignored by the chunk demuxer.

Is this the desired behaviour or a bug?
Should the chunk demuxer also honor the EnableBitstreamConverter request and only do Annex-B conversion if requested, and leave AAC frames alone?

F

Aaron Colwell

unread,
Aug 7, 2013, 12:00:07 PM8/7/13
to Francis Tsui, Chromium-dev
Hi Francis,

EnableBitstreamConverter() is a piece of legacy that we eventually want to phase out. Ultimately we just want a single bitstream form for each codec to flow through the system. Is this difference causing a problem for you?

Aaron

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
 
 

Francis Tsui

unread,
Aug 7, 2013, 1:24:10 PM8/7/13
to Aaron Colwell, Chromium-dev
Aaron,

I agree that having a single bitstream format for each codec would be ideal.
I issue I'm facing now is that since we do not have a single format, a decoder cannot determine what format is being sent by the demuxer without inspecting the bitstream which is not ideal.  At least with the EnableBitstreamConverter() interface, the contract between the 2 is clear.

So what is the current plan?  Is ADTS and H.264 Annex-B going to be the single format?  What is the implementation plan?

Also a word of caution about the single format idea.  The bitstream reformatting to a canonical format (MP4 Part10 to Annex-B, or AAC to add ADTS headers) currently involves a copy of the bitstream, there is a price to pay especially for high quality/resolution content and on constrained devices.  So having multiple canonical formats allows you to skip this step when not required.

F
Reply all
Reply to author
Forward
0 new messages