How to Configure CRF in FFmpeg libsvtav1

This guide explains how to set the Constant Rate Factor (CRF) for the SVT-AV1 encoder (libsvtav1) in FFmpeg. You will learn the exact command-line syntax, recommended CRF values for balancing quality and file size, and how to combine CRF with encoding presets to achieve optimal compression.

The Basic Command Syntax

To set the CRF value in FFmpeg using the libsvtav1 encoder, use the -crf flag followed by your desired quality number.

Here is the standard command structure:

ffmpeg -i input.mp4 -c:v libsvtav1 -crf 26 -preset 5 output.mkv

Parameter Breakdown:

The CRF scale for libsvtav1 ranges from 0 to 63. Unlike older encoders like x264, SVT-AV1 is highly efficient at higher CRF values. Lower numbers yield higher quality at the expense of larger file sizes.

Pairing CRF with Presets

For the best results, you must pair your CRF value with an appropriate -preset. SVT-AV1 presets dictate how hard the encoder works to compress the video.

For example, a highly optimized encode for a 1080p movie would look like this:

ffmpeg -i input.mp4 -c:v libsvtav1 -crf 24 -preset 4 -c:a libopus -b:a 128k output.mkv