Windows Media Encoder banner art

Preserving the pixel aspect ratio of video

If your video source has nonsquare pixels, you can preserve its pixel aspect ratio. Check the documentation for your video device to determine whether it uses nonsquare pixels.

The pixel aspect ratio is the width (x) of the pixel with respect to its height (y). A square pixel has a ratio of 1:1, but a nonsquare (rectangular) pixel does not have the same height and width. This concept is similar to the frame aspect ratio, which is the total width of an image with respect to its height. However, these aspect ratios are not necessarily tied together. For example, a widescreen image with a frame aspect ratio of 16:9 can be made of square or nonsquare pixels.

The same frame aspect ratio with different pixel aspect ratios.

If you encode a video source with nonsquare pixels as though the pixels are square, the output will distort, as shown in the following diagram.

Encoding an image with nonsquare pixels without preserving its aspect ratio.

If you know the frame aspect ratio (Ix:Iy) and exact height and width of your image source, you can use the following formula to determine the x and y values of the pixel aspect ratio.

PixelAspectRatioX / PixelAspectRatioY = (Ix * height) / (Iy * width)

For example, if your image is 720 by 360 pixels, and the frame aspect ratio is widescreen (16:9), then PixelAspectRatioX=8 and PixelAspectRatioY=9:

PixelAspectRatioX / PixelAspectRatioY = (16*360) / (9*720) = 8/9

Note image Notes

Related topics


© 2000-2002 Microsoft Corporation. All rights reserved.