AVIF Encoding Presets: File Size vs Quality Trade-Offs

AVIF encoding presets dictate the balance between computational effort, compression efficiency, and visual fidelity. Lower or slower presets enable the encoder to analyze the image thoroughly, producing the smallest possible file sizes while preserving fine details, but at the cost of prolonged processing times. Conversely, faster presets reduce CPU usage and encoding latency by skipping complex optimization algorithms, which either increases file size or degrades image quality. Understanding this relationship is critical for choosing the right configuration for static assets, dynamic workflows, and bandwidth-constrained delivery.

How AVIF Encoders Use Presets

AVIF is derived from the AV1 video codec, primarily utilizing encoders such as libaom, rav1e, or SVT-AV1. In these engines, presets are typically denoted numerically—such as cpu-used (ranging from 0 to 8 or 9 in libaom) or speed/preset values in SVT-AV1.

A preset determines how many algorithmic tools the encoder activates during compression, specifically:

The Trade-Off: File Size vs. Processing Time

The primary effect of adjusting presets lies in the compression density achieved per unit of time.

Slower Presets (e.g., cpu-used 0–3)

Balanced Presets (e.g., cpu-used 4–6)

Faster Presets (e.g., cpu-used 7–9)

Impact on Visual Fidelity

The relationship between presets and fidelity depends heavily on whether encoding is performed using a fixed target quality (Constant Rate Factor / CRF) or a constrained file size (target bitrate).

In Constant Quality Mode (CRF)

When an encoder is set to a fixed CRF value, it attempts to maintain a uniform visual threshold. At faster presets, the encoder's reduced mathematical precision causes it to miscalculate complexity, leading to subtle banding in smooth gradients or blurring in high-frequency textures (such as hair or foliage). To compensate and maintain fidelity, the encoder is forced to output a larger file. Slower presets maintain sharper edges, smoother gradients, and consistent micro-textures at smaller footprints.

In Constrained Size Mode (Target Bitrate)

If the file size is strictly capped, changing the preset directly alters visible fidelity. A fast preset forced into a small file size produces noticeable artifacts, including blocking, color bleeding, and ringing around high-contrast edges. A slow preset operating under the exact same size constraint allocates bits intelligently, keeping artifacts imperceptible to the human eye.