VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    When converting an AVI of a widescreen source to make a standard DVD, it has to be letterboxed to fit in a standard 16:9 frame.

    But I'm unsure if I'm doing it right.

    For example:

    AVI is 720x304 @ 25 fps.
    So aspect ratio (assuming square pixels) is 720/304=2.37:1

    I want to scale and letterbox to fit a PAL 720x576 16:9 (1.78:1) frame.

    My logic is that the height needs to be scaled to 576 * (1.78/2.37) = 432
    Then letterboxed to fill 576.

    So I do
    Code:
    LanczosResize(720,432)
    AddBorders(0,72,0,72)
    This seems to look right -- circles are circles, for instance.

    Is this correct; or is there a simpler way to work it out?
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Use FitCD to give you a comparison point for the script values.
    Read my blog here.
    Quote Quote  
  3. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by guns1inger
    Use FitCD to give you a comparison point for the script values.
    Thanks.
    The only way I can see to do that is to manually dial down the height in the "Resize" box till the destination "Real aspect" matches the source "Real aspect".
    That gave me the slightly different result:

    Code:
    LanczosResize(720,446,0,0,720,304)
    AddBorders(0,64,0,66)
    Is that right?
    It looks OK, if so, what is wrong with my previous calculation?
    Quote Quote  
  4. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    I wrote a small resize calculator tool a couple of years ago. It gives me 720 x 448 for PAL 16:9 based on your source (it doesn't produce an AVS script though - when I wrote it I was still using Virtualdub for resizing).

    The issue with your calculation, I believe, is that you also have to convert your square pixel source to non-square pixels. There are four PARs, one for each of the possible outputs;

    NTSC 4:3 - 10:11
    NTSC 16:9 - 40:33
    PAL 4:3 - 59:54
    PAL 16:9 - 118:81

    (source : http://www.mir.com/DMG/aspect.html#reftable)

    FitCD (and my calculator as well) also does some adjusting to get to a Mod16 solution for encoder efficiency.

    I have attached a copy of my tool to this post for comparison. It requires .net to run though. I will see if I can find the source code and if so, will post the calculations it uses.

    avi_rc2.exe
    Read my blog here.
    Quote Quote  
  5. I get the same as AlanHK's first calculation. If I turn off ITU resizing I get the same as guns1inger's calculation:



    Of course:

    LanczosResize(720,432,0,0,720,304)
    AddBorders(0,72,0,72)

    Can be written as:

    LanczosResize(720,432)
    AddBorders(0,72,0,72)
    Quote Quote  
  6. Member Alex_ander's Avatar
    Join Date
    Oct 2006
    Location
    Russian Federation
    Search Comp PM
    Originally Posted by AlanHK
    So I do
    Code:
    LanczosResize(720,432)
    AddBorders(0,72,0,72)
    This seems to look right -- circles are circles, for instance.

    Is this correct; or is there a simpler way to work it out?
    This is correct (as already mentioned, without ITU's refinement for the horizontal size in pixels).

    And yes, there's a simpler logic for calculations between those two AR's. The height of a letterboxed 16:9 image within a 4:3 frame is exactly 3/4 of its height in pixels. So with any video originally intended for displaying as 16:9 you can take 3/4 of PAL's 576 for height which is 432 (and mod16 at that), add complementary borders - and that's all you need to calculate. For width just use horizontal DVD number of the 4:3 frame and resize the original 16:9 (by DAR) image (which may be any pixel type) to those pixel numbers. If you want to make the horizontal size ITU compliant (702 is the border of a 4:3 PAL image after standard sampling), use 704 instead of 720 (with or without adding borders).

    Code:
    LanczosResize(720,446,0,0,720,304)
    AddBorders(0,64,0,66)
    Is that right?
    It looks OK, if so, what is wrong with my previous calculation?
    This will have correct proportions by ITU (for the forced 720 number the 432 got adjusted to 443 using 720/702 factor and rounded to 446) - a possible solution but it sends some horizontal pixels to overscan area. ITU compliant devices may even blank anything beyond 702 in the restored analog signal.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!