[FFmpeg-devel] [PATCH][RFC] set codec time base to format time base at the end
Thu Jun 11 13:21:37 CEST 2009
On Wed, Jun 10, 2009 at 10:08:35PM -0700, Baptiste Coudurier wrote:
> On 5/29/2009 2:40 PM, Michael Niedermayer wrote:
> > On Thu, May 28, 2009 at 06:04:22PM -0700, Baptiste Coudurier wrote:
> >> Hi
> >> $subject,
> >> This will leave codec timebase unset and therefore being unreliable,
> >> which is the case IMHO, but I'm not sure of the implications.
> > iam not sure either but i fear that this may have unexpected sideeffects
> > but then maybe not ...
> >> wrong_framerate.mov on mplayerhqhu which is detected as 59.94 instead of
> >> 29.97 because the first frame duration has 150 duration instead of 100
> >> on a 2997 timescale.
> > strictly speaking 59.94 is more correct for this one
> >> This is problematic when transcoding to mpeg2.
> > yes and this is what i think i discussed with reimar IIRC
> > which is the guessed timebase really depends on what it is used for
> > For transcoding to mpeg2 it must be one of a small fixed set, no matter
> > what
> > And for avi it can be an arbitrary fraction but it is very strongly
> > preferred for that fraction to be a large value (like 1/30 or 1001/24000
> > but not 1/24000)
> > In that sense i belive the timbase guessing code should be extended by
> > a few flags or something that tell it what the user app really wants
> Ok, what about finally adding a avg_frame_rate to AVFormatContext and
iam fine with adding it to AVStream
> display this to the user ? That would be better I think.
iam fine with displaying it in addition, iam also fine with displaying the
current timebases just at higher verbosity
> What about using it when transcoding ? I mean if output is mpeg2 at 25
> fps, code must deal with it correctly no matter what, so sync code must
> be flexible.
> I know by experience that avg frame rate is reasonable for mov/3gp/mp4
> and that's what quicktime displays.
Well, i know average is meaningless for asf/mpeg-ps/ts
an example would be mpeg with some parts telecined, the average framerate
would just be some funny intermediate between the telecined and non
another example are videos that dont store new frames if nothing changed
thus making the average framerate content dependant
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel