SVT-AV1 vs AOM: libavif Encoding Speed Comparison
This article compares the encoding speeds of the SVT-AV1 and AOM
(libaom) encoders when utilized within the libavif library
for creating AVIF images. While AOM serves as the reference encoder
focused on maximum compression efficiency, SVT-AV1 is highly optimized
for multi-core processors, resulting in significantly faster encoding
times at comparable quality levels.
Understanding the Encoders in libavif
The libavif library acts as a wrapper that relies on
external AV1 codecs to perform the actual image encoding. The two most
prominent encoders used for this task are AOM (the
Alliance for Open Media reference encoder) and SVT-AV1
(Scalable Video Technology for AV1, developed by Intel and Netflix).
While both encoders produce highly compressed, high-quality AVIF images, they are designed with different architectural philosophies, leading to vast differences in encoding speed.
SVT-AV1: Optimized for Speed and Multi-Threading
SVT-AV1 is built from the ground up to utilize modern, multi-core CPU
architectures. When used inside libavif, its primary
advantage is speed.
- Multi-Threading Performance: SVT-AV1 excels at parallel processing. If you are encoding AVIF images on a modern system with multiple CPU cores and threads, SVT-AV1 distributes the workload efficiently, resulting in rapid encode times.
- Speed Presets: SVT-AV1 offers a wide range of speed presets (typically from 0 to 13). Higher presets (such as 6 through 10) provide extremely fast encoding speeds that are suitable for on-the-fly image generation on web servers, with only negligible losses in compression efficiency.
AOM: Optimized for Maximum Compression
AOM (specifically libaom) is the reference encoder for
the AV1 format. Its primary design goal is to achieve the absolute best
visual quality at the lowest possible file size, often at the expense of
processing time.
- Single-Thread Limitations: Historically, AOM has struggled with multi-threading. Even with recent updates introducing better tile-based threading, it does not scale across multiple CPU cores as effectively as SVT-AV1.
- Encoding Bottlenecks: At higher quality settings (such as CPU-used levels 0 to 4), AOM can be painfully slow, requiring significant computational resources to compress a single image. While it produces incredibly optimized files, the time required makes it impractical for real-time or high-volume batch processing.
Speed Comparison Summary
When comparing the two encoders directly within
libavif:
- SVT-AV1 is substantially faster: In most real-world scenarios, SVT-AV1 can encode AVIF images several times faster than AOM, especially when leveraging multi-core CPUs.
- AOM maintains a slight efficiency edge: At the cost of much longer encoding times, AOM can sometimes produce slightly smaller file sizes than SVT-AV1 for the exact same visual quality. However, this gap has narrowed significantly with recent SVT-AV1 updates.
Which One Should You Choose?
The choice between SVT-AV1 and AOM comes down to your specific use case:
- Choose SVT-AV1 if you need to encode images quickly, perform real-time server-side AVIF generation, or process large batches of images in a reasonable timeframe.
- Choose AOM if you are preparing static assets for a production website where encoding time does not matter, and your sole objective is to save every possible byte of bandwidth.