AfterDawn.com

Resizing For NTSC TV

By definition the visible area of a TV is 4:3. This is a somewhat obvious statement, but it's important to understand that even though you may be creating MPEG-4 files that have square pixels, your DVD player (or HTPC) and TV may not be displaying them that way. For example, when my HTPC's resolution is set to 640x480 only 588 pixels are actually visible. For purposes of display with that computer and television the 4:3 area (when encoding with square pixels) is 588x480, but all height calculations must still be done from a width of 640. Files encoded this way will play correctly from my HTPC, but not necessarily anywhere else I might want to watch them. Since I don't mind re-encoding later when I upgrade my computer and TV that's alright with me.

Using AvsP's Resize Calculator

Just as in the previous section, we'll let AvsP do most of the work for us. Make sure the horizontal resolution shown is 640. However, once the Resize Calculator adds the line to your script you may need to edit it a little. At this point you'll need to know the actual 4:3 resolution you determined with the test video. You can find this by subtracting the left and right borders calculated in the last step from 640. Replace 640 in the script as follows.

Original:

LanczosResize(640, 272)

Edited:

LanczosResize(588, 272)

Adding Borders

If you've resized to a width other than 640 pixels you'll need to add the borders you calculated previously for the left and right, which should make the horizontal resolution 640 pixels. Also make sure to add any lines needed to reach mod16 resolution.
LanczosResize(640, 272)

Here's an example of a complete script I used to crop, resize, and add borders to encode for my HTPC:

MPEG2Source("D:\Storage4\DVD\FullDisc\BUCKAROO\VIDEO_TS\Buckaroo Banzai.d2v", cpu=0)
TFM(d2v="D:\Storage4\DVD\FullDisc\BUCKAROO\VIDEO_TS\Buckaroo Banzai.d2v")
TDecimate()
Crop(8, 58, -0, -64)
LanczosResize(588, 272)
AddBorders(30, 0, 22, 0)


Ready To Encode

With your video resized you can either use the AviSynth script as your source in the encoder of your choice or use AvsP's built in interface for AVS2AVI to create an intermediary AVI file to use. If you're going to make an AVI file you should use a lossless codec like HuffYUV, which will allow you to avoid quality loss. It will also create a very large AVI file (close to 40GB per hour of video). You can find isntructions for rendering AVI files with AvsP and AVS2AVI in our AvsP guide.





Return to SageTV Reviewed - Replacing Windows Media Center



Version History

v1.0 2007.12.30 Original version by Rich "vurbal" Fiscus
v1.0.1 2008.1.3 Formatting fixed by Rich "vurbal" Fiscus

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