mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.02k stars 2.88k forks source link

(Feature Request) Automatically select "-speed" to match refresh-rate to be an integer multiple of fps #1180

Closed olifre closed 9 years ago

olifre commented 9 years ago

Hi, maybe I am missed that feature and it's already there: If I play back a video with e.g. 23.9765 fps, and my screen is set to 120 Hz, playback with mpv gets much more fluent when I manually pass -speed 24/23.976 (which speeds up the timebase by ~ 1.001 to get to 24 fps playback rate which nicely fits into 120 Hz). This is a very simple emulation of one of the features of ReClock in a classic Anime-playback setup under Windows, but it is already improving the playback astonishingly well to my feeling.

I would expect that a built-in functionality to match the "speed" to scale the "fps" to fit into the refresh-rate can be much more accurate than this basic approach (the correct selection of a useful screen-refresh-rate is of course still the job of the user / external scripts).

What I am thinking about would be an additional parameter, which can be set to the maximum percentage of speedup / slowdown the user would like to allow (default to 0 = off) for automatic "speed" setting to match the playback fps to the refresh rate. With automatic activation of scaletempo which is already there, this is probably simple to implement.

Do you agree, or is this out of scope / should be done in user scripts / I just missed it (or is there helpful set of user scripts floating around, maybe including condition motion interpolation via vapoursynth)?

Cheers, Oliver

ghost commented 9 years ago

Maybe.

haasn commented 9 years ago

For the record: This script has that exact goal in mind.

https://github.com/haasn/gentoo-conf/blob/master/home/nand/.mpv/scripts/fpsadjust.lua

_Caveat:_ You should absolutely set audio-pitch-correction=no, or it will introduce horrible audio artifacts due to the (default) insertion of scaletempo.

ghost commented 9 years ago

This is developed in the display_sync_wip branch, which will be merged sooner or later. Not tracked by this issue.