PDA

View Full Version : error in the DV faq about aspect ratios?


midiguy
4th February 2003, 03:46
<edit> "faw" = "faq" </edit>

hey BB, you said in your FAQ (check sticky) that people should crop 16 on each side, to get a total of 32 pixels cropped? wouldn't people need to crop 8 on each side, to get a total of 16 pixels cropped? MPEG-2 video under DVD spec has pixels with the same aspect ratio as DV, and I know with DVD you crop 8 onm each side to get the correct aspect, so why would DV be any different?

bb
4th February 2003, 07:26
These were the results of my personal tests, and they are valid at least for my camcorder. I don't know if these values are correct for every DV camcorder, but you can easily try yourself: Take a shot of a square sheet of paper, crop and resize, and see if the result looks square on the computer monitor (use one of the 4:3 resolutions like 1024x768).

bb

SomeJoe
4th February 2003, 18:45
midiguy,

Whether you want to crop pixels or not will depend on what your intended display device is. I produce video destined for NTSC televisions, and I never crop anything.

Standard NTSC DV is 720x480 with a 0.909 pixel aspect ratio. Now, if you do the math, 720*0.909 = 654.5, which is more than what you would expect. (Compensating for the pixel aspect ratio should get you to 640, because 640x480 is a 4:3 picture aspect ratio).

The secret is that 16 pixels of the 720x480 are overscanned on an NTSC TV. The actual displayed picture is 704x480. 704*0.909 = 640, which is expected.

So in short, if your MPEG-2 video will be displayed on an NTSC TV, don't crop or resize anything. If you want your MPEG-2 video to be watched on a computer monitor, the proper method is to crop 8 pixels from each side, resulting in 704x480, and then bicubic resize to 640x480. This gives you BOTH exactly proper aspect ratio on the computer monitor, AND exactly the same crop border on the computer monitor as on the NSTC TV.

The method for PAL results as follows:

PAL pixel aspect ratio is 1.0925. 720*1.0925 = 786.6, more than expected. So crop 8 pixels from each side again, = 704x576. 704*1.0925 = 769.12, slightly incorrect/off from the expected 768, but to fix would require cropping an odd number of pixels.

Take the 704x576 video (now properly cropped), and bicubic resize to 704x528 for proper display on the computer monitor. You can also resize to 640x480 if you want, but you throw away the extra 10% of resolution that the PAL system provides.

Chez_Wimpy
1st March 2003, 03:52
SomeJoe,

Thanks for the advice on cropping and pixel width. Below are some sample resize scripts I have written for avisynth incorporating your method (I think they are accurate, but if not, anyone feel free to comment). These assume 4:3 material, and can be applied to DV or DVD source:

NTSC
BicubicResize(640,480, 8.0, 0.0, 704.0, 480.0) #307200 pixels
BicubicResize(576,432, 8.0, 0.0, 704.0, 480.0) #248832 pixels
BicubicResize(448,336, 8.0, 0.0, 704.0, 480.0) #150528 pixels

PAL
BicubicResize(768,576, 8.5125, 0.0, 702.9748, 576.0) #442368 pixels
BicubicResize(720,540, 8.5125, 0.0, 702.9748, 576.0) #388800 pixels
BicubicResize(640,480, 8.5125, 0.0, 702.9748, 576.0) #307200 pixels
BicubicResize(576,432, 8.5125, 0.0, 702.9748, 576.0) #248832 pixels
BicubicResize(448,336, 8.5125, 0.0, 702.9748, 576.0) #150528 pixels

In fact, these PAL resize's should give a true 1:1 pixel AR (since floats are possible for crop/resize combos)

I am curious though, what about resizing 16:9 material (DV or DVD)? Should I just assume that all 720x480 or 720x576 pixels are included, and resize like this: BicubicResize(640,360)? Is cropping necessary?

Thanks for any knowledgeable replies... I have been encoding video for years, and until now had no clue about the 704 vs 720 discrepency.

