How to Pass Tune Settings to Libaom

This article provides a concise guide on how to pass specific encoding tune settings, such as tune=ssim or tune=psychovisual, to the libaom AV1 encoder. We will look at how to achieve this using popular command-line tools like FFmpeg, as well as the native aomenc encoder application.

— Wait, the user said “Don’t create any horizontal rules in the article.” Let me remove that.

Let’s restart the draft without horizontal rules.

How to Pass Tune Settings to Libaom?

This article provides a concise guide on how to pass specific encoding tune settings, such as tune=ssim, to the libaom AV1 encoder. We will look at how to achieve this using popular video processing frameworks like FFmpeg as well as the native aomenc command-line tool, ensuring your AV1 encodes are optimized for your specific quality metrics.

Using FFmpeg with Libaom

When using FFmpeg, the libaom-av1 wrapper maps specific encoder options using the -tune flag or through generic private options. To optimize your encode for Structural Similarity (SSIM), you can pass the setting directly.

The Direct Tune Flag

The most straightforward way to apply this in FFmpeg is by using the -tune option followed by ssim:

ffmpeg -i input.mp4 -c:v libaom-av1 -crf 28 -tune ssim output.mkv

Using AOM-Params

Alternatively, if you need to pass multiple advanced developer parameters to libaom that don’t have direct FFmpeg flag mappings, you can use the -aom-params argument:

ffmpeg -i input.mp4 -c:v libaom-av1 -crf 28 -aom-params tune=ssim output.mkv

Using the Native Aomenc Tool

If you are compiling or encoding directly with the standalone aomenc application provided by the AOMedia Alliance, the syntax uses a standard double-dash command-line argument.

The argument structure for tuning is defined as --tune=val, where val is your desired metric:

aomenc --codec=av1 --tune=ssim -o output.webm input.y4m

Available Tune Options in Libaom

While ssim is highly popular for automated metric testing, libaom supports other tuning values depending on your target delivery: