Created
September 11, 2015 05:04
-
-
Save Cellane/1d68665391e37e7572ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment