VS插件KNLMeansC用命令行压制x265 10bit时报错
发表于 : 2019-07-17 23:21
在vsedit里面可以正常预览,因此插件应该是正常安装的。
压制一开始没问题,但是在压制到一千帧左右才报错,换源、把插件换成新的也是一样。
报错信息如下
vpy脚本如下(LoliHouse提供)
import vapoursynth as vs
import sys
import havsfunc as haf
import mvsfunc as mvf
import nnedi3_resample as nnrs
import CSMOD as cs
core = vs.get_core(accept_lowercase=True)
source = r"input.mkv" # Web片源输入
source = core.lsmas.LWLibavSource(source,threads=0)
src8 = core.std.AssumeFPS(source, fpsnum=24000, fpsden=1001)
#src8 = core.std.Trim(src8, start=0, end=src8.num_frames-1) # 切割片尾,帧数从0开始记。
src16 = mvf.Depth(src8, depth=16)
down444 = core.fmtc.resample(src16,960,540, sx=[-0.5,0,0], css="444", planes=[3,2,2], cplace="MPEG2")
nr16y = core.knlm.KNLMeansCL(src16, d=2, a=2, s=3, h=0.8, wmode=2, device_type="GPU")
nr16uv = core.knlm.KNLMeansCL(down444, d=2, a=1, s=3, h=0.4, wmode=2, device_type="GPU")
nr16 = core.std.ShufflePlanes([nr16y,nr16uv], [0,1,2], vs.YUV)
debd = core.f3kdb.Deband(nr16,12,24,16,16,0,0,output_depth=16)
debd = core.f3kdb.Deband(debd,20,56,32,32,0,0,output_depth=16)
debd = mvf.LimitFilter(debd,nr16,thr=0.6,thrc=0.5,elast=2.0)
res = debd
# Debug=1,片源与成品对比;Debug=0,输出成品,准备压制。
Debug = 0
if Debug:
compare=core.std.Interleave([src16,res])
compare=mvf.ToRGB(compare,full=False,depth=8).set_output()
else: res = mvf.Depth(res,10).set_output() #输出10bit
参数如下
组件版本
Python3.6 64bit,
VapourSynth-R38,
VapourSynthEditor-r19-64bit
压制一开始没问题,但是在压制到一千帧左右才报错,换源、把插件换成新的也是一样。
报错信息如下
vpy脚本如下(LoliHouse提供)
import vapoursynth as vs
import sys
import havsfunc as haf
import mvsfunc as mvf
import nnedi3_resample as nnrs
import CSMOD as cs
core = vs.get_core(accept_lowercase=True)
source = r"input.mkv" # Web片源输入
source = core.lsmas.LWLibavSource(source,threads=0)
src8 = core.std.AssumeFPS(source, fpsnum=24000, fpsden=1001)
#src8 = core.std.Trim(src8, start=0, end=src8.num_frames-1) # 切割片尾,帧数从0开始记。
src16 = mvf.Depth(src8, depth=16)
down444 = core.fmtc.resample(src16,960,540, sx=[-0.5,0,0], css="444", planes=[3,2,2], cplace="MPEG2")
nr16y = core.knlm.KNLMeansCL(src16, d=2, a=2, s=3, h=0.8, wmode=2, device_type="GPU")
nr16uv = core.knlm.KNLMeansCL(down444, d=2, a=1, s=3, h=0.4, wmode=2, device_type="GPU")
nr16 = core.std.ShufflePlanes([nr16y,nr16uv], [0,1,2], vs.YUV)
debd = core.f3kdb.Deband(nr16,12,24,16,16,0,0,output_depth=16)
debd = core.f3kdb.Deband(debd,20,56,32,32,0,0,output_depth=16)
debd = mvf.LimitFilter(debd,nr16,thr=0.6,thrc=0.5,elast=2.0)
res = debd
# Debug=1,片源与成品对比;Debug=0,输出成品,准备压制。
Debug = 0
if Debug:
compare=core.std.Interleave([src16,res])
compare=mvf.ToRGB(compare,full=False,depth=8).set_output()
else: res = mvf.Depth(res,10).set_output() #输出10bit
参数如下
代码: 全选
-D 10 --preset slower --tune lp++ --ctu 32 --crf 18 --pbratio 1.2 --no-sao --me 3 --subme 4 --merange 44 --limit-tu 4 --b-intra --no-rect --no-amp --ref 4 --weightb --keyint 360 --min-keyint 1 --bframes 6 --aq-mode 3 --aq-strength 0.7 --rd 4 --psy-rd 1.5 --psy-rdoq 1.2 --rdoq-level 2 --no-open-gop --rc-lookahead 80 --scenecut 40 --qcomp 0.65 --no-strong-intra-smoothing --rskip --log-file "%~n1.log" --log-file-level debug
组件版本
Python3.6 64bit,
VapourSynth-R38,
VapourSynthEditor-r19-64bit