Log in

View Full Version : Cropping in Avisynth?


FDISK
10th March 2002, 08:04
Is it possible to crop in every direction using Avisynth? I'd like to crop 8 pixels off of every side of the video like you can in Virtualdub, but I can't figure out how to accomplish this in Avisynth. Any ideas?

western shinma
10th March 2002, 09:16
Of course cropping is more intuitive with a GUI, but it is easy to do this in Avisynth as well.

For example, if you are cropping 8 pixels from each side of a 720x480 video, you would do this:

Crop(8,8,704,464)

The first 8 is for the left side, the second is for the top, and 704x464 is the resolution you want after cropping. From those last two numbers the cropping for the right and bottom is determined automatically.

Guest
12th March 2002, 15:39
If L is the amount to crop on the L, R right, T top, and B bottom, and W and H are the original width and height, use:

Crop(L, T, W-L-R, H-T-B)

That's just a rigorous formulation of what western shinma said. :)

Holomatrix
22nd March 2002, 23:37
Sorry to bud in, new to this, so if I want crop the top and bottom by 60 of my NTSC movie, what would my crop values be at?
Thanks

western shinma
23rd March 2002, 00:13
That would be 0,60,720,360