SomeJoe
2nd March 2003, 02:06
Originally posted by Chez_Wimpy
I am curious though, what about resizing 16:9 material (DV or DVD)? Should I just assume that all 720x480 or 720x576 pixels are included, and resize like this: BicubicResize(640,360)? Is cropping necessary?

The 16:9 conversions are somewhat approximate, and there is more than one way to do it. The problem results because there is no standard for the overscan on a 16:9 NTSC display, and the 16:9 picture data has been anamorphically squeezed into the 4:3 NTSC frame, which is itself a backfitted jury rig. :)

But, here is one way to do it:

NTSC:

The DV/DVD picture is 720x480, with a pixel aspect ratio of 1.212. 720 * 1.212 = 873, which is more than the expected 853. Assume the same overscan as a 4:3 display, so actual displayed data is 704x480, same pixel aspect ratio. Now 704 * 1.212 = 853, as expected. You would crop to that size, and then resize this to 704x396 for computer display, and again you have proper aspect ratio on the computer monitor and identical crop borders as a 16:9 NTSC TV.

For creating art/menus/etc. for 16:9, start with an image size of 873x480. After you're finished, resize to 720x480.

PAL:

The DV/DVD picture is 720x576, with a pixel aspect ratio of 1.455. 720 x 1.455 = 1048, which is more than the expected 1024. Assume the same overscan as a 4:3 display, so actual displayed data is 704x576, same pixel aspect ratio. Now 704 * 1.455 = 1024, as expected. You would crop to that size, and then resize this to 704x396 for computer display, and again you have proper aspect ratio on the computer monitor and identical crop borders as a 16:9 PAL TV.

For creating art/menus/etc. for 16:9, start with an image size of 1048x576. After you're finished, resize to 720x576.

By the way, all of these numbers are slightly off from the way that digital video is actually supposed to be done. For the true low-down on sizes and aspect ratios, see this (http://www.uwasa.fi/~f76998/video/conversion/) page. We simplify this stuff for convenience, but it's actually quite complicated. ;)

Chez_Wimpy
3rd March 2003, 01:00
Very cool, thanks for the extra info. You are right about overscan, it doesn't seem to be uniform. On some of my 16:9 sources picture information extends to the edge, on others there are black bars (made even more confusing by virtue of the fact that some 16:9 DVDs are sourced from < 1.777 material, where black bars are not necessarily indicative of overscan). Still, I was able to come up with the following avisynth resize guidelines (based on SomeJoe's posted pixel AR, so the "704 guideline" has been altered a bit):

PAL

#4:3 | Pixel AR = 1.0925
BicubicResize(704,528, 8.5125, 0.0, 702.9748, 576.0) #371712 pixels
BicubicResize(640,480, 8.5125, 0.0, 702.9748, 576.0) #307200 pixels
BicubicResize(576,432, 8.5125, 0.0, 702.9748, 576.0) #248832 pixels
BicubicResize(448,336, 8.5125, 0.0, 702.9748, 576.0) #150528 pixels
BicubicResize(384,288, 8.5125, 0.0, 702.9748, 576.0) #110592 pixels
#16:9 with overscan | Pixel AR = 1.455
BicubicResize(704,396, 8.10997, 0.0, 703.78007, 576.0) #278784 pixels
BicubicResize(640,360, 8.10997, 0.0, 703.78007, 576.0) #230400 pixels
BicubicResize(576,324, 8.10997, 0.0, 703.78007, 576.0) #186624 pixels
BicubicResize(512,288, 8.10997, 0.0, 703.78007, 576.0) #147456 pixels
#16:9 w/o overscan
BicubicResize(720,404, 0.0, 0.7111, 720.0, 574.5778) #290880 pixels

NTSC

