[FFmpeg-devel] [RFC][PATCH] ticks_per_frame / timebase

Reimar Döffinger Reimar.Doeffinger
Thu Feb 26 19:58:40 CET 2009


On Thu, Feb 26, 2009 at 04:55:38PM +0100, Michael Niedermayer wrote:
> On Thu, Feb 26, 2009 at 04:40:51PM +0100, Reimar D?ffinger wrote:
> > On Thu, Feb 26, 2009 at 03:15:09PM +0100, Michael Niedermayer wrote:
> > > Attached is a patch that adds ticks_per_frame, which is a convertion factor
> > > between the timebase and the "framerate" as stored in the header.
> > > the patch also adapts several uses of timebase that where using it in the
> > > meaning of the framerate
> > > this patch is based on the one from ivan
> > > 
> > > i will commit this in a few hours if i receive no objections or better
> > > suggestions. (short delay because of the release ...)
> > 
> > I think you missed at least one place (though that might be broken as it
> > is anyways), the problem is libx264.c:
> >     x4->params.i_fps_num = avctx->time_base.den;
> >     x4->params.i_fps_den = avctx->time_base.num;
> > 
> > The problem here is that obviously libx264 uses this for its rate
> > control - which means after this change bitrate will be regularly off by a
> > factor of 2 for H.264->H.264 encodings.
> 
> do you think that there will be a problem after this change or have you
> actually reproduced one created by this patch or the recent changes to
> svn?
> if you have a actual reproduceable test case iam interrested in the details
> of it

Unfortunately no, since I have no sample where the time base that is
passed to the encoder actually changes.
If your patch will never change the time_base set for the encoder please
forget my comment, I just thought it might.




More information about the ffmpeg-devel mailing list