Log in

View Full Version : Aspect Ratio Signalling (ARS) Calculation Tool


Pages : 1 2 [3]

pdanpdan
10th August 2007, 09:11
I think this would not work if you also crop width

SealTooGreat
10th August 2007, 09:36
I think this would not work if you also crop width
This is not true! PAR is constant no matter how much you crop DVD source, but you must not resize it, 'cause it will lose its original pixel dimension.

btw the source, you are referring, is already width cropped (704x432)

pdanpdan
10th August 2007, 09:41
Sorry, it was my mistake. Of course the formula is ok. (InitialAspectRation(16/9 or 4/3)*Orig_Y/Orig_X = PAR :))

smok3
10th August 2007, 09:46
imho it is simply:

new DAR = PAR * croped_width / croped_height

edit: fixed in according to next post.

SealTooGreat
10th August 2007, 09:56
imho it is simply:

new DAR = PAR * new_width / new_height

Yes it's simple if you know source PAR which is calculated from DVD's InitialAspectRation (DAR, 16:9 or 4:3) (as pdanpdan have pointed). Once you know source's PAR, you can crop(not rezise) video and calculate new DAR.

just a bit correction for accuracy:

new DAR = source's PAR * cropped_width / cropped_height

new (referring to new_width / new_height) can mean new width/height gotten from resizing - in this case formula won't give appropriate results.

smok3
10th August 2007, 10:51
right, i have fixed my previous post.

delacroixp
11th August 2007, 13:36
It certainly emphasises the difficulty of getting it right...
Most people wont even notice the image distortion but then... "most people are fools"... at least some of the time...


:):D:eek:
Pascal

foxyshadis
12th August 2007, 10:22
Up to a 5% AR change is small enough that even discerning viewers can be hard pressed to tell which is correct; real life is so full of its own distortions, after all, that we adjust easily. And then yes, there are people like my mother, who didn't mind watching DVDs unstretched because she'd fiddled with the TV settings. (It took me a minute to figure out why everyone was so tall and thin when I came over. =x )

All that matters is whether it takes away from your enjoyment while watching, unless you're really serious about building a great archive for the future generations.

SeeMoreDigital
12th August 2007, 10:49
Indeed... one of the things that really peeves me is that LCD TV manufacturers are shoving 17", 19", 21", 23" and 26" wide-screen panels at 16:10, down our necks!

No-way can anything look the correct shape on those things.... Yet people are buying them :eek:

delacroixp
12th August 2007, 17:30
Indeed... one of the things that really peeves me is that LCD TV manufacturers are shoving 17", 19", 21", 23" and 26" wide-screen panels at 16:10, down our necks!

No-way can anything look the correct shape on those things.... Yet people are buying them :eek:
I hear you... me tooo...

I guess we need dynamically resizable screens... kinda vector screens...
I hardly think 4:3 is dead and while portrait mode could work for some movies, I just love those truly wide-angle 5:1 vista landscape panarama's that just wrap-around you like a warm friendly blanket...
LCD's sort of struggle with flexibillity... a curve would be nice though I suppose projectors can handle that kind of thing pretty well...

IMAX (http://www.imax3dmyrtlebeach.com/imax_technology_screens.asp) screens, which are 25m high... are in fact, pretty square...


:):D:eek:
Pascal

DanielSun
2nd March 2008, 14:48
I have a maybe stupid question, why there are so many MARs (DARs),? I mean what movie have 2.35:1 and what movie have 2.40:1, how do I know exactly the right MAR(DAR) of a video source?

facialz
2nd March 2008, 16:14
2.35, 2.39 and 2.40 are one and the same.

SeeMoreDigital
2nd March 2008, 16:21
2.35, 2.39 and 2.40 are one and the same.No they're not...

A movie can be filmed, cropped and presented to any aspect ratio the director wishes :eek:

smok3
2nd March 2008, 20:09
Thats why it is easier to make calcs based on PAR (pixel aspect ratio).

SeeMoreDigital
2nd March 2008, 20:33
Thats why it is easier to make calcs based on PAR (pixel aspect ratio).Indeed...

Anyway, here's how I determine the original "Movie Aspect Ratio" (MAR) from a DVD source: -

http://forum.doom9.org/showthread.php?p=1034465#post1034465

