[Ffmpeg-devel] global headers

Michael Niedermayer michaelni
Tue Mar 14 02:17:45 CET 2006


On Mon, Mar 13, 2006 at 12:55:20PM -0800, Loren Merritt wrote:
> 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"?

iam not aware of any but theres another problem

if we demux a stream and that has global headers before the keyframes its
trivial to remove these and we support that already but what if these headers
arent equal, yes its not allowed but that doesnt help we have to support it
as its not that rare, furthermore IMHO we should change a stream as little
as possible by default

so what i would like to do as first step towards simplifying things is to
set extradata always to the global header but NOT remove the headers from
the stream
and then in a second step let muxers remove the headers from the stream if
they arent allowed, this should be very easy, just a call to
av_parser_change() at a common spot

at the demuxer side extradata is already filled in if its empty and an
AVParser can extract a global header



More information about the ffmpeg-devel mailing list