[Ffmpeg-devel] global headers

Måns Rullgård mru
Sun Mar 19 01:05:22 CET 2006

Michael Niedermayer <michaelni at gmx.at> writes:

> Hi
> On Tue, Mar 14, 2006 at 12:08:50AM +0000, M?ns Rullg?rd wrote:
>> Loren Merritt <lorenm at u.washington.edu> writes:
>> > On Mon, 13 Mar 2006, Michael Niedermayer wrote:
>> >
>> >> what about letting encoders always generate global headers / set extradata?
>> >> currently it needs CODEC_FLAG_GLOBAL_HEADER to be set, which well, is
>> >> annoying from a encoder - muxer seperation POV
>> >>
>> >> objections, comments?
>> >
>> > Then it would be the muxer's job to interleave the headers into the
>> > stream if it doesn't want global headers? Are there any codecs where
>> > that doesn't consist of "prepend a copy of extradata to each keyframe"?
>> Yes, AAC (what else?).  The format of the global header is different
>> from the frame header used with any of the stream formats (ADTS, ...)
>> used either raw or in program/transport streams.
> hmm, what is the difference?

see libavformat/adtsenc.c

> could we use the same format and convert the global one in the mov/mp4
> (de)muxer?

We're doing the opposite right now.  I don't like this, since
whichever way it's done, several muxers will need to do the
conversion.  E.g. ADTS format is required for raw ADTS, MPEG-TS and
MPEG-PS.  MP4 requires the other format.  Matroska, as is to be
expected, uses it's own bastardized variant.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list