Log in

View Full Version : Can someone explain how my 624x352 resized to 720x480 comes out perfect?


msdossys
22nd July 2008, 07:59
So I'm working on a source that is 624x352 (wierd, yes). That calculates to a 1.77 Aspect ratio. Well after some reading on the DVD spec i thought i'd plug my video into HCEnc via AviSynth attempting to do some funky resizing to keep the aspect ratio. I ended up doing the math to match up 624x352 with 720x??? which ended up being 406 and lots of decimals. To get to mod8, i round up to 408. So i do Lanczos4Resize(720,408). So now i have 480-408 = 72 pixel lines to make up for the vertical resolution, so I put AddBorders (0,36,0,36) next.

At this point I think i'm doing great until I see the preview in HCEnc. I load up the original AVI in MPC and resize it so the width is the same as the preview... well it sure doesnt match up with the height when i drag the window to compare. Thinking its the aspect ratio setting in HCEnc i change it to 4:3. Better, but still off, now the other way (stretched vertically). After a few frustrating hours I just delete the AddBorders and change the resize to 720x480 in the AVISynth script for the hell of it. Load that up and lo and behold, the thing is perfect in 16:9 in HCEnc... what the heck is going on?

smok3
22nd July 2008, 08:10
you are ignoring difference in PAR between your square source and non-square dvd.

1. for 704 ntsc 4:3 you would
a. http://resizecalc.somestuff.org/index.php?ssmw=624&sar=1&sar2=&ssmh=352&CT=&CL=&CR=&CB=&trw=704&dar=0.911&dar2=&mod=2&padw=&padh=480&css=&doit=true or to make everything at least mod2 http://resizecalc.somestuff.org/index.php?ssmw=624&sar=1&sar2=&ssmh=352&CT=&CL=&CR=&CB=2&trw=704&dar=0.911&dar2=&mod=4&padw=&padh=480&css=&doit=true
or without height resizing
b. http://resizecalc.somestuff.org/index.php?ssmw=624&sar=1&sar2=&ssmh=352&CT=&CL=&CR=&CB=&trw=686&dar=0.911&dar2=&mod=16&padw=704&padh=480&css=&doit=true (this will introduce some visible pillarbox)

2. for 704 ntsc 16:9 you would (as you allready figured out)
http://resizecalc.somestuff.org/index.php?ssmw=624&sar=1&sar2=&ssmh=352&CT=&CL=&CR=&CB=2&trw=704&dar=1.215&dar2=&mod=16&padw=&padh=&css=&doit=true

(i would probably pick 1.a. for CRT 4:3 display)

btw, for eyeballing i recommend virtualdub,
a. dump in the video (avs)
b. rmb on video, select the display preset
c. hit play

Blue_MiSfit
22nd July 2008, 21:43
I see this situation as much simpler than that...

The source AR is 1.77... or 16x9.

So, just resize to 720x480, set 16x9 in your encoder, and when you play back, it will be converted to 852x480, which is 16x9, same AR as the source...

~MiSfit

msdossys
23rd July 2008, 05:53
Blue_MiSfit - hey that makes sense! But how does a TV show 852 rows?

smok3
23rd July 2008, 08:23
The problem with manual calcs is exactly that: one gets happy with the first solution, usually missing the global overview (i'am talking mostly about /me and my horrible math here).