[MPlayer-dev-eng] Better double frame rate output and framedrop

Vicente Sendra visenri at yahoo.es
Mon Sep 24 23:06:59 CEST 2012


As I said in my first mail about this subject, this needs a fix, and to fix this once an for all i propose these options:

1- Add a third parameter to put_image:
int put_image(struct vf_instance *vf,mp_image_t *mpi, double pts);

this requires a lot of changes in many files.

2- Add a new VFCTRL command to set actual frame time for filters that use it, for example:
VFCTRL_SET_FRAMETIME

It would be used in filters like yadif and tfields to set actual video frame time, so the filter can generate frame pts correctly, dividing this value by 2.

3- Let the filter guess the frame time by calculating the difference of pts passed to put_image.

This can be problematic as frame drop can affect this difference, because no filtering is done if frame is skipped.


I think the best option, easy do do and fixes the problem 100%, right now is number 2.

I'll give solution 2 a shot.
If everyone is ok with this solution I'll add some new patches for the affected files.




Dan Oscarsson  said:
> My own patches to make mplayer work well with 24 hz movies
> on a 24 hz
> screen (and also match 25/48/50 hz as well as 30/60 hz)
> checks the
> current refresh rate of the screen.

Can we have a look at that patches.

Without correct-pts option my proposed framedrop system plays without problem Xhz material on a Xhz screen.

Any combination of frame rate and video refresh rate should be no problem,
as frames are dropped only if frame output rate is higher than screen refresh rate.



--- El lun, 24/9/12, Dan Oscarsson <Dan.Oscarsson at tieto.com> escribió:

> De: Dan Oscarsson <Dan.Oscarsson at tieto.com>
> Asunto: Re: [MPlayer-dev-eng] Better double frame rate output and framedrop
> Para: mplayer-dev-eng at mplayerhq.hu
> Fecha: lunes, 24 de septiembre, 2012 08:30
> sön 2012-09-23 klockan 23:16 +0100
> skrev Vicente Sendra:
> > In non pts mode this makes no difference (frame time is
> always correct).
> > 
> > In pts mode:
> > Ntsc (60hz) playback is done at the right rate.
> > Pal (50hz) playback, frame time changes from  16.7
> ms to 23.3.
> > 
> > This results in minimum frame time jitter for ntsc.
> > 
> > Pal jitter is not problematic.
> > Ntsc jitter can be problematic, because frame rate is
> very close to
> > most lcd screens (60hz), and delaying a frame by 20ms
> will miss a
> > frame with that lcd.
> 
> But my TV uses 24 hz or 50 hz, so it is not a good idea.
> 24/25/48/50 hz
> is better when related to movies.
> 
> My own patches to make mplayer work well with 24 hz movies
> on a 24 hz
> screen (and also match 25/48/50 hz as well as 30/60 hz)
> checks the
> current refresh rate of the screen.
> 
>   Dan
> 
> > --- El dom, 23/9/12, Carl Eugen Hoyos <cehoyos at ag.or.at>
> escribió:
> > 
> > > De: Carl Eugen Hoyos <cehoyos at ag.or.at>
> > > Asunto: Re: [MPlayer-dev-eng] Better double frame
> rate output and framedrop
> > > Para: mplayer-dev-eng at mplayerhq.hu
> > > Fecha: domingo, 23 de septiembre, 2012 22:35
> > > Vicente Sendra <visenri <at>
> > > yahoo.es> writes:
> > > 
> > > >  static double calc_pts(double base_pts,
> int
> > > field)
> > > >  {
> > > > -    // FIXME this assumes 25 fps /
> 50 fields
> > > per second
> > > > -    return base_pts + 0.02 *
> field;
> > > > +    // FIXME this assumes 30 fps /
> 60 fields
> > > per second
> > > > +    return base_pts + 0.0167 *
> field;
> > > 
> > > Why do you think this is a good idea?
> > > 
> > > Carl Eugen
> > > 
> > > _______________________________________________
> > > MPlayer-dev-eng mailing list
> > > MPlayer-dev-eng at mplayerhq.hu
> > > https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> > > 
> > _______________________________________________
> > MPlayer-dev-eng mailing list
> > MPlayer-dev-eng at mplayerhq.hu
> > https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> > 
> 
> -- 
> Dan Oscarsson
> Tieto               
>        Email: Dan.Oscarsson at tieto.com
> Box 85
> 201 20  Malmo, Sweden
> 
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng


More information about the MPlayer-dev-eng mailing list