View Single Post
Old 17th May 2019, 02:02   #455  |  Link
Abu3safeer
Registered User
 
Join Date: Jan 2019
Posts: 5
How to use "insertsign" function in StaxRip,
I went through settings and found out that I need to use "vapoursynth" in order to have "insertsign" enabled,
but whenever I try to change the filter to "vapoursynth" I get this error message:




So I decided to use VirtualDub as mentioned in the error message, but I get this:





I don't know much about python, so I don't know if it is because of python, or from ffms2.dll, or from something else.

I have this simple script which I tried to use with AVS filter but didn't work, it show errors:

Quote:
function insertsign(clip mainclip, clip overlayclip, int startframe, int "endframe") {
# make the endframe parameter optional (defaulting to where the overlay clip ends)
endframe = default(endframe,startframe+overlayclip.framecount()-1) # is endframe not specified?
endframe = (endframe == 0) ? startframe+overlayclip.framecount()-1 : endframe # is it specified but zero?
# is it specified but >= the main clip's last frame? (may have been caused by the previous line or specified by the user)
# in that case make it equal to the last frame of the main clip (this is important later)
endframe = (endframe >= mainclip.framecount()-1) ? mainclip.framecount()-1 : endframe


# make sure the special case startframe=1 is dealt with correctly
# (needed because trim(0,0) returns the entire clip, which is obviously not what we want)
# note that the first frame of the clip is zero, NOT one!
begin = (startframe == 1) ? mainclip.trim(0,-1) : mainclip.trim(0,startframe-1)
middle = mainclip.trim(startframe,endframe)
# make sure the special case endframe = last frame of the clip is handled properly.
end = (endframe == mainclip.framecount()-1) ? blankclip(mainclip,length=0) : mainclip.trim(endframe+1,0)

middleoverlay = Overlay(middle, overlayclip, mask=overlayclip.showalpha())

# deal with the special case startframe=0 (in which case we don't have anything before the overlay)
# note that trim(-1,0) does nothing (it returns the same as trim(0,0)...)
final = (startframe == 0) ? middleoverlay ++ end : begin ++ middleoverlay ++ end
return final
}
Abu3safeer is offline