Log in

View Full Version : How to resize to 720x480?


rack04
15th December 2010, 16:30
I'm looking for some advice on how to resize 640x352 (16:9) and 480x352 (4x3) source files to 720x480 using AviSynth. Thanks.

Gavino
15th December 2010, 17:10
Have you looked at the documentation?
http://avisynth.org/mediawiki/Internal_filters#Geometric_deformation_filters

or the similar manual installed on your computer:
file:///C:/Program%20Files/AviSynth%202.5/Docs/English/corefilters.htm#deformation

rack04
15th December 2010, 17:13
Have you looked at the documentation?
http://avisynth.org/mediawiki/Internal_filters#Geometric_deformation_filters

or the similar manual installed on your computer:
file:///C:/Program%20Files/AviSynth%202.5/Docs/English/corefilters.htm#deformation

Yes I have. I was more asking about the math behind resizing these source files to 720x480 and keeping the aspect ratio.

ramicio
15th December 2010, 23:08
If the end result is going to be DVD and the source files are pretty much exactly 4:3 or 16:9 then you just resize them to 720x480 and the 4:3 or 16:9 cue in the encoded MPEG2 file will tell the player how it is supposed to look. For 16:9 DVDs that come from a cropped source greater than 16:9 (1.85, 2.35, 2.4, etc.) I just use 854 as the width to calculate what the height should be (854 / 1.85, etc.), and use 720x(RESULT) for the actual size.

TheSkiller
15th December 2010, 23:49
If you wanna do it really precise then you should calculate with the PAR of NTSC which is exactly 4320/4739 for 4:3 NTSC and 5760/4739 for 16:9 NTSC.


For your 480x352 source this would work like this (480x352 is not 4:3 by the way, it is slightly wider — 1.36:1).

For a width of 720 the corresponding active height is
720 / (480/352) * (4320/4739)
≈481.32

So I'd say resize to 720x480.


But wait, wasn't your source slightly wider than 4:3? It was 1.36:1. So, now you might have noticed that a NTSC frame of 720 pixels is actually slightly wider than 4:3 (16:9). That's why your slightly-wider-than-4:3-video fits (nearly) perfectly as is into 720x480.

So in other words, resizing video that is exactly 4:3 or 16:9 in square pixels straight to 720x480 is not really correct, and many people don't know it's not.

henryho_hk
30th December 2010, 12:56
And commercial publishers don't know/care that 720x480 (NTSC 16:9) is actually wider than 1920x1080 (1:1), producing (slightly) deformed DVDs.

ramicio
30th December 2010, 15:54
720x480 is not 16:9 or 4:3. DVDs don't have square pixels, they're anamorphic. HD stuff now finally uses square pixels.

henryho_hk
31st December 2010, 02:56
I'm done my math. That's a matter between 704 and 720.

ramicio
31st December 2010, 05:21
What???

Blue_MiSfit
31st December 2010, 08:41
704 or 720, both are anamorphic when stored on DVD.

The OP's question has basically been answered, but in case there's any confusion, here's the workflow.

1) Your source files have the following resolutions: 640x352 (16x9, or 1.818 to be precise) and 480x352 (4x3 or 1.364 to be precise).

2) I'm assuming your video is progressive, hopefully at 24p. If it's interlaced, you need to deinterlace or apply inverse telecine as necessary before resizing

3) Once your video is progressive, you can use any AviSynth resizer, to bring the video up to 720x480. At this point, it will be anamorphic, and look incorrect (stretched) when viewed as-is at 1:1.

4) Feed this into your MPEG-2 encoder, but specify the correct aspect ratio - 16x9 or 4x3 as the content dictates. You can simply code progressive video as interlaced (in the case of 29.97fps), or apply soft pulldown (in the case of 23.976fps). In any case you will get DVD legal 29.97fps interlaced video.

5) After DVD creation is finished, the DVD should play back properly, with the standard resize necessary to display the correct aspect ratio.

Derek

henryho_hk
31st December 2010, 10:48
If we are to resize 1920x1080 (HD 1:1) materials for NTSC 16:9 DVD, we should resize it to 704x480 (and optionally pad it as 720x480).

Sorry being off-topic.

Blue_MiSfit
31st December 2010, 10:53
Indeed, though you COULD go straight to 720x480. The boogie-man wouldn't come eat you in the night ;)

Derek

Nick
3rd January 2011, 12:36
For sources which are not exactly 4:3 or 16:9, an old app I still use from time to time is Avires.
It was written by an old hand of these forums called jsoto.

http://download.videohelp.com/jsoto/others.htm

It is a simple gui for doing the resize maths which works really quite well.