TA的每日心情 | 郁闷 2024-1-6 12:13 |
---|
签到天数: 11 天 [LV.3]偶尔看看II
金牌会员
 
- 积分
- 36552
|
本帖最后由 cnlolicon 于 2023-6-5 23:47 编辑
大佬,请教个问题:
尝试串联模块,可以成功,代码如下:
- import vapoursynth as vs
- from vapoursynth import core
- import k7sfunc as k7f
- clip = video_in
- clip = k7f.FMT_CTRL(clip, h_max=720, fmt_pix=0)
- clip = k7f.DEBAND_STD(clip, bd_range=15, bdy_rth=48, bdc_rth=48, grainy=48, grainc=48, spl_m=4, grain_dy=True, depth=10)
- clip = k7f.NNEDI3_STD(clip, ext_proc=True, nsize=4, nns=2, cpu=True, gpu=-1)
- clip = k7f.SVP_PRO(clip, fps_num=60000, fps_den=1001, abs=True, cpu=0, nvof=False, gpu=0)
- clip.set_output()
复制代码 但尝试仿照 vpy的设计和优化思路 里分情况调用不同模块,就无法生效了,代码如下:
- import vapoursynth as vs
- from vapoursynth import core
- import k7sfunc as k7f
- clip = video_in
- if clip.height < 730 and container_fps < 32 :
- clip = k7f.FMT_CTRL(clip, h_max=720, fmt_pix=0)
- clip = k7f.DEBAND_STD(clip, bd_range=15, bdy_rth=48, bdc_rth=48, grainy=48, grainc=48, spl_m=4, grain_dy=True, depth=10)
- clip = k7f.NNEDI3_STD(clip, ext_proc=True, nsize=4, nns=2, cpu=True, gpu=-1)
- clip = k7f.SVP_ANIME(clip, fps_in=container_fps, fps_num=60000, fps_den=1001, abs=True, cpu=0, nvof=False, gpu=0)
- if clip.height > 730 and clip.height < 1200 and container_fps < 32 :
- clip = k7f.DEBAND_STD(clip, bd_range=15, bdy_rth=48, bdc_rth=48, grainy=48, grainc=48, spl_m=4, grain_dy=True, depth=10)
- clip = k7f.SVP_ANIME(clip, fps_in=container_fps, fps_num=60000, fps_den=1001, abs=True, cpu=0, nvof=False, gpu=0)
- if not (clip == video_in) :
- clip.set_output()
复制代码
能否指点一下
|
|