#4:3 | Pixel AR = 0.909
BicubicResize(640,480, 7.9648, 0.0, 704.07041, 480.0) #307200 pixels
BicubicResize(576,432, 7.9648, 0.0, 704.07041, 480.0) #248832 pixels
BicubicResize(448,336, 7.9648, 0.0, 704.07041, 480.0) #150528 pixels
#16:9 with overscan | Pixel AR = 1.212
BicubicResize(704,396, 8.10231, 0.0, 703.79538, 480.0) #278784 pixels
BicubicResize(640,360, 8.10231, 0.0, 703.79538, 480.0) #230400 pixels
BicubicResize(576,324, 8.10231, 0.0, 703.79538, 480.0) #186624 pixels
BicubicResize(512,288, 8.10231, 0.0, 703.79538, 480.0) #147456 pixels
#16:9 w/o overscan
BicubicResize(720,404, 0.0, 0.59259, 720.0, 478.81481) #290880 pixels

For resizing 16:9 without overscan, no cropping *should* be necessary. In that case, to retain 720 horizontal, it is necessary to crop vertically slightly before resize (as 720x405 is not a valid output).

SomeJoe
3rd March 2003, 04:57
Originally posted by Chez_Wimpy
You are right about overscan, it doesn't seem to be uniform.

Very true. I've seen a few 16:9 displays that do overscan, and then I've seen some that behave more like computer monitors where all of the 720x480 picture is displayed.

Here's a recalculation on my numbers for no overscan:

NTSC:

The DV/DVD picture is 720x480, with a pixel aspect ratio of 1.185. 720 * 1.185 = 853. No crop necessary for display on the computer screen, so just resize this to 720x405 for computer display.

For creating art/menus/etc. for 16:9, start with an image size of 853x480. After you're finished, resize to 720x480.

PAL:

The DV/DVD picture is 720x576, with a pixel aspect ratio of 1.422. 720 x 1.422 = 1024. No crop necessary for display on the computer screen, so just resize this to 720x405 for computer display.

For creating art/menus/etc. for 16:9, start with an image size of 1024x576. After you're finished, resize to 720x576.

midiguy
7th June 2003, 19:45
Originally posted by SomeJoe
midiguy,

Whether you want to crop pixels or not will depend on what your intended display device is. I produce video destined for NTSC televisions, and I never crop anything.

Yeah... I know that. I was just talking specifically about computer use, where the pixel and picture aspect ratios are 1:1

Jaester
9th August 2003, 15:29
Now, if you want to show your video on a NTSC TV but using the video output of your computer: what should be the target resolution? The NTSC 720x480, computer 640x480 (croping 16) or computer 655x480?

Jaester

Metaluna
5th November 2003, 16:59
If you are resizing to half-D1 (352x480/352x576), what is the right thing to do for NTSC TV display? Based on the analysis presented in this thread, and realizing that 352 is exactly half of 704, it seems to suggest that the 352 would only include the visible area and an extra 4 pixels should be added on each side for overscan (i.e. 360x480). 360 is not a legal horizontal resolution for DVD however. So should you leave the horizontal at 720 and resize to 352, or crop to 704 first?

bb
5th November 2003, 18:43
For correct display on a TV set through PC's TV out you should resize to PC 1:1 pixel aspect ratio resolutions, just like you would do it if you'd watch the film on the PC monitor. The TV card should adapt the pixel aspect ratio, so that the display is correct on the TV set, too (at least my TV cards do that, and there should be no difference between PAL and NTSC in this case).

But to make sure you can easily test it yourself: Encode a shot of a square sheet of paper, resize it according to the guide and verify, that it's square on both your PC monitor and the TV set. I'd be glad if someone could post her / his results.

bb

North2Polaris
19th November 2003, 20:58
[QUOTE]Originally posted by SomeJoe
[B]midiguy,

"Standard NTSC DV is 720x480 with a 0.909 pixel aspect ratio."

According to “A Quick Guide to Digital Video Resolution and Aspect Ratio Conversions”:

http://www.uwasa.fi/~f76998/video/conversion/

the pixel aspect ratio (x/y) is 72/79, which equals 0.911, for a sampling matrix of 720X480 on 525-line television systems with 59.94 Hz field rate. This is for DV, DVB, DVD, SVCD, according to the conversion table.

Which is correct, 0.909 or 72/79?

Thanks.

SomeJoe
21st November 2003, 16:22
Originally posted by North2Polaris
the pixel aspect ratio (x/y) is 72/79, which equals 0.911, for a sampling matrix of 720X480 on 525-line television systems with 59.94 Hz field rate. This is for DV, DVB, DVD, SVCD, according to the conversion table.

