[OT] Why do so few people understand aspect ratios?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu May 27 17:49:08 UTC 2010


On Thu, May 27, 2010 at 01:34:36PM -0400, Thomas Milne wrote:
> Unfortunately, it's getting worse lately, perhaps because a lot of
> amateurs are getting involved, and people using crappy
> equipment/software.

Perhaps.  I still suspect encoding files recorded from TV that was
broadcasting letter boxed.  I really hope that's all it is.

> EXACTLY, thank you. I have to admit, I was kinda waiting for you to
> weigh in on this ;)
> 
> I can't complain _too much_, because the videos I'm talking about are
> not 'legitimate'. I just didn't realize there were actually displays
> out there that were such bad quality.

I really hope this only happens where people encode the broadcast signal
(or perhaps video camera image if in a theatre).  Since the video contains
the aspect ratio of the broadcast or video recorder in that case, the
black bars would be part of the video stream and were never actually
added by the person encoding the file.  In any other case it would be
just wrong.

For example:

$ ffprobe 5yrs-linux_1080p_loq.mp4 
FFprobe version SVN-r92, Copyright (c) 2007-2009 Stefano Sabatini
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.67. 0
  libavformat   52.31. 0 / 52.62. 0
  built on Jan 30 2010 11:08:30, gcc: 4.4.3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '5yrs-linux_1080p_loq.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf52.61.0
  Duration: 01:20:05.05, start: 0.000000, bitrate: 15262 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 15002 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Stream #0.1(und): Audio: ac3, 48000 Hz, 2 channels, s16, 256 kb/s

So it says that's a 1920x1080 file, with a pixel aspect ratio of 1:1
(square pixels are nice, although a few things like DVDs sometimes
have retangular pixels).  The overall disaply aspect ratio is 16:9.
So the player is responsible for deciding if the pixels needs scaling
up or down and the player is responsible for making sure that on the
display it outputs to the result of the video content is 16:9 aspect.
It can cut the sides or add black or pink bars if it needs to, but the
data in the file itself is to be treated as 16:9 and nothing else.

If a file contained black bars in the video itself, then it would almost
certainly be a 16:9 or similar video encoded as 4:3 with black bars in
the data.  Now the player can only know that this is a 4:3 video, and
it the display happens to be 16:9 or 16:10 the player has to add bars
to the side of the video so now you end up with a video taking up 1/4 of
the screen in the center with bars all around.  That's why a video file
should NEVER have black bars in the content.  So if you add them, you
are an idiot.  If they are already there because you are capturing letter
boxed video from a TV broadcast, well then I guess you are stuck with them
unless you use clever software to cut off the black bars before encoding.

Letter boxing should always be added by the player, not the encoder
because only the player knows what the display is actually capable of.

TV broadcasts being the exception, because they only have a fixed set
of resolutions they can broadcast at.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list