[Ffmpeg-devel] [PATCH] movenc timecode track support

Michael Niedermayer michaelni
Wed Dec 13 16:24:10 CET 2006


On Wed, Dec 13, 2006 at 02:59:18PM +0100, Baptiste Coudurier wrote:
> Michael Niedermayer wrote:
> >>>>>>>>> [...]
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>> Any problem with that patch ?
> >>>>>>> what good does it do? / what is a timecode track good for?
> >>>>>>>
> >>>>>> Useful to specify start time of the media, used in editing systems
> >>>>>> (Final Cut). Mov timestamps always start from 0. Basically same use as
> >>>>>> mpeg2 gop headers timecode or h264 sei picture timing.
> >>>>> except that these dont contain things with names like color, font face
> >>>>> graphics mode, ... what the hell do these do in that "timecode track"?!
> >>>>>
> >>>> You can display time code in quicktime player, and those defines how to.
> >>> ok and how now is that start time brought from the user into the final file?
> >>>
> >>> definitly not the same way as with mpeg and thats unacceptable, whatever the
> >>> API it must be the same between different containers
> >>>
> >> A packet containing 32 bit int frame count start. What is unacceptable ?
> > 
> > theres no common API
> > 
> > you cant expect every user of libav* to know how the starttime is stored
> > in every format, then if the user doesnt know how should he use this?
> > and why should every application have to duplicate the respective code?
> > and how to convert between mov<->mpeg the starttime would be lost ...
> > 
> Common API between what ? Lavc and lavf ? IMHO there should be 2 APIs.
> If the user wants to set time code in gop headers and a different one in
> mov file, he should be able to do so, even if that sounds stupid at the
> beginning (Im thinking about drop frame and non drop frame variants).

no, setting different start times at muxer and codec layer is useless
unless you want to create broken files with contradcting information
its the same as with width/height or sample rate, nothing special here

> There is no API for lavf yet. Like we do not have CODEC_TYPE_TIME_CODE,
> and no demuxer/muxer at all supports something like that. Now if you
> agree to add that codec type, I'll be happy to work on demuxing time
> code in GXF and MXF.

CODEC_TYPE_TIME_CODE is unacceptable

> There is an API to set time code in lavc for mpeg2. You can extend it to
> set sei picture timing in h264 or mpeg4 gop header if you want.
> Now an API lavc<->lavf is complicated, 

no it is not, its the same as with width/height, either demuxer sets it
or decoder/parser set it in av_find_stream_info()

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato

More information about the ffmpeg-devel mailing list