Log in

View Full Version : How to split a file into 2, do different processing then re-join?


soujir0u
31st January 2002, 05:01
Hi, I have this video clip that I want to split into 2 parts, crop the 2 parts differently then combine them back into one clip.

I've tried using 2 avs clips to split them up (using trim), then rejoin using another avs using unalignedsplice, and it works.

However, I'm trying to do this using only 1 avs file. Is it possible?

western shinma
31st January 2002, 09:45
There's a few ways you could go about this I suppose. Here's one way:

video=MPEG2Source("something.d2v")
video1=video.Trim(0,100000).Crop(4,0,704,480)
video2=video.Trim(100001,0).Crop(8,0,704,480)
return video1+video2

soujir0u
31st January 2002, 10:57
Hmm ok. So the . is used to combine several expressions?

western shinma
2nd February 2002, 11:19
Oh, sorry I didn't notice your reply earlier. That is correct.

Here's my latest avs as an example:

LoadPlugin("MPEG2DEC.dll")
LoadPlugin("Decomb.dll")
LoadPlugin("Vobsub.dll")
video=MPEG2Source("bav.d2v").Telecide.Decimate(5).Vobsub("F:\BAV Disc 5\vts_01_0")
op=video.Crop(8,0,706,480).Trim(0,2240).BicubicResize(480,360,0,0.5)
ep14=video.Crop(8,0,706,480).Trim(2241,30345).BicubicResize(480,360,0,0.5)
ep15=video.Crop(8,0,706,480).Trim(30346,58450).BicubicResize(480,360,0,0.5)
ep16=video.Crop(9,0,702,480).Trim(58451,86584).BicubicResize(480,360,0,0.5)
ed=video.Crop(8,8,704,472).Trim(86585,88528).BicubicResize(480,360,0,0.5)
pre15=video.Crop(9,0,702,480).Trim(88529,88913).BicubicResize(480,360,0,0.5)
pre16=video.Crop(8,0,706,480).Trim(88914,89292).BicubicResize(480,360,0,0.5)
pre17=video.Crop(8,0,706,480).Trim(89293,0).BicubicResize(480,360,0,0.5)
return op+ep14+ep15+ep16+ed+pre15+pre16+pre17

Yeah, I could have made it simpler, but I just copy and paste the trim values into Nandub.

Any avisynth gurus: feel free to suggest better methods for doing this.