dubhater / vapoursynth-mvtools

Motion compensation and stuff
181 stars 27 forks source link

How to display the true FPS in the mpv? #46

Closed hooke007 closed 4 years ago

hooke007 commented 4 years ago

I have made the video played at 60fps, but it still shows "23.976".

Here is my "mvtools.vpy":

import vapoursynth as vs core = vs.get_core() clip = video_in

dst_fps = display_fps

while (dst_fps > 60): dst_fps /= 2

if not (clip.width > 1920 or clip.height > 1080 or container_fps > 59): src_fps_num = int(container_fps 1e8) src_fps_den = int(1e8) dst_fps_num = int(dst_fps 1e4) dst_fps_den = int(1e4) clip = core.std.AssumeFPS(clip, fpsnum = src_fps_num, fpsden = src_fps_den) print("Reflowing from ",src_fps_num/src_fps_den," fps to ",dst_fps_num/dst_fps_den," fps.")

sup  = core.mv.Super(clip, pel=2, hpad=16, vpad=16)
bvec = core.mv.Analyse(sup, blksize=16, isb=True , chroma=True, search=3, searchparam=1)
fvec = core.mv.Analyse(sup, blksize=16, isb=False, chroma=True, search=3, searchparam=1)
clip = core.mv.BlockFPS(clip, sup, bvec, fvec, num=dst_fps_num, den=dst_fps_den, mode=3, thscd2=12)

clip.set_output()

dubhater commented 4 years ago

You press Shift+O to display the time and then press . and pay attention to the milliseconds. And you probably have to use --osd-fractions=yes too.

Try asking https://github.com/mpv-player/mpv.

hooke007 commented 4 years ago

dubhater commented 4 years ago

Yeah. Now press . again and see how much the milliseconds change. Frame rate = 1000 / milliseconds per frame. It won't be precise because the milliseconds aren't precise, but it's something.

hooke007 commented 4 years ago

It seems about 0.017 once I press the "." But it is interesting that it shows the true fps in Linux. https://github.com/mpv-player/mpv/issues/7680#issuecomment-623490009

dubhater commented 4 years ago

Probably 60 fps then.

hooke007 commented 4 years ago

Hmm~~ I tried the another version of MPV (which is provided by svp), It will always show the true FPS.

...Oh, I succeeded after clean my portable_config folder, I think it conflicted some scripts or command lines.

hooke007 commented 4 years ago

I figured out. --untimed It will result in the wrong display.