Log in

View Full Version : need cropping explaination


poopity poop
20th March 2002, 19:22
I am trying to crap my video a litte and for the life of me I can't figure it out. I was fiddling with the settings and it kept resizeing it, I don't want it resized, what method was it using? I'm so freaking confused

As an example would someone tell me how to crop a 720x480 frame top=3 left=8 right=11 and bottom=1, and keep it 720x480 because I want to use a resize filter next. Or should I do it in all one step

Hanty
20th March 2002, 20:08
Hmm, that's not a very good solution, because what happens then is :

720x480
crop
size to about 715x475 (or something)
resize to 720x480 (causes squish if crop values aren't proportional)
resize to preffered size

So, in that "keeping 720x480" resolution step there are actually two steps. That resizing back and forth is basically an unneccesary step.

poopity poop
21st March 2002, 00:08
well what should I do? I really want to use fast recompress. how can I trim exact amount off the edges? I just don't understand the syntax I soppose

jugm
21st March 2002, 00:53
Do Crop(8,3,701,476). That will NOT keep frame at 720x480 in avisynth or any program. Then resize() to whatever you want. One problem is that if you aim for some specific resolutions (like recommended x16 width and heigth) then you will get some aspect error (not big enough with you numbers). If you can not live with that error then you chose what is better for you :

1. Don't crop at all and encode with black bars
2. Calculate final resolution as

YYY=Y2/Y1/X/X2*X1*Y*XXX

X1 Y1 - original frame size
X:Y - aspect ratio (from DVD2AVI)
X2 Y2 - frame size after crop()
XXX - desired width after resize (640, 576, 512...)
YYY - calculated heigth after resize

AND forget about heigth being x16

3. Crop() same %% from heigth AND from width. You will have to crop() some of "good" picture area in this case.

poopity poop
21st March 2002, 05:16
That's a pretty cool forumla, fortunatly, I have taken calulus 1, 2, 3, and diffEQ, and in a math intensive major. Wheneve rI need to calculate aspect ratios, and resolution I just use my intuitions and my handy dandy ti-89(which I keep next to my comptuer when not using it).

Hanty
21st March 2002, 09:40
Basically, cropping with those numbers are setting you up for aspect errors. but sometimes that's a bullet we have to bite in order to ensure overall good quality.