[Ffmpeg-devel] global headers

Måns Rullgård mru
Mon Mar 20 01:44:57 CET 2006


Michael Niedermayer <michaelni at gmx.at> writes:

> Hi
>
> On Sun, Mar 19, 2006 at 02:17:12PM +0000, M?ns Rullg?rd wrote:
>> Michael Niedermayer <michaelni at gmx.at> writes:
>> 
>> > Hi
>> >
>> > On Sun, Mar 19, 2006 at 01:33:58PM +0000, M?ns Rullg?rd wrote:
>> >> Michael Niedermayer <michaelni at gmx.at> writes:
>> >> 
>> >> > Hi
>> >> >
>> >> > On Sun, Mar 19, 2006 at 12:05:22AM +0000, M?ns Rullg?rd wrote:
>> >> >> Michael Niedermayer <michaelni at gmx.at> writes:
>> >> >> 
>> >> >> > 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
>> >> 
>> >> To me, the cleanest solution would be a middle layer for transforming
>> >> between the different formats.  Doing it in the demuxer or muxer will
>> >> inevitably lead to the same work being done in multiple places.
>> >
>> > fine, do you volunteer to implement it?
>> 
>> I'm afraid I don't have time right now.
>
> neither do i (for implementing a intermediate layer, a simple write/remove
> global header thingy would have been alot easier ...)

Where would this "simple write/remove global header thingy" go?

>> >> Could we perhaps use AVCodecContext.sub_id here?
>> >
>> > hmm, maybe but somehow i think its not a good idea
>> 
>> OK, but we need some method of indicating which variety we are dealing
>> with.  The GLOBAL_HEADER flag isn't sufficient when there are several
>> formats the global header can take on.
>
> yes, but sub_id is used for things like the layer of mpeg-audio so its
> not a good choice here, we need to add a new field ...

I thought of sub_id since it is intended to distinguish between
variants of the same codec.  On second thought, I agree it's not a
good choice for this.

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list