Which is correct, 0.909 or 72/79?

He's correct, the true pixel aspect ratio of the active picture area of the analog signal, when sampled at the ITU-601 sampling rate of 13.5MHz, is 72/79 (0.91139). This number is arrived at because the actual picture area of the analog signal is 711x486, which is meant to be displayed as 4:3. Thus:

(486*4)/(711*3) = 0.91139 = 72/79.

However, when computers display a 720x480 image (like from a DVD), they do not make the actual conversion to active picture area. They take the sampled 720x480 matrix, crop the 8 pixels on each side which is oversampled/overscanned, and assume 704x480 is the actual picture area. To display this on a computer display with square pixels, the pixel aspect ratio is assumed to be:

(480*4)/(704*3) = 0.909.

0.909 is also the pixel aspect ratio displayed in the Adobe Premiere dialog box for PAR selections, which I believe is where I originally got that number before I went over that guy's site with a fine-toothed comb and learned how it really works. :D :p

North2Polaris
22nd November 2003, 04:01
Thank you for your explanation! After reading your post, I found another reference by Chris Pirazzi on Square and Non-Square Pixels at:

http://www.lurkertech.com/lg/pixelaspect.html

According to the Pirazzi article, in SGI libraries, pixel aspect ratio is specified as a fraction of vertical (y) pixel size divided by (x) horizontal pixel size. In “A Quick Guide to Digital Video Resolution and Aspect Ratio Conventions” that you cited above, the pixel aspect ratio is defined in x/y format.

I found the pictures in the Pirazzi article to be helpful, but I am still puzzled. According to Pirazzi, the actual pixel aspect ratios are defined purely in terms of the pixel sampling frequency of each video standard:

* Rec. 601 digital video is always sampled at 13.5 million pixels per second (for both 525 and 625).
* If you have a 525-line analog NTSC (ANSI/SMPTE 170M-1994) video signal which you want to sample square pixel, the industry standard is to sample at exactly 12 + 27/99 million pixels per second.
* If you have a 625-line analog PAL (Rec. ITU-R BT.470-3) video signal which you want to sample square pixel, the industry standard is to sample at exactly 14.75 million pixels per second.
* Therefore, we can derive from this that:
525-line Rec.601 pixel aspect ratio = 13.5 / (12 + 27/99) = exactly 11/10 (y/x)
625-line Rec.601 pixel aspect ratio = 13.5 / (14.75) = exactly 54/59 (y/x)

Thus, for 525-line video, the 11/10 ratio is used to convert square pixels to non-square pixels; and the inverse of that ratio, which is 10/11 or 0.909, is used to convert non-square pixels to square pixels.

Based on one of the practical examples in the “A Quick Guide to Digital Video Resolution and Aspect Ratio Conventions”, incorporating a DV clip that uses ITU-R BT.601 pixels and a resolution of 720x480 into a video project based on 640x480 industry standard square pixels, requires a horizontal scaling factor of 10/11 or 0.909.

Part of the problem in trying to understand these concepts is the definition of terms. In this case, one person’s “horizontal scaling factor” appears to be the inverse of another person’s “pixel aspect ratio”.

I find "horizontal scaling factor" to be a useful concept, now that I understand where it comes from.

What are the practical implications of this? We still need to take 8 pixels from both side edges and resample the 704x480 image to 640x480.

So why did I go through this? I guess that is what being a newbie is all about.

snowcrash
12th January 2004, 11:44
So on a TV there is no overscan on the tops and bottoms, only on the sides?

SomeJoe
13th January 2004, 18:44
Originally posted by snowcrash
So on a TV there is no overscan on the tops and bottoms, only on the sides?

No, typical 4:3 TVs overscan by about 5% on all sides, including top and bottom. For the DV sample matrix of 720x480, this means that the central 648x432 pixels are visible on the screen.

When working with digital video, these 5% inset boundaries are referred to as the "action safe" region - the region where action in the frame is visible on the screen.

