Log in

View Full Version : Trim at frame 0 ?


Dark-Cracker
1st September 2004, 04:52
hi,

i am asking a silly question , so perhaps someone can answer me.

i want for example trim only one frame, i use this for exemple : myclip.trim(5,5) and i get my frame, if i right remember avisynth start to count frame from zero , but if i do myclip.trim(0,0) it display me the full clip. does someone know why ?

PS : avisynth RC3 inside.

++

stickboy
1st September 2004, 06:00
It displays the full clip because the last argument to Trim is overloaded. If you pass it 0, it means "to the end of the clip." If you pass a negative value, that's interpreted as the clip length. Therefore, Trim(0, -1) will produce a 1-frame clip at the beginning.

(All of this is explained in AviSynth's bundled documentation.)

These weird special cases are one of the reasons why I recommend that people use my Trim2/Trim3 functions (http://forum.doom9.org/showthread.php?s=&threadid=58358) in their own reusable functions.