Posts tagged ‘h264’

x264 is an open source h.264 encoder. Since r1177 it includes a preset system. The presets give an easy way to balance quality vs encoding speed, ranging from placebo (highest quality) to ultrafast (lowest quality).

I wanted to get an idea what kind of quality/time gains could be archived with these settings. Usually the first steps of extra quality are barely noticeable in encoding time, while the last bits of quality cost significantly more. To verify this statement and to quantify it, I encoded 2 video sequences at 2 resolutions using all 9 available presets. I used PSNR as metric. I’d be the first to admit that PSNR does not correspond to quality, but it correlates reasonably well.

Continue reading ‘x264 presets’ »

The internet is filled with guides and howto’s for getting video on you iPhone. The specs specify the iPhone to support h.264, baseline profile, level 3.0. Translated this means:

  • No B-frames
  • No CABAC
  • No weighted predictions
  • No 8×8 DCT
  • Max resolution around 640×640 (technically 1620 MacroBlocks, 16×16 each)
  • Max 25fps at that resolution (technically 40500 MacroBlocks per second)
  • Max 10Mbps

The iPhone imposes some extra limitations:

  • Max 640×480, 30fps
  • Max 2.5Mbps

Most guides on the internet additionally force the number of reference frames down to 1 (ffmpeg‘s -refs parameter), although I could no find any specsheet imposing this limit. So I decided to test this.

Continue reading ‘h264 limits for iPhone’ »