[Ffmpeg-devel] global headers
Sun Mar 19 13:45:12 CET 2006
On Sun, Mar 19, 2006 at 12:05:22AM +0000, M?ns Rullg?rd wrote:
> 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.
fine, so what do you suggest? demuxer -> muxer must work even if the
AAC variants differ ...
so if a demuxer has ADTS internally what should be done, remove ADTS
headers in the demuxer? in a middle layer? or the muxer?
should it be optional or always be removed?
always will break if the headers change (switching channels, movies, ...)
allowed or not it will happen and must be supported
More information about the ffmpeg-devel