FFmpeg Command for rav1e AV1 Encoder

This guide provides the exact FFmpeg command required to encode video using the rav1e AV1 encoder. You will learn the basic command syntax, essential configuration parameters like quality and speed, and how to verify that your FFmpeg installation supports the rav1e library.

Verify rav1e Support in FFmpeg

Before running the command, ensure your FFmpeg build is compiled with rav1e support. Run the following command in your terminal:

ffmpeg -encoders | grep rav1e

If supported, you will see librav1e listed in the output.

The Basic FFmpeg rav1e Command

To encode a video to AV1 using the rav1e encoder, use the following basic command structure:

ffmpeg -i input.mp4 -c:v librav1e -qp 80 -speed 5 -c:a copy output.mkv

Parameter Breakdown

Alternative: Encoding with a Target Bitrate

If you prefer to target a specific file size or bandwidth limit instead of using a constant quality (-qp), you can set a target video bitrate using -b:v:

ffmpeg -i input.mp4 -c:v librav1e -b:v 2M -speed 5 -c:a copy output.mkv

In this command, -b:v 2M sets the video target bitrate to 2 Megabits per second (Mbps).