17. DVDs: Dealing With Aspect Ratios with AVISynth

Moderator: Niotex

Locked
User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

17. DVDs: Dealing With Aspect Ratios with AVISynth

Post by Guides » Tue May 28, 2024 7:35 pm

A&E's Technical Guides to All Things Audio and Video
17. DVDs: Dealing With Aspect Ratios
Previous | Index | Next
September 2010

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Post by Guides » Tue May 28, 2024 7:35 pm

Dealing with Aspect Ratios

The first rule of resizing:
Before we talk about the various options there is one important fact you need to consider - you must never resize interlaced footage in order to change the vertical size. You can stretch the footage horizontally all you want but if you change the height of the frame it will totally mess up the interlacing. Many of the settings on this page are best used on progressive footage only, and if you have followed this guide then you should not have interlaced footage at this point anyway.

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Post by Guides » Sat Jun 29, 2024 3:35 pm

Editing with DVD PAR or square pixels?

As you should know by now, DVDs don't have square pixels, and so we will need to correct this. Because aspect ratios can be very complicated things, I prefer to make things as easy as possible. This means resizing your footage so that it has square pixels. When you are working with square pixels, what you see is what you get. There are fewer oportunities to screw up or get confused. For this reason, I would recommend you always resize your footage before editing. For completeness though, I will also tell you what to do in case you want to edit with the footage at its original size.

Getting Ready for WMM?

If you happen to be preparing footage for Windows Movie Maker then you should be aware that it only deals with a limited amount of frame sizes. For the highest quality it is best to either conform all your sources to 4:3 square pixels 640x480 or to conform them to 16:9 widescreen with letterboxing (within a 640x480 4:3 frame). You can see examples of these options below. It's not a pretty way of doing things, but that's the way you have to if you want things looking right in WMM.

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Post by Guides » Sat Jun 29, 2024 3:38 pm

Working out frame sizes yourself:
The brave of you out there, instead of simply reading the values on this page, will want to find out correct aspect ratios themselves. To help you, I recommend you read over this page, which details how to use a resize calculator and how to find correct cropping values.

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Post by Guides » Sat Jun 29, 2024 3:44 pm

Entirely 4:3 Sources.
If you are making a video using only 4:3 sources then your decisions are pretty straightforward.

1) Keep DVD Resolution and PAR

You can edit at full dvd resolution if you like (720x480 for NTSC and 720x576 for PAL). Just be sure to set up the pixel aspect ratio correctly in your editing software, or else everything will look stretched.

2) Resize to Square Pixel Aspect Ratio (Recommended)

NTSC Footage: Add this to the end of your avisynth scripts:

Crop(8,0,-8,-0)
Spline36Resize(640,480)

PAL Footage: Add this to the end of your avisynth scripts:

Crop(8,0,-8,-0)
Spline36Resize(768,576)

You should then set up a profile in your editing package to edit at square PAR with that resolution.

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Post by Guides » Sat Jun 29, 2024 3:49 pm

Entirely 16:9 Anamorphic Sources
If you are using a video with entirely 16:9 DAR sources then your options are as follows:


1) Keep DVD Resolution and PAR

You can edit at full dvd resolution if you like (720x480 for NTSC and 720x576 for PAL). Just be sure to set up the pixel aspect ratio correctly in your editing software, or else everything will look squished.


2) Resize to Square Pixel Aspect Ratio (Recommended)

NTSC Footage:
Add Spline36Resize(848,480)
to the end of your avisynth scripts.

PAL Footage:
Add Spline36Resize(1024,576)
to the end of your scripts.

You will note that these are very wide resolutions, but this is in order to keep the vertical resolution in order to avoid losing any quality.

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Post by Guides » Sat Jun 29, 2024 3:49 pm

Mixing 4:3 and 16:9 Sources

This is a much more problematic arrangement as one of the sources is going to have to lose some footage with cropping and if you have anamorphic footage you may need to do some resizing too.

I hope you are good at arithmetic or at least know how to use a calculator.

First off, you have to decide whether you will make your video in 4:3 (fullscreen) or 16:9 (widescreen). Most people usually go with widescreen because it looks more cinematic, but you lose less important parts of the footage if you go with full screen.

If you are making everything fullscreen, this is pretty simple. Assuming you are working with NTSC footage and square pixels, you simply have to crop your 848x480 widescreen footage down to 640x480. If you crop 104 pixels off the left side, and 104 off the right side, you are all set.

If you want to make everything widescreen, its a bit more complex. First you need to upscale your 4:3 footage so that it matches the width of your widescreen footage while still retaining the proper aspect ratio, and then you need to crop from the top and bottom until it matches the vertical resolution. Assuming NTSC footage with square pixels, this means I would resize my 640x480 footage up to 848x636 (because its a 4:3 resolution with the same width as my widescreen footage), and then I crop it down to 848x480 by cropping 78 pixels from both the top and bottom.

Hopefully you can work out the correct values for your own footage.

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Post by Guides » Sat Jun 29, 2024 3:51 pm

Video Format Conversion: Mixing Sources from Different Video Formats

Mixing NTSC and PAL footage is rarely a good idea but it's not inconceivable. I'm not going to go on in length about what to do here but I will give you some basic pointers.

1)
Only try converting a source with progressive frames. Interlaced sources are tricky to convert. If you really need to convert an interlaced source, read about the separatefields() and weave() commands in the avisynth manual and then ask about it on the forums

2)
Change the framerate of the video using AssumeFPS(). If for some reason you need the audio to synch then you will have to use some kind of frame duplication method such as ChangeFPS() in Avisynth (see the avisynth manual for details).

3)
Do a direct resize from the source resolution to the final resolution unless they have a different DAR.

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Post by Guides » Sat Jun 29, 2024 3:51 pm

A&E's Technical Guides to All Things Audio and Video
17. DVDs: Dealing With Aspect Ratios
Previous | Index | Next
September 2010

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Post by Guides » Wed Jul 03, 2024 9:41 pm

--- End of Guide ---

Locked

Return to “A&E's Technical Guides”