Configure libsvtav1 for Low-Latency Live Streaming

This article provides a concise guide on configuring the SVT-AV1 (libsvtav1) encoder for ultra-low-latency live broadcasting. It covers the essential parameter adjustments, FFmpeg command-line configurations, and optimization strategies required to achieve real-time AV1 encoding without sacrificing significant visual quality.

Core Parameters for Low-Latency SVT-AV1

To achieve low-latency performance suitable for live interactive streaming, you must configure the encoder to minimize frame buffering, speed up execution times, and maintain a constant, predictable bitrate.

1. Disable Lookahead

By default, encoders analyze future frames to optimize quality, which introduces significant latency. For live broadcasting, lookahead must be disabled. * Parameter: lookahead=0

2. Select a Fast Preset

SVT-AV1 presets range from 0 (highest quality, slowest) to 13 (fastest). For real-time 1080p60 encoding, you should use presets between 10 and 13 depending on your CPU capabilities. * Parameter: -preset 10 (or higher)

3. Reduce Hierarchical Levels

SVT-AV1 uses a hierarchical GOP (Group of Pictures) structure. Lowering the hierarchical prediction levels reduces the frame reordering delay. Set this to 3 or lower for low latency. * Parameter: hierarchical-levels=3 (or 2 for ultra-low latency)

4. Enable Constant Bitrate (CBR)

Live streaming networks require a predictable stream of data. Constant Bitrate ensures the encoder does not produce massive bitrate spikes that cause buffering. * Parameter: rc=2 (CBR mode in SVT-AV1)

5. Disable Scene Change Detection

Disabling scene change detection prevents the encoder from inserting unexpected keyframes, which keeps the latency and GOP structure predictable. * Parameter: scd=0


Example FFmpeg Command

Below is a practical FFmpeg command optimized for a low-latency 1080p60 live stream using the RTMP or SRT protocol:

ffmpeg -f dshow -i video="Camera" -c:v libsvtav1 \
  -preset 11 \
  -g 60 \
  -keyint_min 60 \
  -sc_threshold 0 \
  -svtav1-params tune=0:rc=2:lookahead=0:hierarchical-levels=3 \
  -b:v 4000k \
  -bufsize 4000k \
  -pix_fmt yuv420p \
  -c:a aac -b:a 128k \
  -f mpegts srt://your-ingest-server:port

Parameter Breakdown