leonid_makarovsky
2nd December 2004, 08:58
I'm trying to write my own function blank_clip for ease of use. It takes clip, start point, end point and the color and blanks the whole area. Here it is the whole script:
clip = AVISource("L:\CrossPurposes.avi")
beginning = blank_clip(clip, 276, 276, $000000)
middle = Trim(clip, 277, 157265)
end = blank_clip(clip, 157266, 157267, $000000)
clip = beginning ++ middle ++ end
return clip
function blank_clip(clip myclip, int start, int finish, int color)
{
thepart = Trim(myclip, start, finish)
blankout = BlankClip(thepart, length = Framecount(thepart), pixel_type="YUY2", color)
return blankout
}
When I load it to VirtualDub, it says:
Script error: the named argument "length" was passed more than once to BlankClip
line 12...
I've been banging against the wall for a while now before I decided to post here. I'm sure there's some dumb small mistake that I'm overlooking. Thanks.
And also how can I specify the default values to omit passing arguments. Like in C++ I can declare the function void func(int arg1, int arg2 = 0); Then I can just call func(arg1) without passing arg2. Is there any way to do so in AVISynth?
--Leonid
clip = AVISource("L:\CrossPurposes.avi")
beginning = blank_clip(clip, 276, 276, $000000)
middle = Trim(clip, 277, 157265)
end = blank_clip(clip, 157266, 157267, $000000)
clip = beginning ++ middle ++ end
return clip
function blank_clip(clip myclip, int start, int finish, int color)
{
thepart = Trim(myclip, start, finish)
blankout = BlankClip(thepart, length = Framecount(thepart), pixel_type="YUY2", color)
return blankout
}
When I load it to VirtualDub, it says:
Script error: the named argument "length" was passed more than once to BlankClip
line 12...
I've been banging against the wall for a while now before I decided to post here. I'm sure there's some dumb small mistake that I'm overlooking. Thanks.
And also how can I specify the default values to omit passing arguments. Like in C++ I can declare the function void func(int arg1, int arg2 = 0); Then I can just call func(arg1) without passing arg2. Is there any way to do so in AVISynth?
--Leonid