Dealing with Aspect Ratios

When editing a video you need to be aware of the Pixel Aspect Ratio and Display Aspect Ratio of your source as we have discussed earlier. This page is to show you how you can deal with different varieties of aspect ratio when making your music video. If you are still uncertain about these terms and how they affect you, here's a quick summary.

PAR is the aspect ratio of the individual pixels. Sometimes the pixels arent supposed to be square - ntsc dvd pixels are approximately 0.9:1 instead of 1:1 like pixels on monitors are. This is why 720x480 isn't mathematically 4:3 but once the pixel aspect ratio of 0.9(ish) is considerd and the image is shown on a tv it becomes 4:3. Most of the time this guide will talk about using dvd PAR or square pixels (monitor PAR) - both are fine as long as you remember which one you are using.

DAR is the aspect ratio of the full image when displayed. This is usually either 4:3 or 16:9.

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. It is possible to resize interlaced footage if you separate it into fields, resize then weave the fields back together again but this is not an ideal approach. Many of the settings on this page are best used on progressive footage only. If you really want to resize interlaced footage you would do so like this:

SeparateFields()
Lanczosresize('half the quoted height',width)
Weave()

This will resize one field at a time and then put them back together. Note that you will be using half the height that you would for a regular progressive image because you are resigin one half of the image at a time. It is the only real way to deal with resizing vertically with interlaced footage without deinterlacing.

Editing with dvd PAR or with square pixels?

It doesn't really matter whether you keep the dvd PAR when you edit or not. If you do, you have the advantage of using the footage without having to resize it, so the quality is identical to the original. However, if you create any graphics to add to the video you will need to be aware of the different pixel aspect ratio - you can accomodate this by creating graphics at a certain frame size and scaling down (as described in the sections below). Editing with square pixels means that everything has the right aspect ratio for viewing on a monitor. Graphics dont need to be resized and everything will be in proportion. However you have to resize to do this so there's a small quality loss and if you are submitting to a convention eventually then they will prefer the video to be at dvd PAR when you do, so you may have to resize your footage again for the convention.

Each option has its pros and cons - I like to edit with dvd PAR most of the time but either option is vialbe provided you remember which you are doing :)

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. The problem is that aspect ratios are famously complicated things. However, to help you, trythil has written a resize application in java that works out all the complicated numbers for you. This is contained in the amvapp (Support Tools/AMV Resize Calculator) - there is also an online version off the applet here.

This program is highly recommended.

Getting Ready for WMM2?

If you happen to be preparing footage for wmm2 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 WMM2.


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) but any graphics you make for your video (like text etc.) will be at a different Pixel Aspect Ratio. To compensate do this:
NTSC Graphics: Make images at 720x528 and resize to 720x480 to have DVD PAR.

PAL Graphics: Make images at 788x576 and resize to 720x576 to have DVD PAR.
2) Resize to Square Pixel Aspect Ratio

If you don't want to have to worry about how your graphics and other elements will look, you can always convert your footage to square pixels before editing. You will note that this method involves a little cropping - this is perfectly natural and it is required to create the correct aspect ratio. I could explain why you need to do this... but it would take me all day, so just trust me.

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

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

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

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

You should then set up a profile in your editing package to edit at square PAR with that resolution. Note that these numbers are designed to keep the vertical resolution in case your source is interlaced. If you have a progressive source you can use any 4:3 resolution you like but you must resize after the source has been made progressive (such as after IVTC).

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) but the video will look very stretched vertically in your editing application. Also, any graphics, text or other footage you add to this will be a different PAR so you need to fix that before adding them to your video:
NTSC Graphics: Make images at 848x480 and resize to 720x480 to have DVD PAR.
PAL Graphics: Make images at 1024x576 and resize to 720x567 to have DVD PAR.
2) Resize to Square Pixel Aspect Ratio

If you want to edit with What You See Is What You Get then you can always convert your footage to square pixels before editing.

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

