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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > DV

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th February 2003, 03:46   #1  |  Link
midiguy
Registered User
 
Join Date: Feb 2002
Location: Toronto, Canada
Posts: 407
error in the DV faq about aspect ratios?

<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?

Last edited by midiguy; 29th December 2003 at 09:59.
midiguy is offline   Reply With Quote
Old 4th February 2003, 07:26   #2  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
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
bb is offline   Reply With Quote
Old 4th February 2003, 18:45   #3  |  Link
SomeJoe
Registered User
 
Join Date: Jan 2003
Posts: 315
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.
__________________
- SomeJoe
SomeJoe is offline   Reply With Quote
Old 1st March 2003, 03:52   #4  |  Link
Chez_Wimpy
Registered User
 
Chez_Wimpy's Avatar
 
Join Date: Feb 2003
Location: Hokkaido, Japan
Posts: 28
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.
__________________
-CTB
Chez_Wimpy is offline   Reply With Quote
Old 2nd March 2003, 02:06   #5  |  Link
SomeJoe
Registered User
 
Join Date: Jan 2003
Posts: 315
Quote:
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 page. We simplify this stuff for convenience, but it's actually quite complicated.
__________________
- SomeJoe

Last edited by SomeJoe; 2nd March 2003 at 21:23.
SomeJoe is offline   Reply With Quote
Old 3rd March 2003, 01:00   #6  |  Link
Chez_Wimpy
Registered User
 
Chez_Wimpy's Avatar
 
Join Date: Feb 2003
Location: Hokkaido, Japan
Posts: 28
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).
__________________
-CTB
Chez_Wimpy is offline   Reply With Quote
Old 3rd March 2003, 04:57   #7  |  Link
SomeJoe
Registered User
 
Join Date: Jan 2003
Posts: 315
Quote:
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.
__________________
- SomeJoe
SomeJoe is offline   Reply With Quote
Old 7th June 2003, 19:45   #8  |  Link
midiguy
Registered User
 
Join Date: Feb 2002
Location: Toronto, Canada
Posts: 407
Quote:
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
midiguy is offline   Reply With Quote
Old 9th August 2003, 15:29   #9  |  Link
Jaester
Registered User
 
Join Date: Jul 2003
Posts: 23
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
Jaester is offline   Reply With Quote
Old 5th November 2003, 16:59   #10  |  Link
Metaluna
Registered User
 
Join Date: May 2003
Location: New Hampshire
Posts: 4
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?
Metaluna is offline   Reply With Quote
Old 5th November 2003, 18:43   #11  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
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
bb is offline   Reply With Quote
Old 19th November 2003, 20:58   #12  |  Link
North2Polaris
Registered User
 
North2Polaris's Avatar
 
Join Date: Jul 2003
Location: Connecticut
Posts: 99
pixel aspect ratio

[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.

Last edited by North2Polaris; 19th November 2003 at 21:01.
North2Polaris is offline   Reply With Quote
Old 21st November 2003, 16:22   #13  |  Link
SomeJoe
Registered User
 
Join Date: Jan 2003
Posts: 315
Re: pixel aspect ratio

Quote:
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.
__________________
- SomeJoe
SomeJoe is offline   Reply With Quote
Old 22nd November 2003, 04:01   #14  |  Link
North2Polaris
Registered User
 
North2Polaris's Avatar
 
Join Date: Jul 2003
Location: Connecticut
Posts: 99
Aspect Ratios and Square and Non-Square Pixels

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.

Last edited by North2Polaris; 22nd November 2003 at 04:09.
North2Polaris is offline   Reply With Quote
Old 12th January 2004, 11:44   #15  |  Link
snowcrash
Registered User
 
Join Date: Jan 2002
Posts: 99
So on a TV there is no overscan on the tops and bottoms, only on the sides?
snowcrash is offline   Reply With Quote
Old 13th January 2004, 18:44   #16  |  Link
SomeJoe
Registered User
 
Join Date: Jan 2003
Posts: 315
Quote:
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.
__________________
- SomeJoe
SomeJoe is offline   Reply With Quote
Old 13th January 2004, 22:58   #17  |  Link
snowcrash
Registered User
 
Join Date: Jan 2002
Posts: 99
Quote:
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 is offline   Reply With Quote
Old 13th January 2004, 23:07   #18  |  Link
snowcrash
Registered User
 
Join Date: Jan 2002
Posts: 99
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?
snowcrash is offline   Reply With Quote
Old 14th January 2004, 09:18   #19  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
snowcrash, that's correct.
In fact you don't crop to compensate for TV overscan, but add black borders instead.

bb
bb is offline   Reply With Quote
Old 15th May 2004, 08:07   #20  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
Remember to deinterlace the video before resize....
henryho_hk is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.