View comments | RSS feed

Encoding video with non-square pixels

Most static computer graphics use square pixels, which have a width-to-height ratio of 1:1. When working with digital video, pixels often have a different width-to height ratio and are referred to as rectangular pixels. The reason for this behavior is to allow analog video (e.g. broadcast television) and digital video (e.g. DVD video) to coexist. When encoding video formats with non-square pixels (also known as anamorphic video), you need to resample the video image to the correct Display Aspect Ratio (DAR).

For example, standard NTSC digital video (DV), has a frame size of 720 x 480 pixels, and it's usually displayed at an aspect ratio of 4:3. This means that each pixel is rectangular, with a pixel aspect ratio (PAR) of 10:11 (a tall, narrow pixel). Both MPEG 1 and 2 video are also produced in various sizes (720 x 480 or 480 x 480 are common) even though they are typically displayed with either a 4:3 or 16:9 (wide screen) aspect ratio.

To calculate the image frame size to use when encoding video using non-square pixels, you must first decide which dimension--width or height--is the preferred master dimension, and then compute the other dimension as follows:

If height is the master dimension, calculate the width using the following formula:

For example, if your video uses an aspect ratio of 4:3 the equation would appear as:

If width is the master dimension, calculate the height using the following formula:

For example, if your video uses an aspect ratio of 4:3 the equation would appear as:

As an example, if you are encoding a video whose frame size is 720 x 480 pixels, and you want to encode it with a 4:3 aspect ratio, you must determine the width at which to encode the video frame in pixels:

The result is a video image height of 640 pixels.

Thus, you need to encode the 720 x 480 image to 640 x 480, a standard 4:3 aspect ratio.

To correct the image size when encoding using Flash Video Encoder, deselect the Maintain Aspect Ratio option on the Crop and Resize tab of the Flash Video Encoding Settings dialog box, and enter the corrected dimensions at which to encode the video. For more information, see Customizing video encoding settings.


Flash CS3

Take a survey


Comments


No screen name said on Jun 15, 2007 at 3:09 PM :
The information on this page is an example of 2 wrongs make a right.

The technically correct Pixel Aspect Ratio (PAR) for NTSC D1 and DV
video is indeed 10:11. However, most applications (including Adobe
After Effects and Premiere Pro) use 9:10. They arrive at this number by
incorrectly applying the math on this page to a professional D1-standard
720x486 pixel video frame. (D1 frames have a touch of additional
"overscan" on the left and right so that common processing, such as
blurs, would be less likely to drag edge artifacts into the actual image
area. Including this overscan into the PAR calculation is what gives the
incorrect 9:10 result that everyone uses.)

An NTSC DV frame is a subset of a D1 frame: You take 6 lines off a
720x486 D1 frame (usually 4 from the top, 2 from the bottom) to create a
720x480 pixel DV frame. Both standards have the same PAR.

As the vast majority of applications use a PAR of 9:10 for NTSC D1 and
DV frames, it is probably best to do so in Flash Video as well, for
consistency and compatibility with other applications. If converting from a
square-pixel 4:3 source to a DV output, you would then trim the
remaining pixels off the top and bottom to get a 720x480 output. You
would not need to do any trimming to create 720x486 output.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/flvencoder/FLV_11.html