How to Set libsvtav1 Level Parameter in FFmpeg

This article explains how to configure the level parameter in the libsvtav1 SVT-AV1 encoder using FFmpeg. You will learn the correct command-line syntax, how AV1 levels dictate decoder compatibility, and how to choose the appropriate level for your target video playback devices.

The libsvtav1 Level Syntax in FFmpeg

To set the level parameter for the SVT-AV1 encoder (libsvtav1) in FFmpeg, you must pass the level argument inside the -svtav1-params option.

The basic command structure is as follows:

ffmpeg -i input.mp4 -c:v libsvtav1 -crf 26 -preset 5 -svtav1-params level=4.0 output.mkv

In this command: * -c:v libsvtav1 selects the SVT-AV1 encoder. * -svtav1-params level=4.0 forces the encoder to comply with AV1 Level 4.0.

Alternatively, you can pass multiple parameters separated by a colon:

ffmpeg -i input.mp4 -c:v libsvtav1 -crf 24 -svtav1-params level=5.1:profile=main output.mkv

Understanding AV1 Levels

AV1 levels define the performance capabilities required by a hardware or software decoder to play back a video file. They set limits on parameters such as maximum resolution, frame rate, and bitrate.

If you do not specify a level, the encoder will automatically choose the lowest level that fits the input video’s resolution, frame rate, and bitrate. However, manually setting the level ensures strict compliance with specific playback hardware.

Common AV1 levels include:

Why Configure the Level Parameter?

  1. Hardware Compatibility: Older or budget streaming sticks and mobile processors only support AV1 decoding up to Level 4.0 or 5.0. Restricting your encode to these levels ensures stutter-free playback.
  2. Streaming Standardization: Many video distribution networks require specific profiles and levels to streamline server-side processing and delivery.