Log in

View Full Version : Does trim in avisynth works similar to cutting in VDub?


ultimatebilly
8th April 2003, 13:20
Hi all!
I just wondered if the trim command works similar to the cutting feature in Virtualdub?
If I want to split a clip in two parts and join them later again, do I have to include
trim(start,cutpoint)
trim(cutpoint,end)

or

trim(start,cutpoint)
trim(cutpoint+1,end)
???

Do I have to select the same frame as endpoint of part one and startpoint of part two or the next frame as start for part two??

N_F
8th April 2003, 13:27
It's not like it should matter. You could never tell the difference with just 1 frame.

Either way, the second option should be the "correct" one (that's the way Gordian Knot does anyway).

ultimatebilly
8th April 2003, 13:34
Wow! What a fast reply!
I am just concerned about audio+video sync, but you're probably right, 40ms shouldn't matter that much...
I will go with gknot...
Thanks again!

jggimi
8th April 2003, 16:20
You may want to be careful with either format; I believe the first trim command will complete before the second one begins. Here's what I mean:

Example: Your input video has 1000 frames.

If you had:

Trim(0,499)

At the end of that filter command, your video would have 500 frames. If you followed it with:

Trim(500,999) you would end up with a null video.

If you want to cut out frames 500-599, you could do something like:

a=trim(0,499)
b=trim(600,0)
a+b