PDA

View Full Version : WMV and aspect ratio


Atlantis
3rd July 2006, 20:46
I want to encode a PAL DVD clip to WMV9. My question is about aspect ratios in WMV files. Should the aspect ratio of WMV be exact? Meaning the ratio of the actual encoded image?

My image is of course 720 x 576, should I resize it to 768 x 576 to get a correct aspect ratio on my WMV? Or is there an aspect ratio flag in WMV files and that I can encode it in its original size and set the flag to 4/3?

zambelli
3rd July 2006, 21:56
You can set pixel aspect ratio flags in ASF files. Which encoding tool are you using?

Atlantis
3rd July 2006, 22:31
I use Nic's encoding tool:
http://nic.dnsalias.com/wm9enc.html

I also have Windows Media Encoder but I don't think that it has aspect ratio. I don't remember.

zambelli
3rd July 2006, 23:18
I don't think Nic's encoder supports pixel aspect ratios.

You can set them using WME9 though, both through GUI and via command-line.

Atlantis
4th July 2006, 10:13
Anyway, I resized it to 768 x 576 and then cropped its black borders. Is there a rule about the size like divisible by 4 or more? Because the clip plays fine in windows media player but when played with PowerDVD, it has dancing artifacts on the bottom.

zambelli
4th July 2006, 22:57
Maintaining a size divisible by 16 is even better. Anyway, there's no harm in resizing to 768x576, except for the fact that bitrate is being wasted on interpolated information that wasn't originally there. That's why anamorphic encoding makes more sense.

Atlantis
5th July 2006, 15:06
Yes, indeed thanks. When the size is divisible by 16, it plays fine even in PowerDVD. I have no choice but to resize it that way. Because I don't want to shrink it vertically because I will lose information.

I'm not sure what you mean by anamorphic encoding but my source is a 4/3 material and even if it was a widescreen material, I don't know how it would have helped if I had encoded it in anamorphic, since WMV has no 16/9 flag. I know WMV as container and that's also what Microsoft uses in it's HD showcase demos and they are encoded in their real aspect ratio.

andersi
5th July 2006, 17:48
You should stick to 720x576 and change the pixel aspect ratio in stead.

If your source is 16:9 set pixel aspect ratio = 64:45.
If 4:3 use 16:15

You will have to mark the setting "allow non-square pixel output" under the compression tab also to get this working.

Because of a bug in WME the pixel aspect ratio sometimes dissapears when saving to a session file (.wme). To be sure just open the .wme file in notepad and check/correct it.

zambelli
6th July 2006, 04:37
I'm not sure what you mean by anamorphic encoding but my source is a 4/3 material and even if it was a widescreen material, I don't know how it would have helped if I had encoded it in anamorphic, since WMV has no 16/9 flag. I know WMV as container and that's also what Microsoft uses in it's HD showcase demos and they are encoded in their real aspect ratio.
"Anamorphic" generally means "non square pixel". The term got associated with widescreen DVDs, but it existed long before then, in 35mm photography and meant "unequally scaled in vertical and horizontal dimensions."

You should stick to 720x576 and change the pixel aspect ratio in stead.
If your source is 16:9 set pixel aspect ratio = 64:45.
If 4:3 use 16:15
Actually, the correct PARs for PAL are 12:11 (full screen) and 16:11 (widescreen). The aspect ratios are actually based on the 704x576 active area of the image.

Atlantis
6th July 2006, 10:02
Thanks for your help. I looked closely at WME last night and indeed found the pixel aspect ratio option. It's exactly what I want. I will play with it and wil not resize my video anymore. It's a waste of bitrate.

However I have an AviSynth script and cannot use it in WME. Actually I can open it but when I start the encode it says it can not read it. I did follow a VC-1 thread, it said that with the new codec you wouldn't have a problem so I did install the little standalone VC-1 exe file but no luck. However I can open my avs file in Windows Media Player and watch it! Any ideas?

check
6th July 2006, 10:30
WME doesn't support opening AVS files at the moment :( The best choice is to encode the AVS file to a lossless avi, with a codec such as huffy. This will use around 15gb/hour though.

SeeMoreDigital
6th July 2006, 12:32
Actually, the correct PARs for PAL are 12:11 (full screen) and 16:11 (widescreen). The aspect ratios are actually based on the 704x576 active area of the image.Indeed....

However, I'd recommend checking the active image pixel area of any 720 pixel wide source, as many of them contain an active image pixel area greater that 704 pixels.


Cheers

Atlantis
6th July 2006, 13:36
Could you please explain more in detail how Pixel Aspect Ratio should be calculated? I don't understand why regardless of the color system (PAL/NTSC), you couldn't simply set the PAR to 4/3?

SeeMoreDigital
6th July 2006, 14:21
...I don't understand why regardless of the color system (PAL/NTSC), you couldn't simply set the PAR to 4/3?You can with MPEG-4 video sources....

Some applications offer DAR (Display Aspect Ratio) selection options, such as 4:3, 16:9 and 2.35:1.

You can feed in a "cropped" MPEG-4 source (of any resolution), and input any aspect ratio shape you require :)

andersi
6th July 2006, 19:49
Could you please explain more in detail how Pixel Aspect Ratio should be calculated? I don't understand why regardless of the color system (PAL/NTSC), you couldn't simply set the PAR to 4/3?

DAR and PAR are two different things. The connection between them is shown in this equation:

W/H*PAR = DAR

W=width, H=height

You should always crop to active region and calculate PAR according to that to get the best result.

The 704 or safe region is a shit from the past since all TVs do overscan. Even brand new LCD TVs have to do this today because broadcasters and DVD makers don't bother to fill the entire frame anymore.

zambelli
7th July 2006, 10:27
WME doesn't support opening AVS files at the moment :( The best choice is to encode the AVS file to a lossless avi, with a codec such as huffy. This will use around 15gb/hour though.
That's not true.

You need to either set the source to "Both Device and File" if encoding via GUI, or use the updated wmcmd.vbs if encoding from command-line. The latter is described here: http://forum.doom9.org/showthread.php?t=111633

zambelli
7th July 2006, 10:30
The 704 or safe region is a shit from the past since all TVs do overscan. Even brand new LCD TVs have to do this today because broadcasters and DVD makers don't bother to fill the entire frame anymore.
Regardless of what the active region of the TV, DVD or DV source actually is - the correct PAR according to ITU standards is always 12:11 (full screen) and 16:11 (widescreen). The image area shouldn't actually affect it if the content was authored according to ITU standards.