Log in

View Full Version : Question about Trim


Chainmax
17th June 2006, 21:52
I need to encode different segments of a clip with different settings. After reading the Avisynth docs on Trim, I figure that in order to do so, I'd have to encode something like Trim(0,x)+Filterchain1, Trim(x+1,y)+Filterchain2 and Trim(y+1,0)+Filterchain3 and then append them in VDub. Is that correct or would I be missing intermediate frames this way?

Alain2
17th June 2006, 23:04
Different settings for the codec or just your filter chain ? If it's just the avs filters, you can alignedsplice the trim+filterchain at the end. Unless it invoves different framerates for each part and you intend to do a vfr mkv, in that case yeze separate encodes.

unskinnyboy
17th June 2006, 23:10
What you need is not Trim(), but something like stickboy's JDL_ApplyRange() (http://www.avisynth.org/stickboy/jdl-range.avsi)

stickboy
18th June 2006, 01:25
Or use the built-in ApplyRange function (although my JDL_ApplyRange function does offer some syntactical convenience).

Chainmax
19th June 2006, 03:58
It's the exact same filterchain for each section, only with a different framerate changer (each set at the same destination fps) stuck at the end.

Alain2
19th June 2006, 12:00
Well if the framerate is the same at the end, it's seems easy then:

fonction filter(..){
..
}

clip1=trim(0,x).filter(..).yourframeratechanger1.assumefps(..)
clip2=trim(x+1,y).filter(..).yourframeratechanger2.assumefps(..)
clip3=trip(y+1,0).filter(..).yourframeratechanger3.assumefps(..)

clip1+clip2+clip3

the assumefps being there just to ensure the same fps, but it's not necessary

Chainmax
19th June 2006, 14:33
Thanks, I'll use that on the next encodes that require it. In the meantime, I already started doing the encodes using the method I described in the OP, so is it correct or will I miss intermediate frames having done it that way?