pyTivo – Aspect Ratio

pyTivo – Aspect Ratio

I have received a number of questions about how pyTivo handles aspect ratios.  Aspect ratios are a very convoluted subject as you will see.  I make no attempt to explain everything, at the end of this page you will see a link to a much longer page that does a better explanation than me.

This is meant to be a quick and dirty explanation of how pyTivo handles Aspect Ratios.

Quick Tutorial on Aspect Ratios By no means is any of this guaranteed to be accurate. This only represents what I believe to be true, if I am making a mistake that causes an error in pyTivo please point it out to me.

There are two types of aspect ratios:
Frame Aspect Ratio
This is simply the ratio of what the file looks like when it plays on your TV which can be determined by:
Width displayed on TV: Height displayed on TV. TiVo accepts files in 16:9 or 4:3 format.

Pixel Aspect Ratio
This is the annoying one. This refers to the shape of the pixels themselves. For example a 1:1 pixel aspect ratio means a perfect square pixel.

Most computer files are saved in 1:1 Pixel Aspect Ratio(PAR) however that is where it ends.  TV, DVD, Film is all distorted to some other PAR.  Infortunately there is no way for us to know when pyTivo opens a file what the PAR is.  For the most part since pyTivo is using computer files it assumes that most files are 1:1.  And then if the file fits an exact dimension of a known non 1:1 PAR pyTivo will use that dimension.

Oh but we are not done. . .

Then there is the issue that the largest dimension of file TiVo will accept it 720×480. You will note that this is a ratio of 3:2. And this is where it gets fun. True 4:3 would be 720×540 so TiVo stretchs the image to be taller, to compensate for this pyTivo distorts a 4:3 image making it proportionately smaller before it sends the file. True 16:9 would be 853:480 so TiVo stretches the image on the sides, to compensate pyTivo distorts 16:9 images proportionately smaller horizontally to compensate for it.

For another look at aspect ratio, see this web page courtesy of SeeMoreDigital.

What are the steps pyTivo goes through to determine how to display the file

  1. If the ratio of width to height is greater than 1.33 then
    1. If 16:9 aspect is allowed and the file does not appear to be 4:3 then set the aspect to 16:9
      1. If the video is wider than 16:9 then pad the top and bottom taking into account that the pixels we use here will be distorted as noted above
      2. If the video is taller than 16:9 then pad the left and right taking into account that the pixels we use here will be distorted as noted above
    2. If 16:9 not selected then send in 4:3
      1. Pad the top and bottom with distorted pixels
  2. If the ratio is below 1.33 than always send as 4:3
    1. Pad the left and right with distorted pixels

And that is it.

Comments are closed.