JohannesL
28th May 2009, 12:17
This function lets you apply one or more filters to a range of frames.
I made this since the internal ApplyRange() is rather limited.
function ApplyRange2(clip c, int first_frame, int last_frame, string "filter")
{
before = c.Trim(0,first_frame-1)
c.Trim(first_frame,last_frame)
current = Defined(filter) ? eval(filter) : last
after = c.Trim(last_frame+1,0)
AlignedSplice(before,current,after)
return (last)
}
Examples:
ApplyRange2(100,200,"Blur(1.58).Blur(1.58).Blur(1.58).FFT3DGPU(sharpen=7,sigma=8)")
ApplyRange2(50,500,"Crop(0,50,-0,-50).AddBorders(0,50,0,50)")
My first function. Enjoy :)
I made this since the internal ApplyRange() is rather limited.
function ApplyRange2(clip c, int first_frame, int last_frame, string "filter")
{
before = c.Trim(0,first_frame-1)
c.Trim(first_frame,last_frame)
current = Defined(filter) ? eval(filter) : last
after = c.Trim(last_frame+1,0)
AlignedSplice(before,current,after)
return (last)
}
Examples:
ApplyRange2(100,200,"Blur(1.58).Blur(1.58).Blur(1.58).FFT3DGPU(sharpen=7,sigma=8)")
ApplyRange2(50,500,"Crop(0,50,-0,-50).AddBorders(0,50,0,50)")
My first function. Enjoy :)