There is another set of inset boundaries at 10% (central 576x384 pixels) which is referred to as "title safe". This is the area where all titles and screen text/graphic overlays are supposed to be placed. This is so that the text and graphics are fully readable even if the consumer's TV is out of adjustment or old, and happens to overscan more than 5%.

As mentioned earlier in this thread, 16:9 TVs can come in different flavors -- some overscan 5% just like a 4:3 TV, while others behave more like computer monitors and show the entire frame.

snowcrash
13th January 2004, 22:58
Originally posted by SomeJoe
No, typical 4:3 TVs overscan by about 5% on all sides, including top and bottom. For the DV sample matrix of 720x480, this means that the central 648x432 pixels are visible on the screen.


SomeJoe,

In that case, how do the resizing methods that you described above give accurate output when they do not appear to make any attempt to compensate for overscan on the top and bottom of the video. I understand, with NTSC for example, that you are cropping 8 pixels on each side and that compensates for TV overscan on the sides. But why then are you not cropping anything on the top and bottom?

snowcrash
13th January 2004, 23:07
Well, after thinking about it some more I think I understand what's going on. The 704x480 crop method isn't actually trying to reproduce the viewable area that is seen on the TV, just the proper aspect ratio. The video cropped for PC will actually show more than what is seen on the TV. Is this correct?

bb
14th January 2004, 09:18
snowcrash, that's correct. :)
In fact you don't crop to compensate for TV overscan, but add black borders instead.

bb

henryho_hk
15th May 2004, 08:07
Remember to deinterlace the video before resize.... ;)

Meat_PoPsiclez
19th May 2005, 04:55
Originally posted by SomeJoe
[B]Very true. I've seen a few 16:9 displays that do overscan, and then I've seen some that behave more like computer monitors where all of the 720x480 picture is displayed.

I have an oddity of a sd television, a pioneer "cimemascreen" rptv. It produces 720x480 in a 1.5:1 aspect ration with no overscan (less than a few pixels in each direction). Overscan corrected sources like videogames actually leave black borders on the sides, even though the tv has no aspect adjustments (being a pure analog tv).

Also, to my horror and dismay, a RCA Scenium 16:9 hdtv I had a chance to work with produces nearly 80.. 80 pixels of horizontal overscan in 1080i, and a considerable amount of vertical overscan, likely in scale. Apparently, in our age of high-def some companies feel that standards compliance (which hd standard specifies) is a useless prospect. When operating in 480i and p modes it produced very little overscan, seemingly similiar to a normal television.

I think it's best to try and consider the overscan during filming, so you can find a good result without too much (possibly) quality detrimental post work.

2Bdecided
13th April 2006, 11:27
I'm glad this thread reached a sensible conclusion, because the earlier suggestion that 720 is equivalent to 704 "plus overscan" is simply wrong.

