slomo.vpy
from vapoursynth import core
# vf is set in view/render script, points to video file in current directory
source = core.ffms2.Source(vf)
msuper = core.mv.Super(source, pel=2)
# analyze motion vectors
back = core.mv.Analyse(msuper,blksize=8, overlap=2, isb=True, search=3)
fwd = core.mv.Analyse(msuper,blksize=8, overlap=2, isb=False,search=3)
# take motion vectors and interpolate to ~60fps
video = core.mv.FlowFPS(source,msuper,back,fwd,num=60000,den=1001,ml=100)
# play back at 24fps
slomo = core.std.AssumeFPS(video,fpsnum=24000,fpsden=1001)
slomo.set_output()
viewing
vspipe --y4m slomo.vpy --arg "vf=videofile.avi" - | ffplay -i -
rendering
vspipe --y4m slomo.vpy --arg "vf=videofile.avi" - | ffmpeg -i - video_slowmoed.mkv