[MPlayer-users] Q on monitor refresh rate versus fps

Matyas Sustik mplayer.list at sustik.com
Tue Dec 30 21:48:58 CET 2008


Rashkae wrote:
>> 2.  Should one sync the refresh rate to the video fps?  (Multiple?)
> 
> The video driver should do this for you, if it's supported.

So if I play two videos in separate windows requiring different refresh rates
(have not tried this yet) I wonder how could this work?  I just have no idea
how I would implement that properly...

>> 3.  What does mplayer do different when playing the same video source, on
>> different refresh rate monitors?
> This is called Vsync, and I believe it should be part of either the xv
> or gl video output driver.  When working properly vsync should refresh
> the video frame at an interval timed with the monitor refresh.

If I understand you correctly, the refresh can only be done exactly right if
the refresh rate is a multiple of the framerate.   By exactly I mean showing
each movie frame for the same length of time (as intended).

>> The movie is marked 29.97 fps so I figure that the original was recorded in
>> 24fps and then to display it as 30fps every 4th frame is repeated (4/5 =
>> 24/30).  I guess that then to use the 60Hz refresh rate every frame (included
>> the duplicated ones) are shown twice by the hardware.
>>
>> What program is doing the frame duplication?  Is it mplayer figuring out my
>> refresh rate and repeating the frames?
>>
> 
> If the movie is marked 29.97, then its not progressive, it is interlaced
> or Telecined.   Since you aren't seeing the interlace combing effects,
> then you have some kind of de-interlacing filter going over the video.

To clarify: during playback I did not see any messages regarding fps, which
usually indicates progressive content.  But
mplayer -identify -frames 0 LOVE.mpg
prints among others:

ID_VIDEO_FORMAT=0x10000002
ID_VIDEO_BITRATE=8239888
ID_VIDEO_WIDTH=720
ID_VIDEO_HEIGHT=480
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=0.0000

I produced the LOVE.mpg file by issuing:
mencoder -oac copy -ovc copy dvd://3 -ss 90 -endpos 10 -o LOVE.mpg
so no changes to the content.

I wrote the above and then I found the explanation.  The problem is the
behaviour of -ovc copy, I do not say it is a bug, the behaviour is probably
documented...

The command
mencoder -oac copy -ovc copy dvd://3 -ss 90 -endpos 10 -o LOVE.mpg

took the 24fps progressive content and changed it to 29.97 fps.  It appears
to me that every fourth frame was duplicated in order to achieve this.

I could force the output frame rate:
mencoder -oac copy -ovc copy dvd://3 -ss 90 -endpos 10 -o LOVE.mpg -ofps
24000/1001

This produced correct results.

As for my x264 encode: it also lacked the -ofps 24000/1001 in the script.
The script was generated by h264enc I will let the authors of that package know.

Thanks for your response again.
Matyas
-
Every hardware eventually breaks.  Every software eventually works.



More information about the MPlayer-users mailing list