[MPlayer-dev-eng] enhancement for yuv4mpeg output driver, take 2
Trent Piepho
xyzzy at speakeasy.org
Thu Jan 20 14:41:43 CET 2005
On Thu, 20 Jan 2005, Michael Niedermayer wrote:
> Hi
>
> On Thursday 20 January 2005 05:33, Trent Piepho wrote:
> > On Thu, 20 Jan 2005, Michael Niedermayer wrote:
> > > > I found av_reduce() in lavc, but it doesn't work for this. Depending
> > > > on what I specify for the max, it turns 23.976 into 2996973/125000,
> > > > 983/41, 456427/19037, or 16831/702. There doesn't seem to be any way
> > > > to get the correct value of 24000/1001.
> > >
> > > try to set max to 30000
> >
> > Did that, that's where the 16831/702 came from. Even if it did work, you
>
> please post your code
My code is in the patch I attached to my email. Do you mean how I'm using the
functions from lavc to try to convert mplayer's floating-point framerate to the
correct fractional value? This is what I tried:
{
AVRational a = av_d2q(image_fps, 60000);
fprintf(stderr, "av_d2q to %d/%d\n", a.num, a.den);
}
It doesn't give the correct results. The code I wrote is simpler and does
produce the correct results. It doesn't make vo_yuv4mpeg depend on lavc
either. Why is there a problem? The current yuv4mpeg output driver always
gets the framerate wrong in every case when it's not an integer, how is this
better than what I've done?
More information about the MPlayer-dev-eng
mailing list