View Full Version : Replacing the deleting frames with an Avi file?
Agatte
4th May 2006, 13:40
Hi
I have the main source " main.avi "
and i want to delete some frames from the " main.avi " and replacing the deleting frames with " replace.avi " !
How can i do it?
actionman133
4th May 2006, 17:33
original = AVISource ("Original.avi")
replaced = AVISource ("Replacing.avi")
in = xx
out = xx
original.Trim (0, in -1) + replaced.Trim (in, out) + original.Trim (out + 1, 0)
Replace the xx's with frame numbers (asuming you want to replace a sequence of frames) and it'll replace the frames between them (inclusive)...
Agatte
4th May 2006, 17:55
Thanks actionman133!
foxyshadis
4th May 2006, 20:53
If you're making patches that are already limited to the length of the patch, it's a lot easier to use JDL_replacerange from stickboy's tools (http://www.avisynth.org/stickboy/). If you have two concurrent streams (like a heavily and lightly filtered version of the same source) you might use something like:
function PatchClip(clip c, clip new, int frame1, int frame2) {
return c.jdl_replacerange(newc.trim2(frame1,end=frame2+1),frame1)
}
Which works similar to what actionman proposed. (But safer on certain trim arguments.)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.