Log in

View Full Version : Is that a correct Aspect Ratio ?


TheWittyDude
14th August 2007, 21:46
Hi Guys ,

I'm encoding a (4:3 , Letterboxed , PAL ) DVD into XviD

My avs Script is :

MPEG2Source("VTS_01_1.d2v")
Crop(0,82,0,-82)
LancZosResize(640,480)

Are the Resize filter inputs correct ? cause I thought that the Crop command would change the 4:3 source aspect ratio to a new one and accordingly , the the resize filter would take another values propotional to the new aspect ratio

and also I'm confused .. How come the script would create a 4:3 FS avi video while removing the letterboxing isn't supposed to result a FS video

Any Help would be appreciated .

foxyshadis
15th August 2007, 00:25
You can resize it to anything you want, it'll just distort the picture if you use the wrong dimensions.

Running the math, it's obvious that the letterboxed area is 16/9. So you should resize it properly to 640x360, or some other 16/9 resolution.

(The math, for future purposes:
a=720/(576-162) # ar on disc of active area
c=(720/576)/(4/3) # correction ratio between full DVD res and 4/3
ar = a*c = 1.63... which is close enough to 1.66 which is 16/9.)

TheWittyDude
15th August 2007, 05:13
Thanks so much foxyshadis for your kind help

jeffy
15th August 2007, 12:01
You can resize it to anything you want, it'll just distort the picture if you use the wrong dimensions.

Running the math, it's obvious that the letterboxed area is 16/9. So you should resize it properly to 640x360, or some other 16/9 resolution.

(The math, for future purposes:
a=720/(576-162) # ar on disc of active area
c=(720/576)/(4/3) # correction ratio between full DVD res and 4/3
ar = a*c = 1.63... which is close enough to 1.66 which is 16/9.)
16/9 = 1.777...8, isn't it?

ArielHatotah
19th August 2007, 13:25
The formula for calculating the correct aspect ratio is as following:

Let H be the vertical resolution of the DVD (Height). In your case: H = 576 (because it's a PAL DVD).
Let AR be the Aspect Ratio of the DVD. In your case: AR = 4:3 = 4 / 3
Let Y be the black bars up and down. i.e: the number of pixels to be cropped. In your case: Y = 82 + 82 = 164

The formula would be:

Correct Aspect Ratio = H * AR / (H - Y)

Therefore in your case:
Correct Aspect Ratio = 576 * (4 / 3) / (576 - 164) = 768 / 412 ≈ 1.8641

In a case in which you have to crop also black bars on the sides, let X be the number of pixels to be cropped from the sides.

Then the formula would be:

Correct Aspect Ratio = H * AR * (720 - X / 720) / (H - Y)

That is the universal formula.
In your case: Correct Aspect Ratio = 576 *4 / 3 * (720 - 0 / 720) / (576 - 164) = 576 * (4 / 3) * 1 / (576 - 164) = 768 / 412 ≈ 1.8641

Of course all that is true only when you crop your video before resizing. And that's the best way.

Then, when you have the Correct Aspect Ratio, you can easily find a suitable resolution for resizing.
In your case you can resize to 720x384 or 688x368 or 656x352 or 624x336. The closest resolution to the correct aspect ratio is 656x352. (656 / 352 ≈ 1.8636).

Enjoy!

medp7060
29th December 2007, 11:17
Thanks, ArielHatotah. It is helpful. But why the AR is different from foxyshadis's calculation (1.63 vs 1.8641)? which formula is correct?

However, GK shows that a 640x336 (0.4% Aspect error) or 656x336 (-2.1% Aspect error) resizing would be appropriate.

SeeMoreDigital
29th December 2007, 14:11
16/9 = 1.777...8, isn't it?Yes.....

16/9 as a fraction equates to 1.77777 as a decimal.

Consequently, 1.63 as a decimal would equate to 163/100 as a fraction. And 1.66 as a decimal would equate to 83/50 as a fraction... Both are closer to 16/10 (ie: 1.6) rather than 16/9 (ie: 1.7777).

foxyshadis
29th December 2007, 20:01
Because I forgot to include all the important numbers, which is why I normally stay the heck out of AR threads. I should have remembered that!