AV1 Encoder Speed: librav1e vs libaom

This article compares the encoding speeds of the two prominent AV1 video encoders: librav1e and libaom. It examines how they perform across different speed presets, their architectural differences, and which encoder is best suited for your specific video processing needs.

Understanding the Encoders

libaom is the official reference encoder developed by the Alliance for Open Media (AOMedia). Written primarily in C, it serves as the baseline for AV1 feature implementations. While historically criticized for being incredibly slow, years of optimization have drastically improved its performance.

librav1e is an alternative AV1 encoder written in Rust. It was designed from the beginning to be the safest and fastest-to-market AV1 encoder, focusing on pragmatic, real-world encoding speeds and clean, memory-safe code.

Encoding Speed Comparison

When comparing encoding speed, the results depend heavily on the target quality and the specific speed presets (0 to 10 for librav1e, and 0 to 9 for libaom’s cpu-used).

1. High-Quality Offline Encoding (Slow Presets)

For archival and Video-on-Demand (VOD) purposes where file size and quality are prioritized over time: * libaom (presets 0–3) is notoriously slow but delivers the highest compression efficiency. It utilizes complex tools that require massive computational power. * librav1e (presets 0–3) is generally faster than libaom at these ultra-slow levels, but it does not achieve the same level of absolute compression efficiency as libaom.

2. Standard/Medium Encoding (Medium Presets)

For balanced daily encoding tasks: * libaom (presets 4–6) has seen massive multi-threading and assembly optimizations. At these mid-range presets, libaom often matches or slightly exceeds librav1e’s encoding speed while maintaining a slight edge in visual quality per bitrate. * librav1e (presets 4–6) offers highly predictable, stable performance. Its Rust-based multi-threading scales cleanly across modern multi-core processors, making it highly competitive in standard workflows.

3. Real-Time and Low-Latency Encoding (Fast Presets)

For live streaming and real-time communication: * libaom features a dedicated Real-Time (-rt) mode. When configured for real-time use, libaom’s fast presets (7–9) are incredibly fast and highly optimized for WebRTC applications, often outperforming librav1e in sheer frames-per-second (FPS) at low latencies. * librav1e (presets 7–10) scales up to very fast speeds. While it is highly capable of real-time encoding, it sometimes struggles to match the extreme optimization of libaom’s real-time mode on lower-end hardware.

Summary: Which One is Faster?