How to Encode AV1 Video with FFmpeg
Practical guide to encoding AV1 video with FFmpeg, including common settings, output checks, and fixes for speed or compatibility problems.
Before you start
AV1 encoding with FFmpeg runs locally on your computer and does not require an online service. You need an FFmpeg build that includes an AV1 encoder. The most common built-in option is libaom-av1, while libsvtav1 is available in newer builds and is often faster for general use. Check which encoders your installation supports before choosing a command.
Use a source file that FFmpeg can read, such as a camera recording or screen capture. Keep a copy of the original until you have verified the result. AV1 encoding can be slow, so plan for longer processing times compared with H.264 or H.265.
Step-by-step instructions
- Open a terminal in the folder containing your source video. Confirm FFmpeg is available by checking its version output. Make sure the reported version includes the AV1 encoder you intend to use before continuing.
- Choose an AV1 encoder available in your build. If libsvtav1 is present, start with it for a practical balance of speed and compression. If only libaom-av1 is available, use it with a constrained quality setting for a simpler first test.
- Set the recording format for the output file. A container such as WebM or MP4 is a common choice for AV1 video, but support varies by player and editing tool. Keep the container format separate from the encoder selection.
- Control quality with a rate-control mode. You can target an average bitrate for predictable file size, or use a quality-based mode to let the encoder vary bitrate per scene. With libsvtav1, a lower CRF value produces higher quality and larger files; with libaom-av1, use its own quality options rather than assuming identical behavior.
- Preserve audio when needed by selecting an audio codec supported by the target container. If the source contains audio and the player must have sound, map the audio stream explicitly instead of assuming FFmpeg will include it.
- Match the frame rate to the capture source unless you have a specific reason to change it. Avoid forcing a higher frame rate, because this can waste bitrate and may not improve motion smoothness.
- Run the command from the source file to a new output file. Do not overwrite the original directly. If the process is interrupted, delete the incomplete output and start again rather than using a partial file.
Check the output
Play the output in a media player that supports AV1 and visually check motion, color, and audio synchronization. Compare a few scenes with the source, especially areas with fast movement or fine detail.
Inspect the output properties with FFmpeg without re-encoding. Confirm that the video stream reports the intended codec, resolution, frame rate, and bitrate. Verify that the container and audio stream are present when they are expected.
Keep in mind that AV1 is not supported equally in every browser, operating system, or editing application. A file that plays locally may still need conversion for a specific camera, web viewer, or editing workflow.
Common problems and next steps
If encoding is very slow, try a faster preset or reduce the resolution and frame rate for a short test clip. On older builds, libaom-av1 may be available but impractically slow for long recordings. Check whether your FFmpeg build includes libsvtav1 before relying on it for regular use.
If the output will not play, first identify whether the problem is the AV1 video stream or the container. Test the same stream in a different supported player, and test the container with a different codec. This helps separate encoder output from player limitations.
If audio is missing, inspect the source streams and the command mapping. A video-only command will not fail automatically when the source contains audio. Add or correct the audio mapping and create a new output instead of trying to repair an incomplete file.
When the result looks blocky in dark or complex scenes, lower the CRF or increase the target bitrate and test a short section. Do not assume that a higher value means better quality across every AV1 encoder.
For camera workflows, match AV1 settings to the intended sharing or editing path. A high-quality local file may still need a more compatible recording format for uploads or collaboration. Keep the original capture source available until the AV1 version has been checked on the final playback device.