VP9 vs x264 VMAF Quality Comparison
When comparing video encoding performance, objective Video Multi-Method Assessment Fusion (VMAF) scores reveal that libvpx-vp9 consistently outperforms x264 by delivering equivalent visual quality at significantly lower bitrates. This article analyzes the VMAF score differences between these two popular encoders, examines the bitrate efficiency gap, and highlights the trade-offs in encoding speed and computational resource usage.
Bitrate Savings and VMAF Score Equivalency
On average, libvpx-vp9 achieves a 30% to 50% bitrate reduction compared to x264 while maintaining the exact same VMAF score.
In objective quality testing: * At Identical Bitrates: If you compress a video using both encoders at the same target bitrate (e.g., 2000 Kbps for 1080p), the libvpx-vp9 encode will yield a significantly higher VMAF score than the x264 encode. This gap is especially noticeable in high-motion scenes and complex textures where x264 suffers from blocking artifacts. * To Reach Target VMAF Thresholds: In streaming workflows, a VMAF score of 93 to 95 is generally considered the threshold for “visually lossless” quality. To reach a VMAF score of 93, an x264 encode might require a bitrate of 4500 Kbps, whereas a libvpx-vp9 encode can routinely achieve the same score at approximately 2500 to 3000 Kbps.
Performance Across Different Resolutions
The efficiency delta between the two encoders becomes more pronounced as the resolution of the source video increases:
- 1080p and higher (2K/4K): VP9 utilizes larger prediction blocks (up to 64x64) compared to H.264’s maximum of 16x16 macroblocks. This allows libvpx-vp9 to compress flat areas and high-resolution details much more efficiently, leading to vastly superior VMAF scores at higher resolutions.
- 720p and lower: While VP9 still outperforms x264 at lower resolutions, the VMAF score gap narrows. At very low resolutions, the overhead of VP9’s advanced coding tools yields diminishing returns relative to the simpler H.264 standard.
The Cost of Higher VMAF: Computational Complexity
While libvpx-vp9 wins decisively in VMAF-per-bitrate comparisons, it requires substantially more computational power.
- Encoding CPU Cycles: Compressing video with
libvpx-vp9 can take up to 3 to 10 times longer than x264 using
equivalent quality presets (e.g., comparing VP9
-speed 1or2to x264preset medium). - Preset Trade-offs: To speed up VP9 encoding,
developers often use faster speed settings (like
-speed 4or higher in FFmpeg). While this reduces encoding time closer to x264 speeds, it also reduces the objective VMAF score, narrowing the quality advantage over a well-tuned x264 encode.