Link to home
Start Free TrialLog in
Avatar of todd_e_bryant
todd_e_bryant

asked on

Help Me Understand AVI Files and Aspect Ratio

I'm having a hell of a time understanding aspect ratios as they apply to AVI formatted video files for a video editing application.

(1) Are the "aspect ratios" reported by Windows Media Player (File>Properties) the pixel aspect ratio (PAR) or the display aspect ratio (DAR)?

(2) Are the "aspect ratios" reported by Windows Media Player a field in all AVI files, or only present in some AVI files, specific to the codec, etc.?

(3) How can I edit/set the aspect ratio in an AVI file, using a tool like VirtualDub?
Avatar of todd_e_bryant
todd_e_bryant

ASKER

LHerrou, thanks for reposting in a more appropriate location.
Pixel aspect ration is not displayed by players usually, since it is a standard for different media. Computer monitors has a 1/1 PAR, but in TV, VCD, DVD the PAR is different from square, look here for some details: http://www.mir.com/DMG/aspect.html
1. Windows Media Player displays the DAR in pixels and as a ratio.
2. The avi main header contain two variables, dwWidth and dwHeight, the width and height in pixels. The codec used doesn't matter, avi is a container, not a codec.
3. Reencoding, but with a lot of comments about PAR and DAR. Read here: http://www.animemusicvideos.org/guides/avtech/aspectratios.html#mozTocId829564
The reference table at the end of the mir.com document is a great reference.

Crissand's comment almost got the answer I'm searchign for, but I find myself still confused about how AVI and apps handle aspect ratio.  Let me me precise.  Consider these two cases:

(a) I create a 720x480 uncompressed AVI file
(b) I create a 720x480 DV-coded AVI file

As I understand it, in both cases, there are actually 720x480 pixels of information in the AVI file.  But if you look at the files with Windows Media Player, it will say the aspect ratio of the file (a) is 3:2 (square pixel ratio of 720:480), but it will say the aspect ratio of the file (b) is 4:3 (narrow pixel ratio of 10:11).  Windows Media Player then scales the second AVI file horizontally automatically, so it looks 640x480 on my monitor.

To summarize:

(a) Windows Media Player says 720x480, 3:2 aspect ratio (WMP displays as 720x480 on my square pixel monitor)
(b) Windows Media Player says 720x480, 4:3 aspect ratio (WMP displays as 640x480 on my square pixel monitor)

So, Windows Media Player treats the source pixel aspect ratio of the two files differently.  It seems Windows Media Player must get the source pixel aspect ratio for the file from somewhere, either in the AVI headers, or perhaps from the fact it's a DV codec, or the codec metadata.  This is the piece I'm missing.

In particular... is this a general feature?  Can I create an AVI file and specify arbitrary non-square source pixels, or is this just a special case for DV?
ASKER CERTIFIED SOLUTION
Avatar of crissand
crissand

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm accepting crissand's answer... it provides background to most of my questions.  I'm still not 100% sure how I can set the PAR in an AVI file, but I have a general understanding what's going on.