Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
1st February 2006, 04:52 | #1 | Link |
Registered User
Join Date: Dec 2005
Posts: 145
|
Sample Aspect Ratio calcutions
Source/Encoded Resolution ( X:Y )
Desired Display Resolution/Aspect Ratio ( H:V ) The formula to calculate PAR/SAR Y ÷ X ÷ V x H = SAR fraction for example a NTSC 16:9 with resolution 720:480 480 ÷ 720 ÷ 9 x 16 = 1.185185185... (32/27) therefore the Sample Aspect Ratio that should be keyed in in MeGUI is 32x27 for NTSC 4:3 with resolution 704:480 480 ÷ 704 ÷ 3 x 4 = 0.88888...(10/11) SAR = 10x11 CROPPING without resizing won't affect the SAR Any comments on the way I calculate SAR? I took quite some time to understand that SAR is actually the ratio of every single pixel..not the ratio displayed by the video frame |
1st February 2006, 10:28 | #2 | Link |
n00b ever
Join Date: May 2002
Posts: 627
|
@kotrtim
the way u derive (s)ar is ok but why do u use different vertical resolutions for the 4/3 and for the 16/9 streams. maybe it's ok (i'm living in the pal world ) just ask. however, the values calculated Code:
- for ntsc 720 x 4:3 64:72 (8:9) 16:9 64:54 (32:27) - for ntsc 704 x 4:3 10:11 16:9 16:11 y Last edited by yaz; 1st February 2006 at 10:31. |
2nd February 2006, 20:57 | #3 | Link |
Registered User
Join Date: Dec 2003
Posts: 51
|
Cropping will change the SAR, at least thats what I was told in the similar thread I posted. This comment might be of use, I saved it and use this calculation...
"The actual way meGUI calculates the SAR is as follows: 1) Apply the cropping and then determine the aspect ratio of the input video image (inputPixelCountRatio). 2) Scale the vertical resolution according to the horizontal resolution that's been specified (resizedVerticalResolution = horizontalResolution / inputPixelCountRatio) 3) Adjust the vertical resolution so that it matches the closest multiple of 16. 4) Set SARX to the horizontal resolution. 5) Set SARY to Round(HorizontalResolution^2 / (VerticalResolution * DAR)), this is then truncated to an integer." So if you're not resizing you can ignore 1-3 and use the horizontal and vertical resolution after you've cropped. Last edited by Raithmir; 2nd February 2006 at 21:04. |
2nd February 2006, 21:03 | #4 | Link |
Registered User
Join Date: Dec 2003
Posts: 51
|
http://forum.doom9.org/showthread.php?t=104485
Some confusing information at first but read the whole thread. No doubt someone else will come along and tell me it's all wrong and I'm doing it incorrectly again. |
3rd February 2006, 05:06 | #5 | Link |
Registered User
Join Date: Dec 2005
Posts: 145
|
My opinion is SAR won't change after cropping as you crop off pixels, and SAR is the ratio of every pixel, so the value of SAR should not change whereas the DAR will change as DAR is the measurement of the whole frame, when you croped, the frame size definitely changes.
If we want to resize, why not just resize so that it is 1:1, of course this is just my opinion |
3rd February 2006, 06:41 | #6 | Link | |
Registered User
Join Date: Jan 2006
Posts: 294
|
Quote:
|
|
3rd February 2006, 12:02 | #7 | Link |
n00b ever
Join Date: May 2002
Posts: 627
|
cropping does not change the way of derivation (resizing). if u crop the stream (sar) u 'crop' also what u get on the display (dar). u'd better think of it as 'how to distort each pixel so as to get the right aspect ratio on the display'.
say, u got a pal 4:3 dvd. its stream size is 720x576 (by def) which is 5/4 ratio. it must be displayed 4/3 so as to get the correct ratio on the display, so, it must be resized to 768x576. it is the same as displaying each pixel in a 16x15 rectangle instead of a 15x15 square (measured in whatever unit). if u crop it to 704x576 (for any reason) it must be resized the same way, so the display size must be ~751x576. otherwise the picture on the display will be distorted. it's simple as that the bests y |
3rd February 2006, 12:29 | #8 | Link |
Registered User
Join Date: Jan 2006
Posts: 294
|
But why is it that the "true" DAR includes black bars? Surely they are not part of the actual image, and it should be resized to 4:3 without them. Like if you cropped to 704x576 to give the full image, shouldn't that then be resized to 768x576 (instead of 751x as with counting the black bars) to give proper AR since the original T.V. show was 4:3 (and had no black bars originally)?
|
4th February 2006, 22:34 | #9 | Link |
Registered User
Join Date: Jul 2005
Posts: 240
|
Not being the best at math, is there any easy way to work out the lowest common denominator? Is it possible to enter in 1920:2112 as the SAR in MeGUI or must I absolutely break it down further?
__________________
Toronto,ON |
5th February 2006, 00:50 | #11 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
|
Quote:
However, this could be further converted to say: - Code:
1080 27 ---- which, in turn decimates to -- 880 22 Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
Last edited by SeeMoreDigital; 5th February 2006 at 01:05. |
|
5th February 2006, 18:00 | #12 | Link | |
Registered User
Join Date: Jul 2005
Posts: 240
|
Quote:
Is there a formula as to how to work out the lowest common den? Is it just guess work with a calculator? Give me something to go on..lol
__________________
Toronto,ON |
|
5th February 2006, 18:17 | #13 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
|
Quote:
EDIT: Here's a 2.35:1 video sample, with a pixel frame size of 704x368 and aspect ratio sigalling at 199:162. Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
Last edited by SeeMoreDigital; 5th February 2006 at 22:33. |
|
6th February 2006, 10:43 | #16 | Link |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
SMD likes to stick to non-standard terminology. I think his MAR is the playback AR (after cropping away the black borders). If that's the case, than in many cases you don't know the MAR in advance, unless it is specified on the box of the dvd.
|
6th February 2006, 19:09 | #17 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
|
Quote:
After looking at the back of a few DVD cases I've found several other expressions, such as: Original Theatrical Presentation, Original Theatrical Exhibition, Presented in x.xx:x, TV Aspect Ratio. Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
8th February 2006, 11:40 | #18 | Link |
20-35 a win for Revolver.
Join Date: Mar 2004
Location: FR.26
Posts: 221
|
Hum ... long & interesting post !
so I've a question : is my way is right or fully ...bad... ? My way : For both PAL and NTSC DVD, I just crop up and bottom ( if side borders are not too large ) ... never resize ! And I know : > PAL : 720*576 -> 1024*576 > NTSC : 720*480 -> 854*480 So if my cropped frame is 720*416 (PAL) for exemple , my AR in MkvMergeGui is 1024*416 ... is it right or not ?! Thanks everybody |
8th February 2006, 11:47 | #19 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
|
If we are not following the ITU specification to the letter, which most (if not all) software players, don't appear to follow.... then the answer is yes
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
8th February 2006, 11:55 | #20 | Link | ||
20-35 a win for Revolver.
Join Date: Mar 2004
Location: FR.26
Posts: 221
|
Quote:
[Edit] -> I will read all on your www ... it looks great ! Quote:
My way looks really simple beside all your heavy-sci-math-computing So if I'm wrong for 1 ou 2 pixels in height ... what the matter ?! Thanks for answer SeeMoreDigital ! ( from where is your avatar ? a movie, but which ? ) Last edited by Seb.26; 8th February 2006 at 12:06. |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|