PDA

View Full Version : Display Aspect Ratio


Hitokiri
31st December 2002, 16:58
Today i wanted to determine with Gknot in which resolution i would encode my Harry Potter R2 4:3 FS dvd rip to divx3.11. But i found that when choosing 'PAL non anamorphic' in 'Input Pixel Aspect Ratio', it would give me a DAR of 1.368 and not 1.333 as one would expect by dividing 4 by 3 (4:3). I wonder why this is? Does this have anything to do with that ITU-R ...standard?

If i would choose Gknot's advice and encode with a width of 640, i would get 464 as hight (normally 468 but divx uses 16*16 so 464) and not 480..which will not result in a real full screen encode, i would miss some pixels at the top and bottom of the screen. What is the right thing to do here?

Also can anyone tell me the exact difference between the DAR and PAR?

Thanks in advance.

manono
1st January 2003, 02:37
Hi-

Does this have anything to do with that ITU-R ...standard?

Yes. You uncheck that box and you then get 1.33 (4:3) and 1.778 (16:9). I always keep the box checked, partly because I usually watch my rips on TV, and partly because TheWEF recommends it. That's all I know on the subject. Maybe TheWEF or someone else would like to comment (and maybe not).

If you want to get 640x480, you might try and crop the black bars and then cut from the left and right to achieve low Aspect Error. That may or may not work. Either way, I wouldn't worry about it too much.

Hitokiri
1st January 2003, 11:48
Thanks for the insight, i appreciate it.
Hopefully others would idd like to comment. :)

TheWEF
1st January 2003, 18:14
A Quick Guide to Digital Video Resolution and Aspect Ratio Conversions (http://www.uwasa.fi/~f76998/video/conversion/)

Hitokiri
1st January 2003, 18:31
Thanks! That will certainly clear things up for me.

Hitokiri
1st January 2003, 19:25
..and it did nothing of the sort, lol. Someday.. :)

As i can read in the title of paragraph 4.7, it is better to avoid 720x540..that means 4:3 (or 720/540 = 4/3). As i understand, it would be better then to follow the ITU-R BT.601 standard?

