Skip to content

Instantly share code, notes, and snippets.

@ghedo
Last active November 15, 2021 19:31
Show Gist options
  • Save ghedo/fe0d232bda81f15e838b to your computer and use it in GitHub Desktop.
Save ghedo/fe0d232bda81f15e838b to your computer and use it in GitHub Desktop.
VapourSynth script to convert videos to 60fps (with mpv)
# Usage: mpv --vf=vapoursynth=60fps.py --hwdec=no <file>
import vapoursynth as vs
core = vs.get_core()
src_fps = 24
dst_fps = 60
clip = core.std.AssumeFPS(video_in, fpsnum=src_fps)
super = core.mv.Super(clip, pel=2)
bv = core.mv.Analyse(super, isb=True, overlap=0)
fv = core.mv.Analyse(super, isb=False, overlap=0)
# FlowFPS() is too slow to be run in real-time
#clip = core.mv.FlowFPS(clip, super, bv, fv, dst_fps)
clip = core.mv.BlockFPS(clip, super, bv, fv, dst_fps)
clip.set_output()
@Soukyuu
Copy link

Soukyuu commented Jul 11, 2015

Thanks for that script, it appears to be working quite well, but my console output is full of

[vapoursynth] Filter error at frame 1128: EOF or filter reinit/uninit
[vapoursynth] Error filtering frame.
[vapoursynth] Error filtering frame.
[vapoursynth] Filter error at frame 1126: EOF or filter reinit/uninit
[vapoursynth] Filter error at frame 1129: EOF or filter reinit/uninit
[vapoursynth] Filter error at frame 1128: EOF or filter reinit/uninit
[vapoursynth] Filter error at frame 1127: EOF or filter reinit/uninit

etc. Any idea why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment