How to Set libsvt_hevc Preset in FFmpeg
This article explains how to configure the speed and quality presets
for the libsvt_hevc encoder in FFmpeg. You will learn the
correct command-line syntax, the range of available preset values, and
how to balance encoding speed against compression efficiency for your
video processing workflows.
To configure the encoding speed and quality in
libsvt_hevc (Intel’s Scalable Video Technology for HEVC),
you use the -preset option. This option controls the
trade-off between encoding speed and compression efficiency.
The Preset Range
The libsvt_hevc encoder accepts integer values for the
-preset option, ranging from 0 to 13:
- 0: The slowest preset, offering the highest compression efficiency and visual quality.
- 13: The fastest preset, offering the quickest encoding times but at the cost of lower compression efficiency and larger file sizes.
- 9: Typically serves as the default preset if none is specified.
Command Example
To set a specific preset, insert the -preset flag after
specifying the libsvt_hevc encoder.
Here is a standard FFmpeg command using preset 7 (a
balanced choice for speed and quality):
ffmpeg -i input.mp4 -c:v libsvt_hevc -preset 7 -crf 25 output.mp4Choosing the Right Preset
- For Archiving (Max Quality): Use presets 0 to 3. These require significant CPU resources and time but produce the smallest file sizes for a given quality level.
- For General Encoding: Use presets 4 to 8. These offer a practical balance for offline encoding on modern multi-core processors.
- For Live Streaming or Fast Drafts: Use presets 9 to 13. These utilize multi-threading heavily to process video in real-time or faster, though the output files will be larger.