So a resolution of 544x400 and smart crop selected (so my images don't look streched), should be ok in this case?

TheWEF
1st January 2003, 22:22
Originally posted by Hitokiri
..and it did nothing of the sort, lol.

ok, have some time now so i'll try to give you the long answer...

with gknot you want to create divx-avi-computer-video. the correct pixel aspect ratio for this type of video is 1/1 (square pixels).

most video formats do NOT have square pixels, reasons are historic, most formats are of analoge origin.

so we have to stretch the pixels to get correct aspect ratio in our avis.

but how do we know the pixel aspect ratio of the input format? - usually resolution is a good hint. following the link above you find "3. A Conversion Table for Digital Video Formats". every resolution has a certain pixel aspect ratio.

of course, with a computer, you can produce video with "any" resolution and PAR you like. so you could download an avi of 720x480 with a PAR of 1/1. someone just made it that way, it will not fit in the conversion table.
but if the source is any kind of standard video, like broadcast, dvd, vcd, svcd, vhs, hi-8, any capture.avi,...anything, the values in the table are correct.

example:
resolution on most ntsc-dvds is 720x480.
in the table you find 72/79 = 0.911 is the PAR for this resolution.

now there is one more thing: it's possible that a video is stretched even more in a certain standardized way called "anamorphic transfer". the PAR values you find in the table are for "non anamorphic transfer". if you want the anamophic PAR for a certain resolution you have to multiply the value with 4/3 = 1.333

example:
720x480 ntsc anamorphic
PAR = (72/79) x (4/3) = 1.215

in gknot you can always see the currently selected PAR right next to "other..." in the "Input Pixel Aspect Ratio" box.
if you open a video with a resolution of 720x480 gknot will automatically select ntsc anamorphic and you can read a PAR of 1.125

you can enter any PAR you like in the "other..." box. usually that doesn't make much sense. but if you press "select" you can select from all the common PARs in the table, anamorphic or not.

some capture cards use some strange halfe resolutions, e.g. a common one in the PAL world is "Halfe-D1" (360 x 576), halfe of 720x576.

example if you want to convert such a capture.avi to divx:
press "select", select "128/117 PAL (720x576),..." and check "double" - press "OK".
new PAR is (128/117) x 2 = 2.188


got all that? - ok.




gknots output PAR always is 1/1. but it's possible to convert to any output format you want, you just have to do some manual calculations.

exampel - you want to convert an ntsc-dvd-anamorphic to a pal-svcd-non anamorphic:
input res is 720x480 -> input PAR=(72/79) x (4/3)
outut res is 480x576 -> output PAR=(128/78)
in "other..." you enter (input PAR) / (output PAR) =
((72/79) x (4/3)) / (128/78) = 0.7405
move the slider to get a resolution width of 480 and save the avs.
you have to edit it manually and "AddBorders()" to get a output resolution hight of 576.
(read avisynth docs if you don't know how to do that)
then e.g. encode with tmpg...



now what's this ITU checkbox in gknot?

if you leave it checked gknot will simply follow the standards and use the PAR values from the table - highly recommended.
if you enter a custom PAR value in "other..." or use the "select" button the checkbox does not have an effect anyway.

so why uncheck it?

if you resize a full non anamorphic ntsc-dvd frame (720x480) to 640x... according to CORRECT standards you get 640x468 and that is NOT a display aspect ratio of 4/3.
if you watch it on your 4/3 computer monitor using a 4/3 desktop resolution (e.g. 640x480) the frame does NOT fill the screen.
when you watch the dvd with your software dvd player (e.g. powerdvd) the frame DOES fill the screen. why? because the programmers accepted a slight AR-error in order to avoid black bars in full screen. the players do it WRONG, but you can't see it because the difference, the AR-error, is too small. you could see the black bars though, so...
some people prefer to resize like the software dvd players do, so they uncheck itu.



it's quite hard to understand all the stuff you can read in the Quick Guide to Digital Video Resolution and Aspect Ratio Conversions (http://www.uwasa.fi/~f76998/video/conversion/). it's simply too much for most people. that's why doom9 still has the simple explanations here (http://www.doom9.org/aspectratios.htm). what you can read there is almost true, but not really. it's an easy way to look at the problem and enough for most people.


wef.

Hitokiri
2nd January 2003, 09:55
Ic, so the pixels of a dvd source are not square to begin with, and even more..if the source is anamorphic..the images are squeezed in 4:3 format, right? So they first 'have to' be 'unsqueezed' and after that converted to square pixels for divx avi format, but this can be done in 1 step by multiplying the non-anamorphic PAR by 4/3?

I think i understand, i'm going for 544x400. ;)
Thanks again.

jugm
7th January 2003, 21:18
Sorry I'm still not completely clear on ITU checkbox in GKnot. Lets say I've chosen some resolution that have width and height as multiple of 32/16 - 640x272 for example. Gknot will show some 0.7% AR error. I usually cut few more pixels to minimize AR error to 0%.

Now what difference will "follow ITU" checkbox will make ? Will it override output resolution to be not 32/16 - like 640x283 ?

Will this checkbox make more difference if I chose not to cut input frame keeping AR error ?

TheWEF
7th January 2003, 22:41
Originally posted by jugm
Sorry I'm still not completely clear on ITU checkbox in GKnot.

why not check/uncheck it and see what it does?

"AR error" is the rounding error because of h-mod and w-mod restrictions (like 32/16).
check/uncheck itu -> different "correct" resolution.
check/uncheck itu -> different AR-error.

if you set h-mod = 1 (for testing):
"AR error" ~ 0.0%
check/uncheck itu -> different resolution.

wef.