What is AV1?
AV1 (AOMedia Video 1) is an open, royalty-free video codec developed by the Alliance for Open Media.
| Codec | Relative File Size | Encoding Speed | Browser Support |
|---|---|---|---|
| H.264 (libx264) | 100% (baseline) | Fast | Nearly universal |
| H.265 (libx265) | ~65–82% | Medium | Safari; Chrome, Edge and Firefox depending on OS and hardware |
| AV1 (libsvtav1) | ~27–63% | Medium | Chrome, Firefox, Edge |
| AV1 (libaom-av1) | ~26–46% | Slow | Chrome, Firefox, Edge |
Sizes are at the same VMAF score as libx264, measured with FFmpeg 8.1 on two 10-second 1080p clips (Big Buck Bunny and Tears of Steel, © Blender Foundation, CC BY 3.0); libx264 and libx265 used -preset medium, libsvtav1 -preset 6, libaom-av1 -cpu-used 4. Each setting was run at 5–6 CRF values and compared at equal VMAF. The measurements are published on the data page.
At the same quality, the libsvtav1 files were 27–32% of the H.264 size for the animated clip and 40–63% for the live-action clip. On the live-action clip the gap narrows as quality rises (40% at VMAF 84, 63% at 97). Large services such as YouTube and Netflix stream in AV1.
Check Available Encoders
ffmpeg -encoders 2>/dev/null | grep av1
The list depends on your build. FFmpeg 8.1 from gyan.dev (Windows) prints:
V....D libaom-av1 libaom AV1 (codec av1)
V....D librav1e librav1e AV1 (codec av1)
V..... libsvtav1 SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1)
V....D av1_d3d12va D3D12VA av1 encoder (codec av1)
V....D av1_nvenc NVIDIA NVENC av1 encoder (codec av1)
V..... av1_qsv AV1 (Intel Quick Sync Video acceleration) (codec av1)
V....D av1_amf AMD AMF AV1 encoder (codec av1)
V....D av1_mf AV1 via MediaFoundation (codec av1)
V....D av1_vaapi AV1 (VAAPI) (codec av1)
V....D av1_vulkan AV1 (Vulkan) (codec av1)
A....D wmav1 Windows Media Audio 1
grep av1 also matches wmav1, an audio encoder. Hardware encoders such as av1_nvenc are listed even when your PC has no matching GPU.
If libsvtav1 is not in the list, install the latest FFmpeg from your package manager or the official FFmpeg website.
libsvtav1 — Fast AV1 Encoding (Recommended)
Basic Command (CRF mode)
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 35 -preset 6 -c:a libopus -b:a 128k output.webm
| Parameter | Description |
|---|---|
-c:v libsvtav1 |
Use the SVT-AV1 encoder |
-crf 35 |
Constant quality (lower = better quality, range 1–63; 0 falls back to the default, 35) |
-preset 6 |
Speed preset (0 = slow/high quality, 13 = fast/lower quality) |
-c:a libopus |
Opus audio, the natural pair for AV1 in WebM |
CRF Values (libsvtav1)
Lower values give better quality and larger files. VMAF scores on the two test clips above (animated / live action, -preset 6); libx264 (-preset medium) at CRF 24 scored 92.50 / 94.06 on the same clips (libx264’s default is CRF 23):
| CRF | VMAF | Use Case |
|---|---|---|
| 24 | 96.34 / 96.73 | High quality, keeping a master copy |
| 32 | 95.10 / 94.92 | Everyday use, slightly above libx264 at CRF 24 |
| 40 | 93.75 / 92.50 | Web delivery, previews |
| 48 | 92.05 / 89.22 | When size matters more |
| 56 | 88.63 / 84.16 | Strict size limits |
The same CRF gives different quality on different footage. On these two clips, VMAF fell faster on the live-action clip as the CRF went up.
Preset Selection
# Quality-first (slower)
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 30 -preset 2 -c:a libopus -b:a 128k output.webm
# Balanced
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 30 -preset 6 -c:a libopus -b:a 128k output.webm
# Speed-first
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 30 -preset 10 -c:a libopus -b:a 128k output.webm
Lower preset numbers are slower and give smaller files at the same quality. Measured on the two clips above (speed: the live-action clip joined into 60 seconds of 1080p at 24 fps, CRF 40, median of 3 runs; Core i9-14900KF, FFmpeg 8.1, SVT-AV1 4.0.1):
| Preset | Speed (fps) | Size vs preset 8 at the same quality (live action / animation) |
|---|---|---|
| 2 | 10 | 28–45% smaller / 49–65% smaller |
| 4 | 37 | 25–33% smaller / 40–50% smaller |
| 6 | 74 | 18–27% smaller / 34–46% smaller |
| 8 (default) | 165 | — |
| 10 | 322 | 32–52% larger / 56–83% larger |
| 12 | 345 | 58–74% larger / 60–95% larger |
Presets 10 and 12 are about twice as fast as libx264 (-preset medium, 156 fps), but at higher quality their files were about as large as libx264’s or larger (from about VMAF 92 on live action and 93 on animation). Use preset 8 when speed matters and 4–6 when you can spend the time.
Output to MP4 Container
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 35 -preset 6 -c:a aac -b:a 128k output_av1.mp4
AV1 can go in MP4 or WebM. Whether it plays depends on the browser or OS supporting both the codec (AV1) and the container (MP4 or WebM), so check on the devices you target (MDN).
libaom-av1 — The Reference Encoder
libaom-av1 is the reference AV1 encoder from the Alliance for Open Media. It is much slower than libsvtav1.
Basic Command (CRF mode)
ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -b:v 0 -c:a libopus -b:a 128k output.webm
With libaom-av1, -crf on its own already selects constant-quality mode, so -b:v 0 is not required (it does no harm).
Multithreading
ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -b:v 0 -row-mt 1 -tiles 2x2 \
-c:a libopus -b:a 128k output.webm
2-Pass Encoding (Bitrate Target)
Use 2-pass when you need a set file size or streaming bitrate.
libsvtav1 2-pass
libsvtav1 two-pass works in FFmpeg 8.1. FFmpeg 6.1’s libsvtav1 wrapper has no two-pass handling.
# Pass 1
ffmpeg -i input.mp4 -c:v libsvtav1 -b:v 2M -preset 6 -pass 1 -an -f null /dev/null
# Pass 2
ffmpeg -i input.mp4 -c:v libsvtav1 -b:v 2M -preset 6 -pass 2 -c:a libopus -b:a 128k output.webm
libaom-av1 2-pass
# Pass 1
ffmpeg -i input.mp4 -c:v libaom-av1 -b:v 2M -pass 1 -an -f null /dev/null
# Pass 2
ffmpeg -i input.mp4 -c:v libaom-av1 -b:v 2M -pass 2 -c:a libopus -b:a 128k output.webm
Platform-Specific Settings
YouTube (AV1)
ffmpeg -i input.mp4 \
-c:v libsvtav1 -crf 32 -preset 6 \
-vf "scale=iw*sar:ih,setsar=1,scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2" \
-pix_fmt yuv420p \
-c:a libopus -b:a 256k \
output_youtube_av1.webm
Web Delivery (Lightweight)
ffmpeg -i input.mp4 \
-c:v libsvtav1 -crf 40 -preset 8 \
-vf "scale=1280:720" \
-c:a libopus -b:a 96k \
output_web.webm
Browser Compatibility
| Browser | AV1 Support |
|---|---|
| Chrome 70+ (desktop) | ✅ |
| Firefox 67+ | ✅ |
| Edge 121+ | ✅ |
| Safari 17+ (macOS) | Partial (Macs with an AV1 hardware decoder, such as M3 and later) |
| iOS Safari 17+ | Partial (devices with an AV1 hardware decoder, such as iPhone 15 Pro and later) |
If the video must play on iPhones and iPads, also provide an H.264 version.
Troubleshooting
libsvtav1 not found
Unknown encoder 'libsvtav1'
Install a build with libsvtav1 enabled. Check with ffmpeg -hide_banner -encoders: the list should include libsvtav1. Linux distribution packages can be old and built without it (Ubuntu 22.04’s own package is FFmpeg 4.4, for example); in that case use a newer release’s package or a build that includes libsvtav1:
# macOS (Apple Silicon; Homebrew's official installer stops on Intel Macs)
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg
# Windows: gyan.dev's full build (the essentials build has no libsvtav1)
winget install --id=Gyan.FFmpeg -e
Encoding is extremely slow
Switch from libaom-av1 to libsvtav1. In the measurements above, libaom-av1 (-cpu-used 4) ran at 2 fps, about 1/30 the speed of libsvtav1 at preset 6 (74 fps). At the same quality its files were 1–7% smaller than SVT-AV1 preset 2 on the live-action clip and 32–45% larger on the animated clip:
# Slow
ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -b:v 0 output.webm
# Fast
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 35 -preset 6 output.webm
No audio / container error
WebM takes only Vorbis or Opus audio, not AAC:
# Wrong: AAC in WebM
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 35 -c:a aac output.webm
# Correct: Opus in WebM
ffmpeg -i input.mp4 -c:v libsvtav1 -crf 35 -c:a libopus -b:a 128k output.webm
Frequently Asked Questions
libaom-av1 vs SVT-AV1 vs rav1e — which should I pick?
SVT-AV1 (libsvtav1) is good enough for most jobs. libaom-av1 is the reference encoder. rav1e (librav1e) is written in Rust. Speed depends heavily on the settings (preset, cpu-used and so on); see “Preset Selection” above for what we measured.
What CRF gives YouTube-quality 1080p?
Start with SVT-AV1 at CRF 32–35 and preset 8. The same CRF gives different quality on different footage, so encode a short section first, check it, then encode the whole video.
Why is my AV1 file enormous?
The default preset, 8, leans toward speed. At the same quality, preset 6 gave files 18–27% smaller than preset 8 on the live-action clip and 34–46% smaller on the animated clip. In a separate run (60 seconds of the live-action clip at CRF 40) it took about 2.2× as long (see the table under “Preset Selection”). If you use preset 10 or higher, switching to 8 and adjusting the CRF to the same quality makes the file smaller; at the same CRF it can come out larger.
Will AV1 play on Safari and old iPhones?
Safari 17+ plays AV1 only on devices with an AV1 hardware decoder: M3 Macs and later, the iPhone 15 Pro, and the iPhone 16 and later (MDN). On older Apple devices Safari cannot play AV1 at all, so keep an H.264 version for them.
Can I two-pass with AV1?
Yes. In FFmpeg 8.1, both libaom and SVT-AV1 support two-pass with -pass 1/2 (see the two-pass section above; FFmpeg 6.1’s libsvtav1 does not). Use CRF when you decide by quality, and two-pass when you need a set file size or average bitrate.
Related Articles
Primary source: ffmpeg.org/ffmpeg-codecs.html#libsvtav1