[MPlayer-users] Question about aspect ratios

Daniel A. Nagy nagydani at mast.queensu.ca
Sat Dec 15 07:14:06 CET 2001


Hi.

> I'm a bit confused about aspect ratios and wondering if anyone can
> enlighten me?
> What is the purpose of specifing aspect ratios?
> 
> First the aspect of the video source.  Suppose i have a video that is
> 576x240. well the aspect ratio is 2.4, why would i want to tell mplayer
> that the aspect ratio is 2.4?

This is an important and interesting question and it's notoriously
underdocumented. The point is that pixels, though often thought about as
squares, are actually sample points on a grid, which is not necessarily a
square lattice. In the computing world, modern displays (as of VGA) use
square pixels, but this is a fairly recent trend (not by computer history
standards, of course :-). Anyone remembers 'EGA' with its weird 640x350
resolution, or CGA with 640x200?

Now, not all displays are computer displays. There are TVs, video monitors
and many more. You obviously need to rescale for these in order to have the
moon look different from an egg, and being constantly exposed to
El-Greco style long faces. :-)

TVs and video monitors are analog devices, whereby you have a given number
of rows, but there are no columns, just a bandwidth limit imposed by the
circuitry and the standards. Now, in order to store images digitally, you
want to sample this analog signal at a certain rate and reproduce it
afterwards. The sampling rate is a tradeoff between quality and quantity:
the higher the sample rate (okay, let's call things by their names: pixel
clock), the better the quality, up until the frequency limit imposed by the
analog source. The lower the sample rate, the smaller the file becomes.

At this point it should be obvious, that making the ratio of the pixel clock
and the horizontal sync the same as that of the horizontal and the vertical
sync, which would make the pixels square is a completely arbitrary choice
that cannot be justified if we have optimization criteria other than
computational simplicity. Therefore, in most TV systems and their digital
extensions the pixels are not sqares.

The matter is further complicated by the fact that there are actually two
major and many minor TV standards, which, of course, use different
frame (vsync) and line (hsync) frequencies, while the pixel clocks of
digitizing equipment as well as the transfer characteristics of commonly
available amplifier chips are the same. Therefore the ratios are different.

Of course, the civilized world uses either PAL or SECAM as a TV standard,
which have basically the same hsync and vsync values (rougly 15.3kHz and
50Hz, respectively). Unfortunately, the majority of the movies come from
less civilized countries, which stick to an obsolete and techincally
inferior standard called NTSC, which uses lower line frequency (about
14.5kHz) and higher frame frequency (roughly 60Hz). As ridiculous as it is,
it is a fact of life: using the same D/A converters and rougly the same
border area proportions, one gets 640x480 (interlaced) in the civilized
world, and 640x400 (interlaced) in the movie-making countries. The shape of
the TV display, however, is the same (about 4:3). While some tweaking around
with the frequencies might yield square pixels in the 50Hz countries,
there's no damn way to achieve that in the 60CPS (Cycle per Second :-)
world.

What aggravates the sad state of matters further is the wide-screen. Of
course, you want to take full advantage of the bandwith provided by the
transmission channel, so you don't just black out the unused lines above and
below the picture: you squeeze the picture by lowering the ampliture of the
vertical spread. This way you get higher resolution. On wide-screen
home-theaters with 16:9 screen ratio this is actually the full screen mode,
and the 4:3 broadcasts get squeezed. In either case, you have the same
number of pixels (640x480 or 640x400) but different aspect
ratios. Neither of the standards yields square pixels in this case.


> Why would a video be encoded at an aspect ratio that is not its true
> aspect ratio, surely stretching it in software after decoding would give
> worse quality than just encoding it at the correct ratio?

Correct! This is the key word. The correct ratio is the one that is dictated
by the displaying equipment, because you don't want to stretch it after
decoding. And as explained above, the displaying medium can be very
different. I hope, you don't expect American DVD producers to optimize for
European narrow-screen instead of American wide-screen, do you? However, the
very purpose of Linux, is to bring down borders by a) cracking the fscking
css and by b) rescaling the movie for whatever screen I happen to have (a
800x600 SVGA monitor, for example). :-)


> Secondly, specifing the monitor aspect. Well if my monitor is at 800x600
> then the aspect is 1.333333333... Why would i want or need to tell
> mplayer that?

Your TV has always 640x400 or 640x480 (depending on the country you live in)
pixels, while the aspect is either 4:3 or 16:9 depending on whether or not
you press the magic button (if you have such) on the remote. Yet, you wanna
see the eclipsed sun behind "A" in Baraka to appear as a perfect circle.
Thus, you have to tell mplayer, that your DVD is an american widescreen one
(input ratio 16:9, never mind the resolution), while your display is a cheap
TV set in Europe (4:3, 640x480, mere coincidence!). But if it's an expensive
home-theater, still in Europe, then it's gonna be (16:9 with the same
640x480 resolution). That's why.

I hope, I answered your question and provided enough raw material for
future documentation. It's GPL, so please give me credit :-).

Cheers,

-- 
Daniel

PS:

Note that home-theater systems in America are a pure vaste of money as the
resolution of the picture as well as it's quality is so terribly bad that it
renders the whole experience frustrating. And them retarded yanks don't have
RGB inputs on their TVs (no (euro-)scart connectors in America!), so the
best you can get is feeding the NTSC CVBS signal into the idiot-box. Yet, home
theaters sell much better in America than anywhere else in the world. And
they wonder why the rest of the world makes fun of them all the time. ;-)

read http://www.fazekas.hu/~nagydani/Russian-tea-HOWTO-v1.html




More information about the MPlayer-users mailing list