How to Set rav1e Tile Columns and Rows in FFmpeg

This guide explains how to configure tile columns and tile rows when encoding AV1 video using the rav1e encoder within FFmpeg. By dividing a video frame into a grid of independent tiles, you can significantly improve encoding and decoding speeds through multi-threaded parallel processing.

Understanding rav1e Tiles

In the AV1 codec, tiles allow a single video frame to be split into a grid. Each tile can be encoded and decoded independently. While increasing the number of tiles improves multi-threading performance, it can slightly reduce compression efficiency.

In rav1e, tile configurations are defined using \(\log_2\) (logarithm base 2) values. This means the number of actual tile columns or rows will be \(2^N\), where \(N\) is the value you specify:

The FFmpeg Command Syntax

To pass tile settings to the librav1e encoder in FFmpeg, you must use the -rav1e-params private option. Multiple parameters inside -rav1e-params are separated by colons (:).

The syntax for configuring tiles is: -rav1e-params tile-cols=N:tile-rows=M

Example Command

The following command encodes an input video to AV1 using librav1e with 4 tile columns (\(2^2\)) and 2 tile rows (\(2^1\)), resulting in an overall \(4 \times 2\) grid (8 tiles total):

ffmpeg -i input.mp4 -c:v librav1e -rav1e-params tile-cols=2:tile-rows=1 -c:a copy output.mkv

The ideal number of tiles depends on your CPU’s thread count and the resolution of the video: