TA的每日心情 | 开心 19 小时前 |
---|
签到天数: 760 天 [LV.10]以坛为家III
荣誉会员
- 积分
- 81557
|
本帖最后由 Starlight 于 2020-5-13 14:18 编辑
我用的是60hz屏幕,对大于59.94fps的视频进行补帧时会鬼畜,想请教有办法在vpy中做判断直接输出吗?
这是我目前用的svpflow.vpy- import vapoursynth as vs
- from vapoursynth import core
- core.num_threads = 16
- core.max_cache_size = 8192
- super_params = "{pel:2,gpu:1,scale:{up:2,down:4}}"
- analyse_params = "{block:{w:32,h:32,overlap:2},main:{levels:4,search:{type:4,distance:-8,coarse:{type:4,distance:-5,bad:{range:0}}},penalty:{plevel:1.3,pzero:110,pnbour:75}},refine:[{thsad:200,search:{type:4,distance:2}}]}"
- smoothfps_params = "{rate:{num:60000,den:1001,abs:true},algo:21,mask:{area:100},scene:{limits:{m1:1800,m2:3600,scene:5200,zero:100,blocks:45}}}"
- def interpolate(clip):
- clip_f = clip.resize.Point(format=vs.YUV420P8, dither_type="random")
- super = core.svp1.Super(clip_f, super_params)
- vectors = core.svp1.Analyse(
- super["clip"], super["data"], clip_f, analyse_params)
- smooth = core.svp2.SmoothFps(
- clip_f, super["clip"], super["data"], vectors["clip"], vectors["data"], smoothfps_params, src=clip_f, fps=container_fps)
- assume = core.std.AssumeFPS(
- smooth, fpsnum=smooth.fps_num, fpsden=smooth.fps_den)
- return assume
- interpolate(video_in).set_output()
复制代码
|
|