AVS Forum banner
Not open for further replies.
1 - 1 of 1 Posts

406 Posts
Discussion Starter · #1 ·
I’ve been following the Windows Media Encoder (WME) threads closely, and have been having the same problems as others regarding the aspect ratio control when encoding files through WME. I did a little more testing after this post , and it seems like there is a way to control the playback aspect ratio of files when encoded in WME that I did not find referenced in any of the threads. If anyone else here already posted this info, I am sorry but I have not seen it.


This issue seems to apply to movies that were either poorly encoded or poorly flagged. I don' t know enough about it, but for most of the files that I have tried to encode, leaving the video output the same as the input produces the correct results. However, sometimes there is a need to control the process more. One example that I have found is Reality Bites. Using the standard process, the file encodes at a 1:1.33 instead of a 1:1.85 ratio. Using the following method, I can correct this issue and obtain a correct output. But it seems you only need to use this if you are having problems with the aspect ratio.

-end edit-

The issue revolves around the fact that Windows Media Player (WMP) has no aspect ratio controls. Prior to the VCM release, there was no way to use the WM9 codec in anything other than WME. WME does not support AC3, so the only way to preserve the 5.1 sound was to encode to WMA format. But multichannel WMA doesn’t work through directshow, so playback in ZP or TT resulted in stereo sound. Now we have a way to utilize the WM9 codec with AC3 audio through virtualdub and avisynth, but I believe I have read that some of the pioneers (jamoka and jsaglia among others) have been having quality and performance issues using that method. Personally, I was not able to get that working, so I had given up.

What I would like to do is keep the ease of encoding everything directly in WME (the only thing that I can figure out and works reliably), keep the 5.1 sound (which currently requires playback through WMP), but not have to switch the resolution on the monitors and go to full screen ( a suggested workaround by jamoka ) every time we switch aspect ratios on our files.

Following most people’s (including mine) current process when encoding anamorphic dvd’s, we get the ‘tall and skinny’ problem: the dvd has non-square pixels, but they are converted to square pixels upon encoding. A 720 x 480 file (1.5:1 ratio) is supposed to be played back at a 1:85:1 ratio, so each pixel actually has a ratio of 1.233:1 (1.5*1.233 = 1.85). But if those rectangular pixels are ‘stretched’ back into a 1:1 ratio, the height of the image is stretched, resulting in the familiar ‘tall and skinny’ problem.

The way to fix this during the encoding of the file is to adjust a few settings. These settings must control the ‘header numbers’ that Amir referred to here . To enable non-square pixels, in the Compression tab, select Edit and check ‘Allow nonsquare pixel output’. Then go to the Video Size tab, and change the settings in the Pixel aspect ratio drop down. You will notice several preconfigured options, but they are a bit misleading. The key number to watch is the ‘Output’ value under the Aspect Ratio section (just to the right of the drop down). You want to make this value equal to the original aspect ratio of the movie. Notice if you select ‘Anamorphic 16:9 (4:3)’ with a 720 x 480 input file, you will get an output aspect ratio of 2:1, which is not quite right. To get the output aspect ratio exactly equal to the movie, choose Custom and enter the following values (assuming you have a 720 x 480 file with all pixels used for the content):

To Output 1.78 (16:9) – Custom 32 : 27

To Output 1.85 – Custom 37 : 30

To Output 2.35 – Custom 47 : 30

If your source file doesn’t use all the vertical pixels for storing data (for example, you cropped the black bars on a 2.35 transfer, leaving only 360 vertical pixels with information), then you can figure the appropriate value by the following formula: (utilized input width / utilized input height) / desired final aspect ratio. Put that value into Excel and format the cells to fraction with three decimals (because like me you forgot how to resolve repeating decimals into fractions in 3rd grade) and it will show the closed fraction to enter into the custom fields (the above example yields a 47 : 40 ratio). Just make sure the numerator and denominator values are between 1 and 255.

I did some brief validation on this, and when encoding a 720 x 480 file, and setting the target outputs to the appropriate ratios, the playback through WMP displayed the correct output aspect ratios. So the 720 x 480 file encoded with Custom 37:30 was displayed as a 1.85 aspect ratio file with no required adjustments to WMP or the monitor resolution. All the pixels were retained (according to the file properties which listed 720 x 480) and the bitrate seemed to be the same as the square pixel file. While I have not validated this on my HTPC, I see no reason for it to work differently on my desktop.

So it seems that we can now use WME by itself and playback the files with 5.1 sound through WMP without having any aspect ratio problems. Of course, a better solution will be to have MS fix their multichannel audio through directshow, but until that happens, this process should work fine.

Can other folks try this out to see if it works for them? And as always, thanks to everyone here for all their help and knowledge.

1 - 1 of 1 Posts
Not open for further replies.