704 is approximately the width of the analogue active picture ( http://lipas.uwasa.fi/~f76998/video/conversion/ gives more accurate values). As explained on that page, samples outside this range (up to 720) are used when sampling analogue video signals to make sure pixels aren't lost at the edge when the sync isn't quite right, and to avoid single pixel transitions from black to picture causing ringing. The extra pixels are outside the 16:9 and 4:3 active picture area.

It seems to me there's no need to crop anything when going from DV to DVD, but there is good reason to crop down to 704 before resizing to a 1:1 PC resolution.

Cheers,
David.

Vetal
12th February 2008, 20:29
Thank you for your explanation! After reading your post, I found another reference by Chris Pirazzi on Square and Non-Square Pixels at:

http://www.lurkertech.com/lg/pixelaspect.html

According to the Pirazzi article, in SGI libraries, pixel aspect ratio is specified as a fraction of vertical (y) pixel size divided by (x) horizontal pixel size. In “A Quick Guide to Digital Video Resolution and Aspect Ratio Conventions” that you cited above, the pixel aspect ratio is defined in x/y format.

I found the pictures in the Pirazzi article to be helpful, but I am still puzzled. According to Pirazzi, the actual pixel aspect ratios are defined purely in terms of the pixel sampling frequency of each video standard:

* Rec. 601 digital video is always sampled at 13.5 million pixels per second (for both 525 and 625).
* If you have a 525-line analog NTSC (ANSI/SMPTE 170M-1994) video signal which you want to sample square pixel, the industry standard is to sample at exactly 12 + 27/99 million pixels per second.
* If you have a 625-line analog PAL (Rec. ITU-R BT.470-3) video signal which you want to sample square pixel, the industry standard is to sample at exactly 14.75 million pixels per second.
* Therefore, we can derive from this that:
525-line Rec.601 pixel aspect ratio = 13.5 / (12 + 27/99) = exactly 11/10 (y/x)
625-line Rec.601 pixel aspect ratio = 13.5 / (14.75) = exactly 54/59 (y/x)

Thus, for 525-line video, the 11/10 ratio is used to convert square pixels to non-square pixels; and the inverse of that ratio, which is 10/11 or 0.909, is used to convert non-square pixels to square pixels.

Based on one of the practical examples in the “A Quick Guide to Digital Video Resolution and Aspect Ratio Conventions”, incorporating a DV clip that uses ITU-R BT.601 pixels and a resolution of 720x480 into a video project based on 640x480 industry standard square pixels, requires a horizontal scaling factor of 10/11 or 0.909.

Part of the problem in trying to understand these concepts is the definition of terms. In this case, one person’s “horizontal scaling factor” appears to be the inverse of another person’s “pixel aspect ratio”.

I find "horizontal scaling factor" to be a useful concept, now that I understand where it comes from.

What are the practical implications of this? We still need to take 8 pixels from both side edges and resample the 704x480 image to 640x480.

So why did I go through this? I guess that is what being a newbie is all about.

Wow, I'm overwhelmed with all that details.

I am using x264 and capuring with NTSC DV
If I want to see videon computer screen or on TV hooked to computer, while I want to preserve all video without cropping. Can I just set "-sar 10:11" when encoding and that's it?

I used 8:9 all the time before (720x480 => 640:480, 4:3). But 10:11 looks even better, but I don't know for sure, because a difference is in subjective range.

So which SAR is better for case above, 8:9 or 10:11?

Thank you

2Bdecided
14th February 2008, 12:50
With the caveat that I've never used NTSC DV or x264, the "correct" pixel aspect ratio of NTSC DV is 10:11. Your camera may vary.

The software needs to crop to 704x480, and convert that cropped image to 640x480. If you want to keep the full 720 width, at the correct pixel aspect ratio, then you need about 654 pixels (!) in the output.

Cheers,
David.

2Bdecided
14th February 2008, 14:34
I have a radical suggestion.

Given that...

1. It's very complicated: http://lipas.uwasa.fi/~f76998/video/conversion/

2. It's even more complicated than that, because Jukka Aho "conveniently" ignored the analogue half lines. If you base the calculations on the correct analogue picture dimensions, it's even worse!

3. The basic descriptor in the MPEG-2 standards give the display aspect ratio rather than pixel aspect ratio, so "officially" (and incorrectly) 720x576 and 720x480 really do equal 4:3 (or 16:9).

4. Industry standards simply state the pixel aspect ratios as 59/54 (4x3 PAL) and 10/11 (4x3 NTSC). The PAL one is within 0.04% of the correct values (4x3 PAL = 1150/1053 exactly) if you take account of the analogue half lines properly, but these are often ignored in the digital world.

5. Downconversions from 16:9 HD fill all the 720 width, even though it's not there in the original, so the aspect ratio is almost certainly being changed.

6. PC playback software follows the MPEG-2 flags, and displays 720x576, 704x576, 720x480 and 704x480 all at 4x3 (or 16x9), while DVD players connected to calibrated TVs will only display the middle 702x576 as 4x3 (or 16x9) - there are always 2 or 16 pixels outside of the active area.

Given all of this, it could be argued that to minimise aspect ratio errors across the full range of standards and display devices, the absolute "best" that can be done is to encode at 704x576 or 704x480 only (never 720, which is unpredictable on PCs vs TVs), and to treat that as the full active area.

If you do this, then the error for PAL is less than one video pixel WRT the correct aspect ratio (where 702x575 = 4x3 or 16x9). I haven't been through NTSC from first principles, since the "correct" vertical height of an NTSC image is not clear to me. However, the error, if you believe the industry standards, is exactly zero for 4x3, and less than one pixel for 16x9.


Therefore:

"PAL"
4x3 768x576 = 704x576
16x9 1024x576 = 704x576

"NTSC"
4x3 640x480 = 704x480
16x9 854x480 = 704x480


So there you have it. Stop worrying. Treat 704 as the full picture and you'll never be more than a pixel out.

2012 Edit: 704 pixels is not strictly valid for anamorphic 16x9 DVD and may cause problems on some old DVD players
details here: http://forum.doom9.org/showthread.php?p=1549376#post1549376

Cheers,
David.

Vetal
14th February 2008, 15:16
I
"NTSC"
4x3 640x480 = 704x480
16x9 854x480 = 704x480


So there you have it. Stop worrying. Treat 704 as the full picture and you'll never be more than a pixel out.

Cheers,
David.

Thank you David,

One more question, what does it mean in procedural terms, "treat 704 as the full picture"?

a) Crop to 704x480 and apply SAR(10:11) ?
b) Downscale to 720x480 => 704x480 and apply SAR(10:11)?
c) Based on "your camera may vary", I should tape a square and find right AR, by applying ruler on my display. So its sizes on computer screen are equal. Ensuring display has 1:1 pixel AR, of course.

