Log in

View Full Version : Anamorphic resolutions


md1032
10th May 2003, 00:51
What are the recommended resolutions for anamorphic (16:9) video? 640 · 480 pixels seems to be the favorite resolution for non anamorphic video encoded at the bitrates I use (mostly up to 90 minutes 23.976 FPS video at 700 MB), but in guides I’ve read a similar suggestion for anamorphic encodes is more rarely to be seen. The only one I’ve come across so far are in Zhentarim DivX’s general guidelines for encoding (http://guide.mellbin.org/zx.guideline.1.2.txt), where a resolution of 640 · 352 or 368 depending on the cropping (initially only a resolution of 640 · 352 pixels was suggested, so this post will only discuss that resolution) is suggested, along with 640 · 480 pixels for 4:3 movies.

What puzzles me is that the total area of the anamorphic resolution is quite smaller than that of the non-anamorphic resolution. 640 · 480 pixels seems to give great results for many people, so shouldn’t an ideal anamorphic resolution be as close to the total amount of pixels in this resolution as possible, 640 · 480 = 307200 to be exact? The number of pixels in the suggested anamorphic resolution, however, is only 640 · 352 = 225280. That’s a difference of 81920 pixels or 36 per cent, which surely will affect the output in a noticeable (but I’m not certain of how, compared to non-anamorphic video) way.

If we were to find an anamorphic resolution where the total number of pixels is as close to 307200 as possible, we could set up a simple equation where the height is defined as x, the width is defined as the ratio of 640 to 352 multiplied with the height (x) and the product of these lengths equals that of 640 · 480. It would be like this:

x · (640 : 352) · x = 640 · 480

x^2 · (20 : 11) = 307200

x^2 = 307200 : (20 : 11)

x = (307200 : (20 : 11))^(1 : 2) = ~411

Since the DivX 5 codec requires the height to be a multiple of 2, we’ll round it off to 410, which gives the following width:

412 · (20 : 11) = ~745

We’ll lower this to 744, which is, as required by the codec, divisible by 4. This resolution, 744 · 412, has an aspect error of 0.68% from the original 640 · 352, and the total amount of pixels is:

744 · 412 = 306528

which is only 672 pixels from 640 · 480.

However, since I haven’t seen this subject discussed in this detail anywhere else I confess I have a sneaking suspicion that I may be wrong altogether … feedback strongly appreciated. ;-)

jggimi
10th May 2003, 01:51
I think you may be trying to solve a non-existant problem. There are many, many different aspect ratios. And while you can buy "widescreen" and "fullscreen" versions of movies ... this has little to do with 4:3 or 16:9. Viz:[list=1] In a sense, all DVDs start out anamorphic, when displayed with square pixels, such as a PC monitor. 720x480 NTSC is 1.5:1, and 720x576 PAL is 1.25:1.

The valid DAR -- Display Aspect Ratio can be either 4:3 (1.33:1) or 16:9 (1.85:1).

These two DARs happen to be the two standard aspect ratios for televisions. 4:3 = standard, 16:9 = widescreen. The DAR can be opposite from the display device; you may watch a DVD with a 16:9 DAR on a 4:3 tv, and, you may watch a DVD with a 4:3 DAR on a 16:9 tv.

The DVD's content, though, if a film transfer, can by at almost any aspect ratio, and this is regarless of the DAR. There are many "widescreen" DVD's that were transfered with a 4:3 DAR.

The difference between the DARs, at first blush, means the difference in the amount of letterboxing encoded into the 720x480/576 video stream.

Obviously, with a constant resolution, if the production firm chooses a DAR close to the film's aspect ratio, there is more film content that can be fit into the DVD, and less black bits.

Example: Cinemascope is 2.35:1. If it is transferred with a 16:9 DAR it will look better than if it is transferred 4:3, but both will contain letterboxing in the video stream.[/list=1] For more, see Doom9's Aspect Ratios Explained (http://www.doom9.org/aspectratios.htm), and, if you're interested in film aspect ratios, check out Widescreen-o-rama (http://www.thedigitalbits.com/articles/anamorphic/aspectratios/widescreenorama.html).

md1032
10th May 2003, 21:17
But my question is: Shouldn’t the total number of pixels ideally be constant (307200 in this case), regardless of the aspect ratio of the resize resolution (chosed after eventual cropping of black bars)?

jggimi
11th May 2003, 00:40
You are right -- the more widescreen content is, the more easy to encode at higher vertical resolution. This is especially true of those lousy "widescreen" transfers with 4:3 DARs. Less of the 720x480 /576 frame is filled with content. But I believe a formula may be only an academic exercise. At least, for my needs.

I don't look at specific resolutions or aspect ratio. Instead, I use the bits / pixels X frames model. This model takes into consideration the pixels in each frame (resolution from square pixels at the proper, variable aspect ratio), as well as both the length of the content, and the average bitrate.

But MPEG-4 compressibility affects this result. So I use it solely as a resolution or size guideline, prior to a first compression test. After that first test, I ignore individual b/p*f values, and instead use the ratio between a 100% quality encoding and the intended average bitrate.

I use Gordian Knot, and thankfully, this methodology is designed into the tool. Which, of course, is why I use it.

Granted, I will take resolution into consideration; and will extend or contract the lenght of the encoding as needed, or, if appropriate, change resizing algorithm or use temporal filters to change compressibility. But I don't have hard and fast rules for resolution. I'll use the AviSynth preview function in Gknot to test resizing and other filters prior to encoding, and if necessary, will make test encodes of short scenes.