chaynik
11th September 2009, 03:12
My apologies for reviving an old thread, but I really don't see the point of all of these custom values. Why is it assumed that ITU PAR/SAR values are incorrect?

True, most DVDs do have 720 as their horizontal resolution (although 704 is legal as well), but that is to account for overscan. I quote from "DVD Demystified" ISBN 0-07-135026-8 page 292
The 720- and 704-pixel rasters produce identical pixel aspect ratios because the 720-pixel version includes more of the horizontal overscan area (with a scanning line period of 53.33 microseconds), whereas the 704-pixel version is a tight scan (with a line period if 52.15 microseconds).

I also highly recommend reading Chris Pirazzi's Programmer's Guide to Video Systems (http://lurkertech.com/lg/video-systems) for some detailed info on these topics.

Both of these (and other video engineering sources) are unanimous on these concepts.

The correct way to encode a DVD "rip" to an MPEG-4 variant would be to crop 720 down to 704 and then apply the ITU PAR values.

Keiyakusha
11th September 2009, 15:45
chaynik
There is a lot of new DVD's (the ones I've seen is mostly anime) that uses full width 720px and needed to be resized 720->853.3 to looks right. The only absolutely correct way is trust your eyes first (round objects and other stuff) and if you fail to determine how it should look - then do by specs. Also not sure about what custom values you talking but DVDripping is not the only case when this tool can be handy.
Blindly following the specs is a bad idea since if video uses full width - it doesn't break any compliance but on modern hardware it can be displayed without this overscan stuff.

medp7060
26th October 2009, 10:17
the more I read, the more consuded I became. So many terms used differently: pixel frame size, movie aspect ratio, display aspect ratio, aspect ratio signalling, pixel aspect ratio ...

Boulder
28th November 2009, 00:02
Could someone please point me to the right direction regarding the --sar to set in x264:

I've got a 4:3 720x576 DVD source which has 12 pixels of black borders on the left and right and 2 pixels of black borders on the left and right side (so the active film pixels is 696x572). After cropping these off and resizing to the closest mod-16 resolution (with the help of MeGUI), I get the final resolution of the encode to be 704x528. How should I set the SAR to be in x264 so that the final encode will be displayed at the correct AR on my Popcorn Hour? Please teach me with some maths if possible (to understand better) :)

Keiyakusha
28th November 2009, 01:07
Boulder
If you do cropping + resizing - you shouldn't set SAR at all.

Boulder
28th November 2009, 10:11
Boulder
If you do cropping + resizing - you shouldn't set SAR at all.So I should assume that MeGUI always suggests SAR 1:1 if I deal with 4:3 sources?

What about the cases where I want to keep the encoded video anamorphic and let the PCH stretch the video to correct aspect ratio upon playback?

Sharc
29th November 2009, 19:25
Could someone please point me to the right direction regarding the --sar to set in x264:

I've got a 4:3 720x576 DVD source which has 12 pixels of black borders on the left and right and 2 pixels of black borders on the left and right side (so the active film pixels is 696x572). After cropping these off and resizing to the closest mod-16 resolution (with the help of MeGUI), I get the final resolution of the encode to be 704x528. How should I set the SAR to be in x264 so that the final encode will be displayed at the correct AR on my Popcorn Hour? Please teach me with some maths if possible (to understand better) :)

New sar = Original sar x (resized_height x cropped_width) : (cropped_height x resized_width).

You might get very high numbers, but no worry, x264 scales these automatically.

