View Full Version : Syntax Question... sort of
CraigBjorn
19th March 2004, 04:48
Is there an easier way of creating a script like the following
UnalignedSplice(Animate(trim(AVISource("C:\capture1.avii"),0,100),50,100,"Levels", 0,1,255,0,255, 0,1,255,255,255),Animate(trim(AVISource("C:\capture.avi"),101,200),50,100,"Levels", 0,1,255,0,255, 0,1,255,255,255))
This script basically takes a video file, splits it up and then allows you to fade it to white.
Any way of doing this so it's not all in one line would make my life alot easier. Thanx.
Richard Berg
19th March 2004, 05:10
You can split commands onto lines using '\' -- most function examples use this. You can also use 'a + b' as a shorthand for UnalignedSplice(a,b).
stickboy
19th March 2004, 10:50
I would write it more like:
src1 = AVISource("C:\capture1.avi").Trim(0, 100)
src2 = AVISource("C:\capture.avi").Trim(101, 200)
white = src1.BlankClip(color=$FFFFFF, length=50)
Dissolve(src1, white, 50) + Dissolve(src2, white, 50)
Didée
19th March 2004, 12:21
Without actually having it tested:
src1 = AVISource("C:\capture1.avi").Trim(0, 100)
src2 = AVISource("C:\capture.avi").Trim(101, 200)
(src1+src2).invert().FadeIO(50).invert()
respectively
src1.invert().fadeout(50).invert()
\ + src2.invert().fadein(50).invert()
or similar, depending on which ends of the clips you want to fade.
- Didée
CraigBjorn
19th March 2004, 21:42
Oops, I ment to have both be capture1.avi... so it's all from the same source, but that shouldn't really matter. I think my biggest problem is not fully understanding OOP Notation. I tried stickboy's script and that seems to make things alot easier. I still would really like it if someone who point me in the direction of someplace where I could learn OOP Notation better, thanx.
stickboy
19th March 2004, 22:28
AviSynth's OOP notation is pretty straightforward.
Anything of the form Foo(clip, ...) can be written as clip.Foo(...). This lets you easily chain stuff together; instead of Bar(Foo(clip, ...), ...), you can write clip.Foo(...).Bar(...).
CraigBjorn
19th March 2004, 22:37
WOW, thanx, sorry I'm really slow, but that should make this project a million times easier.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.