[Ffmpeg-devel] global headers

Michael Niedermayer michaelni
Mon Mar 20 02:40:34 CET 2006


Hi

On Mon, Mar 20, 2006 at 12:44:57AM +0000, M?ns Rullg?rd wrote:
> 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?

write extradata: in the encoder and av_find_stream_info()
both already done and in cvs since quite some time encoders just dont
always set extradata yet

remove: av_parser_change() called from "somewhere" either common layer
or user app before muxing, currently the later

this is all 99% done, but it wont work with different formats for the
global header in extradata or the stream like ADTS vs. raw or h.264
in mp4 vs. in everything else
at least it wasnt planned to do such transformations, though i guess
av_parser_change() could be extended to do that too, its just that i
am too lazy ATM to implement that

[...]
-- 
Michael





More information about the ffmpeg-devel mailing list