Tuesday, December 06, 2005

640x480 500 kbps at 20 fps

Looks like for home videos h.264 640x480 500 kbps at 20 fps is the best compromise between size and quality.

Going to full frame rates would require 25%-50% more bandwidth that is full framerates need 650 kbps for PAL (25 fps) and 750 kbps for NTSC (29.97 fps). You really cannot go lower then 20 fps because motion becomes jerky. Going to smaller picture size 480x352 doesn't buy that much - 400 kbps vs 500 kbps. Well, sometimes it could be pushed to 300 kbps, but it is a smaller picture after all and besides when outputing to TV it result in "scaling artifacts".

Sometimes thought 500 kbps is not enough to encode at 640x480, like with Dance video, but 400 kbps at 480x352 could be enough (not enough with Dance video, or is it???). And sometimes 500 kbps is not enough even for 480x352 (PomPom). At this time I don't know how to handle that, but both videos have "a lot of black" and "a lot of motion" in common.

So for now the game plan is

  1. Encode 640x480 at 500 kbps
  2. Encode 480x352 at 300 kbps
  3. If could be pushed bellow, do the push.
The following table list 480x352 clips that I uploaded so far
clipkbpsPSNR
Udarenia25034.95 (60.84SSIM)
Gazon30038.674/38.2908.68/5.92fps
Bike40035.73 (60.05SSIM)lower there were artifacts
Bike35037.104/36.8908.07/5.64fps
Dance40040.63 (76.70SSIM)cannot be pushed lower
Podcast30036.465/36.3728.09/5.74fps
Svekla30037.516/37.41011.30/7.03fps
As could be seen out of 6 clips only 2 needed 400kbps and average encode speed for 2 pass x264 encoding was 1/8+1/5.7=1/3 ~ 3.32 FPS. With exception of "Udarenia" clip (which is old unreliable number) PSNR was higher then 35.

The following table shows the metrics for 640x480 @ 500 kbps

clipkbpsPSNR
Udarenia50035.61 (60.84SSIM)
Gazon50038.52 (47.52 SSIM)8.06/4.31fps
Bike50037.09 (54.25 SSIM)
Dance50038.17 (65.76 SSIM)7.26/4.23fps
Podcast50038.006/37.1354.97/3.45fps
Svekla50038.250/38.14710.36/5.26fps
As could be seen, when PSNR goes close to 38 at 640x480@500kbps, the clip could be sqeezed to 300kbps at 480x352, with PSNR bellow 33-35 at 640x480@500kbps, the clips could not be sqeezed into 400kbps at 480x352.

Followers