// HACKER NEWS — CYBERSECURITY
Optimizing x264 settings and per-title ladders
Jan Ozer
September 25, 2026
Articles
Leave a comment
896 Views
If you’re producing solely H.264-encoded video, optimizing your encodes can save you bandwidth costs and deliver a higher quality experience to your viewers. If you’re considering adding HEVC or AV1 to the mix, you have another reason.
Before you attempt to compute the bandwidth savings and quality improvements these codecs deliver, you should know just how much quality and bitrate you can get from your current H.264 encoder. Otherwise, some of the gain you credit to the new codec is really the gain you left on the table with H.264.
To illustrate this, I produced two series of tests with x264 and FFmpeg. First was to identify the optimal encoding parameters for x264 using 1080p clips, then to apply those parameters to a full encoding ladder and compute the overall benefits. For you TL/DR aficionados, the results come first. The rest of the article explains how we got them.
You can download a Zip file with much of the results of this testing here. Details of what’s in the Zip are below.
You’re going to have a ton of questions, but this is the TL/DR section; we’ll answer most of them below.
The TL/DR bottom line? Optimizing x264 boosts VMAF by .66 VMAF points while reducing bandwidth from 4.9 Mbps to 3.27 Mbps, or 33%. Encoding time is more than tripled. As you can see if you peek ahead to Figure 4, the bandwidth savings exceed encoding costs at 186 hours of viewing, making the decision to optimize a no brainer for all but the tiniest of encoding shops.
Figure 1 starts with x264 at mostly default settings (with a two-second GOP) using a fixed H.264 ladder, and adds one optimization at a time: the veryslow preset, a ten-second GOP, two-pass encoding, three reference frames, and finally a per-title ladder with the same settings.
How did we compute the VMAF and bitrates? It’s complicated. Take a deep breath. Exhale slowly. Repeat.
OK. We computed the numbers assuming the distribution pattern shown in Figure 2, which is called the Top-Heavy distribution pattern in the Streaming Learning Center Bitrate Explorer (SBE) shown in Figure 3. Why didn’t we just average the bitrates and VMAF values for all rungs? For several related reasons.