How to Use FFmpeg ebur128 for Loudness Telemetry

This article provides a practical guide on how to use the ebur128 filter in FFmpeg to analyze audio loudness and output telemetry data. You will learn the basic commands for scanning audio files, how to interpret the console output metrics (such as momentary, short-term, and integrated loudness), and how to generate real-time visual telemetry graphs.

The Basic Loudness Analysis Command

To analyze the loudness of an audio or video file without rendering a new media file, use the ebur128 audio filter and direct the output to the null muxer (-f null). This tells FFmpeg to process the file and print the telemetry results to the console.

Run the following command in your terminal:

ffmpeg -i input.mp4 -af ebur128=peak=true -f null -

Parameter Breakdown:


Understanding the Console Telemetry Output

While the command runs, FFmpeg outputs real-time telemetry frames in the console. At the very end of the process, it prints a summary of the entire file.

Real-Time Frame Telemetry

During playback or processing, you will see repeating blocks of telemetry data that look like this:

t: 2.40003    M: -21.2 S: -20.5     I: -18.2 LRA:   3.2

Final Summary Telemetry

Once the analysis completes, FFmpeg outputs the final statistics for the entire asset:

Summary:

  Integrated loudness:
    I:         -23.0 LUFS
    Threshold: -33.0 LUFS

  Loudness range:
    LRA:         5.4 LU
    Threshold: -43.0 LUFS
    LRA low:   -26.1 LUFS
    LRA high:  -20.7 LUFS

  True peak:
    Peak:       -1.2 dBTP

Generating Visual Loudness Telemetry

The ebur128 filter can also generate a real-time visual graph of the loudness telemetry. Because this outputs both audio and video, you must use filter_complex to route the streams.

To render a video file showing the loudness graph alongside the original audio, use this command:

ffmpeg -i input.mp4 -filter_complex "[0:a]ebur128=video=1:meter=18[outy][outa]" -map "[outy]" -map "[outa]" -c:v libx264 -c:a aac output.mp4

Parameter Breakdown:


Saving Telemetry Logs to a File

If you need to store the text-based telemetry data for automated analysis or compliance logging, redirect the standard error output (stderr) of FFmpeg to a text file:

ffmpeg -i input.mp4 -af ebur128=peak=true -f null - 2> loudness_log.txt

This creates loudness_log.txt in your current directory, containing the complete, frame-by-frame loudness telemetry log for future parsing.