nixos-config/users/simon/modules/mpv/mvinterpolate.py

25 lines
497 B
Python

# SPDX-FileCopyrightText: 2021 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: CC0-1.0
import vapoursynth as vs
core = vs.core
clip = core.std.AssumeFPS(video_in, fpsnum=int(container_fps * 1000), fpsden=1000)
sup = core.mv.Super(clip, pel=2)
bvec = core.mv.Analyse(sup, isb=True)
fvec = core.mv.Analyse(sup, isb=False)
hfr = core.mv.BlockFPS(
clip,
sup,
bvec,
fvec,
num=int(display_fps * 1000),
den=1000,
thscd1=140,
thscd2=38,
)
hfr.set_output()