Thank you!

2Bdecided
14th February 2008, 18:34
Don't do (b)!

Cheers,
David.

Vetal
15th February 2008, 00:09
Don't do (b)!

Cheers,
David.

Thank David.

From what I got we are talking about the same thing:

If you want to keep the full 720 width, at the correct pixel aspect ratio, then you need about 654 pixels (!) in the output.


Is it come from

720/480 * 10/11 = x/480

Where x= 654.5.

So if I compress 720x480 with AR set to 10:11 inside mp4 container. And player will rescale it in windowed mode at 100% to 654x480. Or to any other scale while preserving AR, I.e. to full screen.

Because cropping (720=> 704) does not change SAR, it cuts off 8-pixel wide bands from sides. And after the player render the result, result would be the same, but with some information cropped from the sides, nothing more than that. I.e. it would crop 2*8*(10/11) = ~14 pixels. And it would give 640 pixels width (654 - 14). But those 2x8 pixels are not a noise, it is part of the image. Why should I crop them, that is my question.

Thank you

2Bdecided
15th February 2008, 13:20
If the player works correctly, and you're scaling on playback, then there's no need to crop.

It's MPEG-2 that I've had issues with; if the source is mod16 and contains only the active 4x3, it removes some of these issues. You may not have these issues with mp4 - I don't know, sorry.

Cheers,
David.

frank
15th February 2008, 18:44
Given all of this, it could be argued that to minimise aspect ratio errors across the full range of standards and display devices, the absolute "best" that can be done is to encode at 704x576 or 704x480 (never 720, which is unpredictable on PCs vs TVs), and to treat that as the full active area.

Agree.

Software dvd players (like PowerDVD) show 720x576, 720x480MPEG-2 pictures with wrong aspect ratio because they use it as active area. Don't trust them!
But 704x576, 704x480 handling is ok.

Not enough: A lot of new movies are encoded with this issue.
(All Harry Potters use 720x576 = 16:9). And so only the software players show the right AR on PC.
And look at the circle calibration tool on dvd Ratatouille, circle 720x576 PAL - same issue!

2Bdecided
18th February 2008, 15:44
And look at the circle calibration tool on dvd Ratatouille, circle 720x576 PAL - same issue!Really? That's the first proof I've seen that this happens. It means none of these DVDs will play back with the correct aspect ratio on a "correctly" calibrated TV.

Maybe that's why they include a calibration tool - so you can adjust your TV to match the mistake on the DVD! ;)

Cheers,
David.

