# AV1 with SVT-AV1

Canonical URL: https://encode.wiki/guides/av1-with-svt-av1/
Content version: ca42e61ede0a24f789d7287a0001244ad22f4abf
Status: current
License: CC BY-SA 4.0
Checksum (SHA-256): 61287f65c69dd733d86cb20b01461be9f10ada5f685d6d851f0801fe0b1b3552

SVT-AV1 is the AV1 encoder hosted by AOMedia. It is fast, scales well across CPU cores, and gives
excellent compression at its slower presets. The current release is v4.2.0. The easiest way to use
it is through FFmpeg's `libsvtav1` encoder.

```sh
ffmpeg -i input.mkv -c:v libsvtav1 -preset 4 -crf 30 -pix_fmt yuv420p10le \
  -svtav1-params tune=0:enable-variance-boost=1:keyint=10s -c:a copy output.mkv
```

That is a sound starting point for a high-quality 1080p encode. The audio is copied unchanged; the
[audio and subtitles guide](/guides/audio-and-subtitles/) covers re-encoding it. Settings that are not FFmpeg options
go in `-svtav1-params` as colon-separated `key=value` pairs, using the same names as the standalone
encoder without the leading dashes. The sections below explain each choice and the options worth
adding.

## Preset

Presets run from 0 (slowest, most efficient) to 13 (fastest); negative values are for debugging.
The default is 8.

| Presets | Typical use                                                                                       |
| ------- | ------------------------------------------------------------------------------------------------- |
| 2–3     | Maximum efficiency when encode time does not matter much. Much slower than 4.                     |
| 4–6     | The usual range for quality encodes at home: a good balance of efficiency and time.               |
| 7–9     | Faster encodes with a noticeable efficiency loss.                                                 |
| 10–13   | Real-time and automation use. The encoder warns that visual artifacts may occur at these presets. |

Outside real-time mode (`rtc=1`), presets 12 and 13 run as 11.

Use the lowest preset you can afford. In CRF mode SVT-AV1's multithreading does not change the
output, so CPU count affects speed but not quality.

## CRF

CRF ranges from 1 to 70; the default is 35. Lower is better quality and larger. Upstream suggests
starting around 30 for 1080p and uses 25 in its high-efficiency VOD example. 2D animation usually
holds up well at higher values than live action. FFmpeg's own `-crf` option takes integers up to
63 (`-crf 27.5` becomes 28); set `-svtav1-params crf=…` for quarter steps or higher values.

SVT-AV1 CRF values are not comparable with x264 or x265 values. The wider range means a given
quality sits at a higher number than in those encoders.

## Tune

The default is `tune=1`, which optimizes for PSNR. `tune=0` (visual quality) is designed to look
better to people, usually with more retained sharpness, at the cost of PSNR scores. Use `tune=0`
for anything meant to be watched. The other tunes (SSIM, MS-SSIM, VMAF, and IQ for still images)
target metrics or images, not video viewing.

## 10-bit output

Use `-pix_fmt yuv420p10le` even for 8-bit sources. Encoding at 10 bits uses less rounding inside the
encoder and reduces banding in gradients and dark areas, for little extra size and little extra
encoding time. AV1's Main profile includes 10-bit 4:2:0, so every AV1 decoder, hardware included,
can play it. Without `-pix_fmt`, SVT-AV1 keeps the source bit depth.

## Film grain

Grain and sensor noise are random, so they take a lot of bits to encode faithfully. AV1 can
describe grain with a small set of parameters and let the decoder add synthetic grain on top of a
cleaner picture. `film-grain=N` turns this on; N is the strength (0–50).

| Source                             | Starting film-grain |
| ---------------------------------- | ------------------- |
| Live action with normal grain      | 8                   |
| Heavy grain or noise               | 10–15               |
| Hand-drawn 2D animation            | 4–6                 |
| Clean or CGI sources with no grain | Leave it off        |

`film-grain-denoise` controls what happens to the source grain:

