How to Use rav1e Low Latency Mode in FFmpeg

This article provides a straightforward guide on how to configure the low-latency mode in the rav1e AV1 encoder using FFmpeg. You will learn the exact command-line parameters, speed settings, and configuration steps required to optimize your AV1 encodes for real-time streaming and interactive video applications.

The Low-Latency Command

To enable low-latency encoding in FFmpeg using the librav1e wrapper, you must pass the low_latency=true parameter via the -rav1e-params option.

Here is the standard command-line template:

ffmpeg -i input.mp4 -c:v librav1e -rav1e-params low_latency=true -speed 8 -c:a copy output.mp4

Key Parameter Breakdown

Additional Optimizations for Live Streaming

If you are using low-latency mode for live streaming (e.g., via RTMP or WebRTC), you should pair the low-latency flag with real-time rate control. You can achieve this by setting a constant bitrate (CBR):

ffmpeg -i input.mp4 -c:v librav1e -b:v 2M -rav1e-params low_latency=true:strict_rc=true -speed 9 output.mp4