Transcode AV1 with libaom and Custom Tiles in FFmpeg

This guide explains how to transcode video files into the AV1 format using FFmpeg’s libaom-av1 encoder while configuring custom tile columns and rows. By leveraging custom tiling, you can significantly improve encoding speed through multi-threading and optimize the video for parallel decoding.

Understanding AV1 Tiles

AV1 tiles divide a video frame into a grid of independent regions. This separation allows the encoder and decoder to process different parts of the frame simultaneously using multiple CPU threads.

In libaom-av1, tile parameters are defined using \(\log_2\) values. This means the value you input represents the exponent of 2: * -tile-columns: A value of 1 creates \(2^1\) (2) columns. A value of 2 creates \(2^2\) (4) columns. * -tile-rows: A value of 1 creates \(2^1\) (2) rows. A value of 2 creates \(2^2\) (4) rows.

For example, setting -tile-columns 2 and -tile-rows 1 creates a grid of 4 columns and 2 rows, resulting in 8 independent tiles.

The FFmpeg Command

To transcode a video using the libaom-av1 encoder with custom tiles, run the following command in your terminal:

ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -b:v 0 -tile-columns 2 -tile-rows 1 -threads 8 -strict experimental output.mkv

Parameter Breakdown

To maintain coding efficiency, use tile layouts that match your video resolution: