AfterDawn.com

SDTV

Because of inconsistencies in display from one player to another, and even among TVs themselves, the guidelines are less important than knowing how your own TV and DVD player handle things. In order to truly maintain correct Aspect Ratio, not to mention keeping as much of the picture visible on the screen as possible, it's important to visually identify which pixels you're going to see and which will actually be past the borders of your TV screen to either the left or right. In order to do this we'll use an AviSynth script I've written, along with a single image that it will use as a source.

AR vs. Resolution

When resizing it's easy to get hung up on the original DVD's resolution. This is a mistake. Resizing only requires that you know the Aspect Ratio of the source video and pixel shape of the destination display. If the image uses the full 720x480/578 video frame you'll resize the entire thing. If there are borders you'll want to crop the borders off to resize and then add borders as dictated by the encoder (multiples of 16) and possibly the format, such as HD DVD or Blu-ray.

Your DVD player will automatically stretch the video horizontally or shrink it vertically to achieve the correct AR.

Determining Overscan

Before writing this guide I spent some time determining the settings I should use for my own encodes, destined for playback on a HDTV running at 640x480 resolution. While my results aren't likely to be typical for standalone players, they do illustrate the importance of knowing how your player handles a particular resolution. In my case a 640x480 (square pixel) frame only showed me 588 pixels, with 30 pixels cut off on the left, and 22 more on the right.


Performing The Test

In order to perform this test you'll need the full size test image. You can find it by clicking on the image on the right. Once that's downloaded to your computer create a new AviSynth script with the text below and save it in the same folder you saved the image to. Load the script in your favorite MPEG-4 encoder just as if you were encoding movie. Burn it to a disc and test on your MPEG-4 capable DVD player.

Finding The Correct Resolution

When it starts playing you should see 2 black vertical lines, one on each side of your TV screen. To the left and right (toward the edges of the screen) will be a red border that should extend all the way to the edge of the screen. Every 5 seconds two yellow lines will be added to the left side of the image. As soon as you can see them pause the video and note the text in the middle of the screen. This tells you the curent width (in pixels) of the left border. If you want to make sure you can see the entire image you can use this setting, or possibly even 1 pixel less. To make sure the entire screen is used subtract two from this number. Write the number down to use when resizing. Resume playing the video, and eventually lines will be added to the right side as well. Once again pause the video as soon as you see yellow lines and note the Right Border listed. Now you know how many pixels in a 640x480 frame you'll see on your TV.
ImageReader("576x480.PNG", end=119)
AssumeFPS(23.976)
LR32 = last.AddBorders(32, 0, 32, 0, color = $FF0000).Subtitle("No Borders", x = 128, y = 240)
L30 = last.AddBorders(30, 0, 32, 0, color = $FF0000).AddBorders(2, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 2", x = 128, y = 240)
L28 = last.AddBorders(28, 0, 32, 0, color = $FF0000).AddBorders(4, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 4", x = 128, y = 240)
L26 = last.AddBorders(26, 0, 32, 0, color = $FF0000).AddBorders(6, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 6", x = 128, y = 240)
L24 = last.AddBorders(24, 0, 32, 0, color = $FF0000).AddBorders(8, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 8", x = 128, y = 240)
L22 = last.AddBorders(22, 0, 32, 0, color = $FF0000).AddBorders(10, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 10", x = 128, y = 240)
L20 = last.AddBorders(20, 0, 32, 0, color = $FF0000).AddBorders(12, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 12", x = 128, y = 240)
L18 = last.AddBorders(18, 0, 32, 0, color = $FF0000).AddBorders(14, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 14", x = 128, y = 240)
L16 = last.AddBorders(16, 0, 32, 0, color = $FF0000).AddBorders(16, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 16", x = 128, y = 240)
L14 = last.AddBorders(14, 0, 32, 0, color = $FF0000).AddBorders(18, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 18", x = 128, y = 240)
L12 = last.AddBorders(12, 0, 32, 0, color = $FF0000).AddBorders(20, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 20", x = 128, y = 240)
L10 = last.AddBorders(10, 0, 32, 0, color = $FF0000).AddBorders(22, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 22", x = 128, y = 240)
L8 = last.AddBorders(8, 0, 32, 0, color = $FF0000).AddBorders(24, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 24", x = 128, y = 240)
L6 = last.AddBorders(6, 0, 32, 0, color = $FF0000).AddBorders(26, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 26", x = 128, y = 240)
L4 = last.AddBorders(4, 0, 32, 0, color = $FF0000).AddBorders(28, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 28", x = 128, y = 240)
L2 = last.AddBorders(2, 0, 32, 0, color = $FF0000).AddBorders(30, 0, 0, 0, color = $FFFF00)\
.Subtitle("Left Border 30", x = 128, y = 240)
R30 = last.AddBorders(2, 0, 30, 0, color = $FF0000).AddBorders(30, 0, 2, 0, color = $FFFF00)\
.Subtitle("Right Border 2", x = 128, y = 240)
R28 = last.AddBorders(2, 0, 28, 0, color = $FF0000).AddBorders(30, 0, 4, 0, color = $FFFF00)\
.Subtitle("Right Border 4", x = 128, y = 240)
R26 = last.AddBorders(2, 0, 26, 0, color = $FF0000).AddBorders(30, 0, 6, 0, color = $FFFF00)\
.Subtitle("Right Border 6", x = 128, y = 240)
R24 = last.AddBorders(2, 0, 24, 0, color = $FF0000).AddBorders(30, 0, 8, 0, color = $FFFF00)\
.Subtitle("Right Border 8", x = 128, y = 240)
R22 = last.AddBorders(2, 0, 22, 0, color = $FF0000).AddBorders(30, 0, 10, 0, color = $FFFF00)\
.Subtitle("Right Border 10", x = 128, y = 240)
R20 = last.AddBorders(2, 0, 20, 0, color = $FF0000).AddBorders(30, 0, 12, 0, color = $FFFF00)\
.Subtitle("Right Border 12", x = 128, y = 240)
R18 = last.AddBorders(2, 0, 18, 0, color = $FF0000).AddBorders(30, 0, 14, 0, color = $FFFF00)\
.Subtitle("Right Border 14", x = 128, y = 240)
R16 = last.AddBorders(2, 0, 16, 0, color = $FF0000).AddBorders(30, 0, 16, 0, color = $FFFF00)\
.Subtitle("Right Border 16", x = 128, y = 240)
R14 = last.AddBorders(2, 0, 14, 0, color = $FF0000).AddBorders(30, 0, 18, 0, color = $FFFF00)\
.Subtitle("Right Border 18", x = 128, y = 240)
R12 = last.AddBorders(2, 0, 12, 0, color = $FF0000).AddBorders(30, 0, 20, 0, color = $FFFF00)\
.Subtitle("Right Border 20", x = 128, y = 240)
R10 = last.AddBorders(2, 0, 10, 0, color = $FF0000).AddBorders(30, 0, 22, 0, color = $FFFF00)\
.Subtitle("Right Border 22", x = 128, y = 240)
R8 = last.AddBorders(2, 0, 8, 0, color = $FF0000).AddBorders(30, 0, 24, 0, color = $FFFF00)\
.Subtitle("Right Border 24", x = 128, y = 240)
R6 = last.AddBorders(2, 0, 6, 0, color = $FF0000).AddBorders(30, 0, 26, 0, color = $FFFF00)\
.Subtitle("Right Border 26", x = 128, y = 240)
R4 = last.AddBorders(2, 0, 4, 0, color = $FF0000).AddBorders(30, 0, 28, 0, color = $FFFF00)\
.Subtitle("Right Border 28", x = 128, y = 240)
R2 = last.AddBorders(2, 0, 2, 0, color = $FF0000).AddBorders(30, 0, 30, 0, color = $FFFF00)\
.Subtitle("Right Border 30", x = 128, y = 240)

LR32 + L30 + L28 + L26 + L24 + L22 + L20 + L18 + L16 + L14 + L12 + L10 + L8 + L6 + L4 \
+ L2 + R30 + R28 + R26 + R24 + R22 + R20 + R18 + R16 + R14 + R12 + R10 + R8 + R6 \
+ R4 + R2


Next: Resizing for your NTSC TV




Table of Contents

  1. 1. Introduction
  2. 2. Basic Resizing
  3. 3. Step By Step
  4. 4. Square Pixels For NTSC TVs
  5. 5. Resizing For SDTV
Written by: Rich Fiscus