FFmpeg Loudnorm Dual-Pass Options Guide

This article provides a practical overview of the options and parameters used for dual-pass loudness normalization with the loudnorm filter in FFmpeg. It explains how to execute the two-pass process, details the specific measurement options required for the second pass, and provides the command-line syntax needed to achieve precise EBU R128 compliance.

Understanding Dual-Pass Loudnorm

The loudnorm filter in FFmpeg uses the EBU R128 algorithm to normalize audio. While single-pass mode estimates adjustments dynamically, dual-pass mode offers superior quality.


Pass 1: Analysis Options

In the first pass, you run the filter to analyze the audio without writing a new audio file. The critical option here is print_format=json, which outputs the audio measurements to the terminal.

Example Command

ffmpeg -i input.mp4 -af loudnorm=print_format=json -f null -

Generated Output Parameters

The first pass will output a JSON object containing several “input” measurements. You must save these values to use in the second pass:


Pass 2: Normalization Options

In the second pass, you feed the measured values from Pass 1 back into the filter. You must set linear=true to enable dual-pass mode.

Target Parameters (User Defined)

These define your desired output audio standards:

Measured Parameters (From Pass 1 Output)

These parameters represent the actual state of the source audio:


Example of a Second-Pass Command

Once you have gathered the JSON output from Pass 1, plug the values into the second-pass command as shown below:

ffmpeg -i input.mp4 -af loudnorm=I=-24:TP=-2:LRA=7:measured_i=-15.3:measured_tp=1.2:measured_lra=10.5:measured_thresh=-25.8:offset=0.5:linear=true output.mp4