原AVS是这样,我不知道哪里错了,请高手赐教~!压制出来的东西,部分区域就是无法替换影片内容
rawfile="D:\h2o09.avi"
avsplugindir="C:\Program Files\Pure Codec\AviSynth 2.5\plugins\"
LoadPlugin(avsplugindir+"FluxSmooth.dll")
LoadPlugin(avsplugindir+"WarpSharp.dll")
LoadPlugin(avsplugindir+"VSFilter.dll")
LoadPlugin(avsplugindir+"deblock.dll")
pre1start=7000
pre1end=7119
pre2start=12000
pre2end=12118
pre3start=1
pre3end=1
maskbasefile="D:\169.JPG"
maskfile="D:\169.JPG"
maskblurfile="D:\169.JPG"
maskinfile="D:\169.JPG"
maskoutfile="D:\169.JPG"
maskblurinfile="D:\169.JPG"
maskbluroutfile="D:\169.JPG"
preaudiofile="D:\music.wav"
main=DirectShowSource(rawfile,convertfps=true,23.976,pixel_type="YV12").KillAudio().LanczosResize(704,396).FluxSmoothST(7,7).ConvertToRGB32
mainyv12=DirectShowSource(rawfile,convertfps=true,23.976,pixel_type="YV12").LanczosResize(704,396).FluxSmoothST(7,7).ResampleAudio(44100)
preaudio=WAVSource (preaudiofile)
pre1=main.Trim(pre1start,pre1end)
pre2=main.Trim(pre2start,pre2end)
pre3=main.Trim(pre3start,pre3end)
premux=pre1+pre2+pre3
preraw=premux.FadeIn(48,0,23.976).FadeOut(24,0,23.976)
prerawblur=preraw
maskbase=ImageSource(maskbasefile,0,239,23.976,false,false).ConvertToRGB32
mask=ImageSource(maskfile,0,191,23.976,false,false).ConvertToRGB32
maskblur=ImageSource(maskblurfile,0,191,23.976,false,false).ConvertToRGB32
maskin=ImageSource(maskinfile,101,124,23.976,false,false).ConvertToRGB32
maskout=ImageSource(maskoutfile,101,124,23.976,false,false).ConvertToRGB32
maskblurin=ImageSource(maskblurinfile,101,124,23.976,false,false).ConvertToRGB32
maskblurout=ImageSource(maskbluroutfile,101,124,23.976,false,false).ConvertToRGB32
maskall=maskin+mask+maskout
maskblurall=maskblurin+maskblur+maskblurout
maskbaseword=maskbase
maskbaseT=maskall
maskblurT=Mask(prerawblur,maskblurall)
mux1=layer(preraw,maskblurT,"add",255,0,0)
mux2=layer(mux1,maskbaseT,"add",255,0,0)
prefinal=AudioDub(mux2,preaudio).ConvertToYV12
finalmux=prefinal+mainyv12
final=finalmux
return final