『漫游』酷论坛>『影音数码技术学习交流』>[求助]AVS加载LOGO部分 ..
[求助]AVS加载LOGO部分无法替换影片内容显示
mikuru@2008-03-04 18:10
原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
bomber1984@2008-03-04 19:35
好复杂 理解不能
ksleck@2008-03-05 00:11
maskblurT=Mask(prerawblur,maskblurall)
算了 prerawblur 和 maskblurall 的frame (不知道对不对,错的话就不用看下去了……)
prerawblur=preraw
preraw=premux.FadeIn(48,0,23.976).FadeOut(24,0,23.976)
total frame是 (7119-7000+1)+(12118-12000+1)+(1-1+1) +2(fadein fadeout分别会多加一个frame) = 242 frame
maskblurall=maskblurin+maskblur+maskblurout
这个有些不确定,大概是 (191-0+1)+(124-101+1)+(124-101+1)=240 frame
是最后两张frame出问题吗?FadeIn改成FadeIn0,fadeOut改成fadeout0 试试看
ps...其实我看不懂这个script....这个出来的效果是怎样的? 能否提供效果图参观 :o
mikuru@2008-03-05 17:53
出來以后就這個樣子...黑乎乎的...
[URL=http://img2.freep.cn/p.aspx?u=v20_img2_img_0803051752089380_13261.jpg&click=1 ][/URL]
| TOP