- **`film-grain-denoise=0`** (the default since v2.0.0) keeps the source as it is and adds synthetic
  grain on top. This preserves the most detail, but the encoder still spends bits on the real grain,
  and too high a level stacks extra noise on the picture.
- **`film-grain-denoise=1`** denoises the source before encoding and lets the synthetic grain replace
  it. This saves the most bits, but the denoiser can also remove fine detail such as small
  particles or skin texture.

```sh
ffmpeg -i input.mkv -c:v libsvtav1 -preset 4 -crf 30 -pix_fmt yuv420p10le \
  -svtav1-params tune=0:enable-variance-boost=1:keyint=10s:film-grain=8 -c:a copy output.mkv
```

Check the result at normal speed, since grain is a moving texture. Grain synthesis is meant for
presets 6 and below; the encoder warns about the compute cost above that. Synthetic grain lowers
full-reference metric scores even when it looks right, because it does not match the source grain
pixel for pixel.

## Keyframe interval

By default SVT-AV1 inserts a keyframe about every 5 seconds (160 frames at 24 fps). Keyframes are
large, so a longer interval improves efficiency at the cost of slower seeking. For local playback,
5–10 seconds is common, which is why the starting command sets `keyint=10s`. FFmpeg's `-g` sets the
same thing in frames (`-g 240` at 24 fps) but has no seconds form. Video-on-demand streaming
typically uses keyframes about once per second.

SVT-AV1 never places keyframes at scene changes; `scd=1` is ignored with a warning. For
scene-aligned keyframes, encode in scene chunks with [Av1an](/tools/utilities/av1an/).

## Other useful options

| Option                    | Default | What it does                                                                                                          |
| ------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
| `enable-variance-boost=1` | 0       | Gives more bits to low-contrast areas (skin, clouds, dark and foggy scenes) that otherwise blur or band.              |
| `variance-boost-strength` | 2       | 1–4. Upstream recommends 2 for most content, 1 for flat animation and 3 for films mixing very dark and bright scenes. |
| `ac-bias`                 | 0.0     | Energy-preserving psychovisual bias, similar to x264/x265 psy-rd. Upstream suggests 1.0–1.5 for texture retention.    |
| `fast-decode=1` or `2`    | 0       | Tunes the encode so it decodes faster on weak devices; 2 is the stronger level.                                       |

## Using SvtAv1EncApp directly

The standalone encoder accepts every option, including some not exposed through FFmpeg. Feed it
Y4M from FFmpeg:

```sh
ffmpeg -i input.mkv -pix_fmt yuv420p10le -strict -1 -f yuv4mpegpipe - | \
  SvtAv1EncApp -i - --preset 4 --crf 30 --tune 0 --enable-variance-boost 1 --keyint 10s -b video.ivf
```

FFmpeg needs `-strict -1` to write 10-bit Y4M. The output is a bare IVF video stream. Mux it with the
audio, subtitles and chapters from the source:

```sh
mkvmerge -o output.mkv video.ivf --no-video input.mkv
```

Y4M does not carry color metadata. For HDR sources, pass it on the command line, for example
`--color-primaries bt2020 --transfer-characteristics smpte2084 --matrix-coefficients bt2020-ncl`
plus `--mastering-display` and `--content-light` with the source's values. FFmpeg's `libsvtav1`
passes the color tags and static HDR metadata through automatically. See
[preserve color and HDR](/guides/preserve-color-and-hdr/), and the
[SVT-AV1-HDR fork](/tools/software-encoders/svt-av1-hdr/) for HDR10+ and Dolby Vision work.

## Chunked encoding with Av1an

Even with good threading, one SVT-AV1 process does not keep a large CPU fully busy at slow presets.
[Av1an](/tools/utilities/av1an/) splits the video at scene changes, encodes the chunks in parallel,
and can pick a CRF per scene to hit a quality target. It is the usual tool for long, high-quality
AV1 encodes.

The [SVT-AV1 encoder page](/tools/software-encoders/svt-av1/) covers the full option set.