PAL Footage: Add LanczosResize(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 case you have an interlaced source. If your source is progressive you can resize to any 16:9 resolution you like but you must resize after the source has been made progressive (such as after IVTC).

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.

There are LOTS of different ways of doing this and I'm going to describe a lot so to make it easier I'm going to split it up into PAL and NTSC. What you need to do is decide upon the resolution and aspect ratio ratio you want to edit at and then try and make all the sources match.
Quick links: PAL or NTSC

Mixing PAL 4:3 and 16:9 Sources


Making all the Sources 4:3

In order to make all the sources 4:3 you will need to resize your 16:9 footage to have the same PAR as the 4:3 stuff and then crop off the left and right hand side of your footage. The PAR will either be the regular DVD footage PAR or square pixels, depending on your preference. See the 4:3 section above for more info.

Output PAL Footage at DVD Resolution:
LanczosResize(960,576)
Crop(120,0,-120,-0)

Note that this will take the middle section of the footage. You may find that in some scenes it crops off significant parts of the footage. For those scenes you should adjust the crop accordingly.
Output NTSC 4:3 with Square Pixels:
LanczosResize(1024,576)
Crop(128,0,-128,-0)

Note that this will take the middle section of the footage. You may find that in some scenes it crops off significant parts of the footage. For those scenes you should adjust the crop accordingly (such as 68 left and 188 right so that the left part of the image is used)
Making all the Sources 16:9

Watch any of ErMaC's Evangelion videos from 2002 and you'll see this being used a lot. This is an option you will probably want to take if the majority of your footage is from a movie or you want to give the pretty movie footage a greater priority.

PAL Footage at Anamorphic Resolution
This is only possible if your 4:3 footage has been made progressive

Crop(0,72,-0,-72)
LanczosResize(720,576)

Note that this will take the middle section of the footage. You may find that in some scenes it crops off significant parts of the footage. For those scenes you should adjust the crop accordingly (such as 12 from the top and 132 from the bottom so that the top part of the image is used)
PAL Letterboxed Widescreen at DVD Resolution
This option requires you to resize the 16:9 footage down to fit a 4:3 display and then crop the 4:3 footage to match. Requires progressive 16:9 footage.

For the 16:9 Footage:

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

For the 4:3 Footage:

Crop(0,72,-0,-72)
AddBorders(0,72,0,72)

One thing that is worth noting is that you don't have to add the borders straight away. Editing at 720x432 and then adding the borders at the end will mean that you can easily add effects without them appearing in the borders. Putting the borders on at the end will give you a full PAL resolution for European con submission or you can leave the borders off and resize down to do an Internet distribution. It's a very flexible method.
PAL Letterboxed Widescreen at Square Pixels 4:3

This option requires you to resize the 16:9 footage down to fit a 4:3 display and then crop the 4:3 footage to match. If your 16:9 footage is not anamorphic then you should crop and add borders to your 4:3 footage to match the 16:9 footage.

For the 16:9 Footage:
LanczosResize(768,432)
AddBorders(0,72,0,72)

For the 4:3 Footage:
LanczosResize(768,576)
Crop(0,72,-0,-72)
AddBorders(0,72,0,72)

Note that this will take the middle section of the 4:3 footage. You may find that in some scenes it crops off significant parts of the footage. For those scenes you should adjust the crop accordingly (such as 12 from the top and 132 from the bottom so that the top part of the image is used)
PAL Widescreen at Square Pixels 16:9
With this option you crop your 4:3 footage then resize both it and the 16:9 source to whatever square pixel ratio you like. To do this, simply use the settings for PAL Letterboxed Widescreen at Square Pixels 4:3 and do not use the addborders line.
Lots of options there. Hopefully it's not all too confusing for you. Exactly which method you choose is up to you - you can adapt these script commands any way you like. Remember to have all the PARs of the sources the same and keep in mind what PAR and DAR you want at the end. Also always be careful when resizing interlaced footage - remember the first rule.

Mixing NTSC 4:3 and 16:9 Sources


Making all the Sources 4:3

In order to make all the sources 4:3 you will need to resize your 16:9 footage to have the same PAR as the 4:3 stuff and then crop off the left and right hand side of your footage. The PAR will either be the regular DVD footage PAR or square pixels, depending on your preference. See the 4:3 section above for more info.

Output NTSC Footage at DVD Resolution:
LanczosResize(960,480)
Crop(120,0,-120,-0)

Note that this will take the middle section of the footage. You may find that in some scenes it crops off significant parts of the footage. For those scenes you should adjust the crop accordingly (e.g. use 20,0,-210,0 to take footage from the left)
Output NTSC 4:3 with Square Pixels:
LanczosResize(848,480)
Crop(104,0,-104,-0)

Note that this will take the middle section of the footage. You may find that in some scenes it crops off significant parts of the footage. For those scenes you should adjust the crop accordingly (e.g. use 8,0,-200,0 to take footage from the left)

Making all the Sources 16:9

Watch any of ErMaC's Evangelion videos from 2002 and you'll see this being used a lot. This is an option you will probably want to take if the majority of your footage is from a movie or you want to give the pretty movie footage a greater priority.

NTSC Footage at Anamorphic Resolution
This is only possible if your 4:3 footage has been made progressive

Crop(0,60,-0,-60)
LanczosResize(720,480)

Note that this will take the vertical middle section of the footage. You may find that in some scenes it crops off significant parts of the footage. For those scenes you should adjust the crop accordingly (e.g. use 0,0,-0,-120 to take footage from the top)
NTSC Letterboxed Widescreen at DVD Resolution

This option requires you to resize the 16:9 footage down to fit a 4:3 display and then crop the 4:3 footage to match.

For the 16:9 Footage:

LanczosResize(720,360)
AddBorders(0,60,0,60)

For the 4:3 Footage:

Crop(0,60,-0,-60)
AddBorders(0,60,0,60)

This will take the vertical middle section of the footage. You may find that in some scenes it crops off significant parts of the footage. For those scenes you should adjust the crop accordingly (e.g. use 0,0,-0,-120 to take footage from the top)

One thing that is worth noting is that you don't have to add the borders straight away. Editing at 720x360 and then adding the borders at the end will mean that you can easily add effects without them appearing in the borders. Putting the borders on at the end will give you a full NTSC resolution for con submission or you can leave the borders off and resize down to do an Internet distribution. It's a very flexible method.
NTSC Letterboxed Widescreen at Square Pixels 4:3

This option requires you to resize the 16:9 footage down to fit a 4:3 display and then crop the 4:3 footage to match. If your 16:9 footage is not anamorphic then you should crop and add borders to your 4:3 footage to match the 16:9 footage.

For the 16:9 Footage:

Crop(8,0,-8,-0)
LanczosResize(640,360)
AddBorders(0,60,0,60)

For the 4:3 Footage:
Crop(8,0,-8,-0)
LanczosResize(640,480)
Crop(0,60,-0,-60)
AddBorders(0,60,0,60)
NTSC Widescreen at Square Pixels 16:9

With this option you crop your 4:3 footage then resize both it and the 16:9 source to whatever square pixel ratio you like - I've scaled up here because the quality will be better for the anamorphic source. This option only really works with progressive sources as interlaced sources can only be resized horizontally.

For the 4:3 Footage:

Crop(0,60,-0,-60)
LanczosResize(848,480)

For the 16:9 Footage:

LanczosResize(848,480)

You can also scale down to 640x360 if you wish, just use the last option but without the addborders commands.
Lots of options there. Hopefully it's not all too confusing for you. Exactly which method you choose is up to you - you can adapt these script commands any way you like. Remember to have all the PARs of the sources the same and keep in mind what PAR and DAR you want at the end. Also always be careful when resizing interlaced footage as it can only be resized horizontally without messing up the fields.


Video Format Conversion: Mixing Sources from Different Video Formats


This 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(n) where n is the final framerate. If you have progressive footage then this should be 23.976fps for an NTSC output or 25 for a PAL output. 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() and ConvertFPS() 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.

Here are some possible filter chains:

Progressive PAL to Progressive NTSC
AssumeFPS(23.976)
LanczosResize(720,480)

Progressive NTSC to Progressive PAL
AssumeFPS(25)
LanczosResize(720,576)
Progressive PAL to Telecined NTSC (audio desync)
AssumeFPS(23.976)
LanczosResize(720,480)
ADTelecine(order=1#use order=0 for DV compatibility

Progressive PAL to Interlaced NTSC (no audio desync)
LanczosResize(720,480)
ADTelecine(order=1)  #use order=0 for DV compatibility

For other possibilities have a look on avisynth.org or search the forums at doom9.org