淡入淡出的脚本.....
格式: logo, 起始,结束, x,y, 边缘控制,淡入的帧数, 淡出的帧数
Logosimple(top,500,600,100,100,0,100,100)
function Logosimple(clip clip, clip top,int startFrame, int endFrame, int hor, int verticle, float blurthresh, int fadein, int fadeout)
{
Default (hor, 0)
Default (verticle, 0)
Default (fadein, 0)
Default (fadeout, 0)
top2=top.blur(blurthresh).blur(blurthresh).blur(blurthresh).RGBAdjust(255,255,255,1)
beg = clip.trim(0, startFrame-fadein-1)
Fin = clip.trim(startFrame-fadein, startFrame-1)
filter = clip.trim(startFrame,endFrame)
Fout = clip.trim(endFrame+1, endFrame + fadeout)
end = clip.trim(endFrame+fadeout+1,0)
overlayClip = top.trim(0, endFrame - startFrame)
overlayClipin = top.trim(0,fadein)
overlayClipout = top.trim(0,fadeout)
maskClipin = top2.trim(0,fadein)
maskClipout = top2.trim(0,fadeout)
maskClipout = maskClipout.FadeOut(maskClipout.Framecount())
maskClipin = maskClipin.FadeIn(maskClipin.Framecount())
filter = overlay(filter, overlayClip, x=hor, y=verticle,mask = top2, mode="blend", opacity=1,pc_range=true,output="yv12")
Fin = overlay(Fin, overlayClipin, x=hor, y=verticle,mask = maskClipin, mode="blend", opacity=1,pc_range=true,output="yv12")
Fout = overlay(Fout, overlayClipout, x=hor, y=verticle,mask = maskClipout, mode="blend", opacity=1,pc_range=true,output="yv12")
final = beg + Fin+ filter + Fout + end
return final
}