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
This seems to look right  circles are circles, for instance.Code:LanczosResize(720,432) AddBorders(0,72,0,72)
Is this correct; or is there a simpler way to work it out?
Try DVDFab and copy Ultra HD Blurays and DVDs! Or rip iTunes movies and music! Download free trial !
+ Reply to Thread
Results 1 to 6 of 6
Thread


Originally Posted by guns1inger
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)
It looks OK, if so, what is wrong with my previous calculation? 
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 nonsquare 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.exeRead my blog here.

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) 
Originally Posted by AlanHK
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)
It looks OK, if so, what is wrong with my previous calculation?
Similar Threads

how do i take avs logo off avs video
By tnwolf35 in forum Newbie / General discussionsReplies: 3Last Post: 3rd Sep 2010, 22:08 
Calculating Proper Scale According to Aspect
By WARnux in forum Software PlayingReplies: 6Last Post: 24th Jul 2010, 08:41 
Am I calculating resolution correctly?
By alcOre in forum Newbie / General discussionsReplies: 2Last Post: 24th Sep 2009, 08:37 
Calculating Video Length
By scan in forum Newbie / General discussionsReplies: 3Last Post: 1st Nov 2008, 13:33 
Calculating a bit rate
By haile in forum Newbie / General discussionsReplies: 5Last Post: 30th Apr 2008, 09:03