Log in

View Full Version : Trimming at multiple points in one script


dar1us
30th November 2002, 21:09
Probably a real simple answer, but how can I load an captured AVI file and include only certain parts. My example is removing the adverts with out cutting them using VirtualDub or anysuch program. Keeping it all in AVIsytnh

I.E frames 150>250 and 350>450 but in one operation.

Again, sure there is a simple answer, sorry to be of a bother asking.


dar1us

manono
30th November 2002, 22:08
Hi-

Trim1=Trim(0,149)
Trim2=Trim(251,349)
Trim3=Trim(451,0)
Trim1+Trim2+Trim3

I didn't quite understand if you were cutting out those frames in the example, or keeping those frames. What I gave you cuts them out.

dar1us
30th November 2002, 22:20
i was actually trying to keep them. but thanks, that totally makes sense:)

so i could have - my 'simple' example:

AVISource("c:\4x23\4x23.avi")
ConvertToYUY2()
Trim1=Trim(150,250)
Trim2=Trim(250,350)
Trim3=Trim(350,450)
Trim1+Trim2+Trim3
Fadein(12)
Telecide()
LanczosResize(576,432)

btw, that was a freshly capped episode of voyager on SKY|ONE today:)

aint' I sad


dar1us

dar1us
30th November 2002, 22:21
nope... oops>should have checked it first, but I understand how to do it now, missed out half of the script


dar1us

Richard Berg
1st December 2002, 10:42
I usually do things like:


### divvy it up

show = src.Trim(6315, 11408) ++ src.Trim(17796, 26726)
show = show ++ src.Trim(31357, 49033) ++ src.Trim(56368, 78929)
show = show ++ src.Trim(85259, 90314) ++ src.Trim(96877, 111746)

intro = src.Trim(4445, 5946)
credits = src.Trim(105178, 105359)

but the general inefficiency of the code makes me realize that what we really need are += and ++= operators. Should be easy enough to add... :)

stax76
2nd December 2002, 22:42
DVX features a VirtualDub cutting to AviSynth Trim converter, it works with both deleting ranges in VD and select a range and both combined. But I would let VirtualDub do the cutting, I only coded this because I needed it for the comp test