Configure libsvtav1 Profile in FFmpeg
This article provides a quick guide on how to configure the profile
parameter for the libsvtav1 (SVT-AV1) encoder in FFmpeg.
You will learn about the different AV1 profiles available, the correct
syntax to define them in your command-line arguments, and how to match
your chosen profile with the appropriate pixel formats.
AV1 Profiles Overview
The AV1 standard defines three profiles, each specifying the bit depth and chroma subsampling capabilities that the decoder must support. SVT-AV1 maps these profiles as follows:
- Main Profile (0 or
main): Supports 8-bit and 10-bit color depths with 4:2:0 chroma subsampling. This is the default profile and offers the widest device compatibility. - High Profile (1 or
high): Supports 8-bit and 10-bit color depths with 4:4:4 chroma subsampling. - Professional Profile (2 or
professional): Supports 8-bit, 10-bit, and 12-bit color depths with 4:2:2 chroma subsampling.
How to Set the Profile in FFmpeg
In FFmpeg, you configure the profile using the standard
-profile:v flag. You can specify the profile using either
its integer value or its string name.
Syntax
ffmpeg -i input.mp4 -c:v libsvtav1 -profile:v <profile_value> output.mkvExamples
1. Set to Main Profile (Most Common) To encode a standard 10-bit 4:2:0 video using the Main profile:
ffmpeg -i input.mp4 -c:v libsvtav1 -profile:v main -pix_fmt yuv420p10le output.mkv(Alternatively, you can use -profile:v 0)
2. Set to High Profile To encode a 4:4:4 video using the High profile:
ffmpeg -i input.mp4 -c:v libsvtav1 -profile:v high -pix_fmt yuv444p10le output.mkv(Alternatively, you can use -profile:v 1)
3. Set to Professional Profile To encode a 4:2:2 video using the Professional profile:
ffmpeg -i input.mp4 -c:v libsvtav1 -profile:v professional -pix_fmt yuv422p10le output.mkv(Alternatively, you can use -profile:v 2)
Important Compatibility Considerations
When manually setting a profile, you must ensure your pixel format
(-pix_fmt) matches the profile’s technical limitations:
- If you select
-profile:v main, your pixel format must be 4:2:0 (e.g.,yuv420poryuv420p10le). - If you select
-profile:v high, your pixel format must be 4:4:4 (e.g.,yuv444poryuv444p10le). - If you select
-profile:v professional, your pixel format must be 4:2:2 (e.g.,yuv422poryuv422p10le).
If there is a mismatch between the chosen profile and the pixel
format, the libsvtav1 encoder will output an error and fail
to initialize. If you do not specify a profile, FFmpeg will
automatically choose the correct profile based on your input or
specified pixel format.