facialz
22nd February 2008, 17:45
Table of commonly correct and incorrect encoding. Incorrect encoding may be implied from wrong assumption about the shape of the active display area of the source.




Source IAR FAR PAR Comment
========= ===== ===== ===== ===============
PAL 4/3 5/4 15/11 12/11 Correct *
PAL 4/3 5/4 4/3 16/15 Incorrect
PAL 4/3 11/9 4/3 12/11 Correct *

PAL 16/9 5/4 20/11 16/11 Correct *
PAL 16/9 5/4 16/9 64/45 Incorrect
PAL 16/9 11/9 16/9 16/11 Correct *

NTSC 4/3 3/2 15/11 10/11 Correct *
NTSC 4/3 3/2 4/3 8/9 Incorrect
NTSC 4/3 22/15 4/3 10/11 Correct *

NTSC 16/9 3/2 20/11 40/33 Correct *
NTSC 16/9 3/2 16/9 32/27 Incorrect
NTSC 16/9 22/15 16/9 40/33 Correct *

* Absolutely correct with respect to ITU-T H.264 [1]
and approximately correct with respect to a possible interpretation [2] of (analogue) PAL / NTSC standards, ITU-R BT.601, and all digital standards based on them (D1, DV,...).

PAR: pixel aspect ratio, aka sample aspect ratio.
FAR: frame aspect ratio, aka display aspect ratio, aka picture aspect ratio.
IAR: image aspect ratio, aka storage aspect ratio. For example, 720/480 = 3/2 and 704/480 = 22/15.




Reference

[1] ISO/IEC MPEG - ITU-T VCEG Joint Video Team (JVT): Draft ITU-T H.264 (2002E) and ISO/IEC 14496-10:2002(E), aka AVC standard. Table E-1.

[2] Jukka Aho: A Quick Guide to Digital Video Resolution and Aspect Ratio Conversions. http://www.iki.fi/znark/video/conversion/

facialz
9th March 2008, 17:03
Table of PAL PARs, sampled under 13.5 MHz
Width Height PAR Error Used by
========= ====== =========== ======= ==============
702 576 128/117 +0.174% Aho, MeGUI
690 566 1132/1035 +0.147% SMPTE RP-187
702+54/59 576 59/54 +0.043% Sony, Apple
702 575 1150/1053 0 MPEG-1, MPEG-2
704 576 12/11 -0.111% MPEG-1, ASP, AVC, Microsoft
720 576 16/15 -2.330% Avidemux
720? 576? 1.066 -2.391% Adobe


Table of NTSC PARs, sampled under 13.5 MHz
Width Height PAR Error Used by
========= ====== =========== ======= ==============
711 487 1948/2133 +0.391% MPEG-1
710.85 486 4320/4739 +0.206% Aho
711 486 72/79 +0.185% Aho, MeGUI
710.85 485 38800/42651 0 ?
704 480 10/11 -0.068% MPEG-1, ASP, AVC, Sony, Apple, Microsoft
711 483 644/711 -0.433% MPEG-2
708 480 160/177 -0.633% SMPTE RP-187
720 486 0.9 -1.067% Adobe
720 480 8/9 -2.289% Avidemux



Width and Height are of the reference image, i.e. one defining the 4/3 FAR.

Errors are relative to the PAR based on the 52µs/575 PAL and (52+59/90)µs/485 NTSC reference image, respectively.

2Bdecided
13th March 2008, 20:17
Thank you facialz.

It's interesting that several of those are within one pixel (which is the point at which I think any reasonable person stops worrying!) but some are much further off.

Cheers,
David.

Overdrive80
20th December 2010, 02:26
In this page http://en.wikipedia.org/wiki/ATSC_Standards say something diferente at facialz. O_o

2Bdecided
20th December 2010, 15:14
In this page http://en.wikipedia.org/wiki/ATSC_Standards say something diferente at facialz. O_oWhat do you mean?

(The only PARs I can find on that page are for x.264/AVC, and for 4:3 it says 10/11, just like facialz's post from March 2008.)

Cheers,
David.