How to Enable row-mt in FFmpeg libaom-av1

This article explains how to configure the row-based multithreading (row-mt) parameter for the libaom AV1 encoder in FFmpeg. You will learn the exact command-line syntax required to enable this feature, understand how it interacts with your CPU cores, and see a practical command-line example to significantly speed up your AV1 video encoding.

Enabling row-mt in FFmpeg

The row-mt (row-based multithreading) parameter is a critical setting for the libaom-av1 encoder. Enabling it allows the encoder to process rows of video blocks in parallel, which drastically improves encoding speeds on multi-core processors.

To configure row-mt in FFmpeg, use the -row-mt private encoder option followed by 1 to enable it, or 0 to disable it.

Syntax

-row-mt 1

Complete Command Example

For row-mt to work effectively, you should also specify the number of threads FFmpeg is allowed to use by adding the -threads parameter. Below is a practical command showing how to use these parameters together:

ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -b:v 0 -row-mt 1 -threads 8 output.mkv

Parameter Breakdown

  • -c:v libaom-av1: Specifies the alliance for open media (AOM) AV1 encoder.
  • -crf 30: Sets the Constant Rate Factor for quality (lower is better quality, higher is more compression).
  • -b:v 0: Required when using CRF mode with libaom-av1 to enable constant quality mode.
  • -row-mt 1: Enables row-based multithreading.
  • -threads 8: Allocates 8 CPU threads to the encoding process. You should adjust this number based on your CPU's available physical and logical cores.