Tech posts by aclassifier
Also see Designer's note page

You are at
Archive by month and about me: here
Last edit: 4Sept2015
Started move: September 2012
All updates at, but the overview is updated

Tuesday, March 8, 2011

024 - 16:9 video aspect ratio with width 720 uses height 404 instead of 405

iPhone movies..
The iPhone 4 produces QuickTime HD movies (.mov) that are 1280 x 720 pixels (16:9 aspect ratio). Observe that this is not the screen aspect ratio, which is 960 x 640 (3:2 or 1.5). Here is a nice comparison: (but speculative about iPad3). not play on all machines
This is very nice. I can play it on my Mac Mini running Mac OS X Snow Leopard and QuickTime Player 10.0. However, the iBook and iMac (lamp) G4 machines running Mac OS X Tiger with QuickTime Player 7.6.4 only plays the sound but shows the odd picture as it moves on.
But QuickTime Player export to "HD 480p" helped
So, I exported from the newest QuickTime Player to a "HD 480p"-type file. This plays beautifully on the older Tiger machines. The movies turn out to be 640 x 360 pixels (16:9). The movies were brighter and better looking than corresponding mpeg-2 (.mpg) movies in 640 x 480 (4:3 or 1.33..) shot with a Sony DSC-W100. And somewhat smaller in file size, I think.
I have also seen some movies that have been converted to 985 x 544 pixels, which is approximately 16:9. See below. I doubt that this is a result og HD 480p export, though?
And I think that 480p is 640 x 480 in 4:3, but I have not tried. But Panasonic Lumix DMC-LX5 takes several formats, so I will try one day.
However, export to "HD 720p" intrigued me
But I wanted to try to see how export to "HD 720p" ran on the Tiger machines. Better, but really not. I could accept that. However, I saw that this movie was 720 x 404 pixels, a little more than 16:9. I used the lazy solution at Evalwave Factors at to factorize.
First, 16:9 is 1,7777777777.....
720 = 2 x 2 x 2 x 2 x 3 x 3 x 5
404 = 2 x 2 x 101
removing common factors 2 x 2 yields
180:101 = 1,78217821782.. is almost 16:9
How about one more pixel (404+1) on the short side:
720 = 2 x 2 x 2 x 2 x 3 x 3 x 5
405 = 3 x 3 x 3 x 3 x 5
removing common factors 3 x 3 x 5 yields
So, why is 720 x 404 used?
Kyle Gilman's page opens a door for me: "Keep the height an even number. Odd numbers freak out the H.264 codec. In this case 720×405 is closer to 16:9, but change it to 404 and everyone will be happier."
Some day I'll investigate more about the H.264 codec.
However, I do remember from the time I did Fast Fourier Transforms that even numbers were required (even if there are odd number algorithms available). And hardware multiplies by two by shifting left by one bit. This is much faster, and does not build up any errors.
Screens certainly must show the missing 405th line as all dark! Or the other way around, the iPhone (or, really H.264) throws away a line?
Another example is 568 x 320
My daughter sent me this iPhone movie by mail, directly from the phone.
568 = 2 x 2 x 2 x 71
320 = 2 x 2 x 2 x 2 x 2 x 2 x 5
removing common factors 2 x 2 x 2 yields
71:40 = 1,775, some 0.0277777.. off 16:9
What is the "real" 16:9 numbers here, i.e. how much is lost? Around those values there are lots of prime numbers, which are never even. Moving one up or down by 1 does not get me there.
I certainly need help here!

Archive and about

Popular Posts

Øyvind Teig

My photo
Trondheim, Norway

All new blogs and new home page start at

Overview of old blog notes here

My technology blog was at

and my handicraft blog was at

PS: just call me "Oyvind"