How pyTivo handles aspect ratios
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, KRKeegan.
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.
Then there is the issue that the largest dimension of file TiVo will accept it 720x480. You will note that this is a ratio of 3:2. And this is where it gets fun. True 4:3 would be 720x540 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
- If the ratio of width to height is greater than 1.33 then
- If 16:9 aspect is allowed and the file does not appear to be 4:3 then set the aspect to 16:9
- 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
- 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
- If 16:9 not selected then send in 4:3
- Pad the top and bottom with distorted pixels
- If 16:9 aspect is allowed and the file does not appear to be 4:3 then set the aspect to 16:9
- If the ratio is below 1.33 than always send as 4:3
- Pad the left and right with distorted pixels
And that is it.
