Home
RecentChanges

Search:

» AviSynth is a powerful video FrameServer for Win32.

AviSynth Links:
»Download
»Learn to script
»FAQ
»Manual
»Discussion fora
»Project page
»External filters
»FeedBack

» You can add pages to this website immediately. No login required.
Edit this document

» AboutAviSynth

 

Avisynth 
Logo

EditingFunctions

Here are some functions I made and added to my plugins directory because I was sick of typing them so much. Hope you [find them] useful.

# inserts the clip 'inclip' into 'old' at index 'frame'
function Insert (clip old, clip inclip, int frame)
{
return old.Trim(0, frame - 1) + inclip + old.Trim(frame, 0)
}
# as above, using aligned splices
function AlignedInsert? (clip old, clip inclip, int frame)
{
return old.Trim(0, frame - 1) inclip old.Trim(frame, 0)
}
# replace 'numframes' frames of 'old' with 'inclip', starting at 'frame'
function Replace (clip old, clip inclip, int frame, int numframes)
{
numframes = ((numframes == 0) || (numframes > inclip.framecount)) ? inclip.framecount : numframes
return old.Trim(0, frame - 1) + inclip.Trim(0, numframes) + old.Trim(frame + numframes, 0)
}
# as above, using aligned splices
function AlignedReplace? (clip old, clip inclip, int frame, int numframes)
{
numframes = (numframes == 0 || numframes > inclip.framecount) ? inclip.framecount : numframes
return old.Trim(0, frame - 1) inclip.Trim(0, numframes) old.Trim(frame + numframes, 0)
}

Back to ShareFunctions.

SourceForge Logo

 


Edit this document | View document history
Document last modified Mon, 09 Dec 2002 02:01:10