The original sar (=par in DVD terminology) you have to take from tables (ITU) or use your standard 'defaults' for PAL and NTSC DVD sources respectively.
For Blue-Ray the original --sar is normally 1:1 (actually I haven't seen any other).

In your case, assuming the 4:3 DVD has an original par following the ITU standard, the calculation yields:
New sar = 128:117 x (704x696) : (572x528) = 62717952:35335872=1.77491

smok3
29th November 2009, 23:27
yes, but if you crop 12px left and right and then get 704 that would be upsizing....
http://someotherstuff.co.cc/resize/index.php?ssmw=720&sar=1.094&sar2=&ssmh=576&CT=2&CL=12&CR=12&CB=2&mplayCrop=&trw=&dar=1.094&dar2=&modw=&modh=&padw=&padh=&css=&doit=true a no, no
edit: at the crop line, you can see those lil (-8px) and (-4px) values, which represent how far from modN value cropping one is

i would just crop to nearest mod16 values
http://someotherstuff.co.cc/resize/index.php?ssmw=720&sar=1.094&sar2=&ssmh=576&CT=8&CL=16&CR=16&CB=8&mplayCrop=&trw=688&dar=1.094&dar2=&modw=&modh=&padw=&padh=&css=&doit=true <- your answer
no scaling at all

and use your original sar, or use the one spit by the calc, which should be really close.

edit2: how close;
>>> 128.00/117.00
1.0940170940170941
>>> 547.00/500.00
1.0940000000000001

Boulder
30th November 2009, 04:45
yes, but if you crop 12px left and right and then get 704 that would be upsizing....
http://someotherstuff.co.cc/resize/index.php?ssmw=720&sar=1.094&sar2=&ssmh=576&CT=2&CL=12&CR=12&CB=2&mplayCrop=&trw=&dar=1.094&dar2=&modw=&modh=&padw=&padh=&css=&doit=true a no, no
edit: at the crop line, you can see those lil (-8px) and (-4px) values, which represent how far from modN value cropping one is

i would just crop to nearest mod16 values
http://someotherstuff.co.cc/resize/index.php?ssmw=720&sar=1.094&sar2=&ssmh=576&CT=8&CL=16&CR=16&CB=8&mplayCrop=&trw=688&dar=1.094&dar2=&modw=&modh=&padw=&padh=&css=&doit=true <- your answer
no scaling at all

and use your original sar, or use the one spit by the calc, which should be really close.

edit2: how close;
>>> 128.00/117.00
1.0940170940170941
>>> 547.00/500.00
1.0940000000000001Thanks, that tool looks really useful :) I usually try to just crop and not (down)size at all, but sometimes the amount to crop seems a bit much. I guess I should test and see how much penalty (regarding compression) is caused by not cropping at all if the amount is just a few pixels on each side.

Lebowsky
6th November 2015, 18:05
I love this tool and I hope someone is still watching this thread...

I can't figure the original movie aspect ration of a video. It's an NTSC dvd, with 16:9 DAR instead of 4:3. After cropping, the resolution is 720x338. How do you figure out the original movie aspect ratio?

foxyshadis
7th November 2015, 06:23
Since you didn't have to crop horizontally, that answer's easy: 853x480 is non-ITU 16:9, your video would be 853x338, so ratio is ~2.5. If you could ideally crop it a couple of pixels horizontally, that would make it 2.55, the CinemaScope standard. I'm guessing this movie is from the 50s or 60's?

Lebowsky
7th November 2015, 12:22
ok, so for 16:9 dvds, if you don't have to crop horizontally, it means it's non ITU? and if you do, it is ITU? is it the same for PAL?

TheSkiller
7th November 2015, 15:23
ok, so for 16:9 dvds, if you don't have to crop horizontally, it means it's non ITU? and if you do, it is ITU? is it the same for PAL?In my experience this is a good rule of thumb, and for film based sources (in contrast to electronic video cameras) indeed most often correct. It is however usually not correct if you are dealing with standard definition video camera based sources (famous example: MiniDV/Digital8 camcorders). Those often fill all 720 pixels but are ITU anyways.
My first hand experience is mostly about PAL, but from what I've read it applies to NTSC it the same manner.

For anamorphic 16:9 content I assume non-ITU, except when I know the video was recorded with a SD video camera, or if there's horizontal padding of at least 16 pixels.
For 4:3 content (letterboxed or not) I assume ITU, unless there's some reason not to.

foxyshadis
7th November 2015, 15:24
ITU ratio just means that you crop down to 702x before you resize to 16:9 or 4:3, that's where the black bars in most DVDs come from; anything else is non-ITU, usually that means all 720 pixels are used. Same for PAL and NTSC, though the anamorphic ratio is obviously different.

Some DVDs don't make any damn sense and have something else entirely, that's the nature of low-budget DVD production, so you just have to wing it and take your best guess how it should look. If it comes from anything besides a studio, it's almost guaranteed to be wonky.

SeeMoreDigital
7th November 2015, 16:18
Those little black columns to the left and right of the image were originally included to satisfy the 'over-scan' requirements of CRT display owners.

When flat screen televisions offered the option to disable over-scan and HDMI gave us the ability to send more accurately scanned images to our even newer flat screen televisions there wasn't any need to author DVD images with those little black columns :)