Generating Loudnorm Conversion Log File with FFmpeg: A Step-by-Step Guide

Abstract: Capture FFmpeg loudnorm metadata for two-pass audio normalization by redirecting verbose error output to a log file.

Created: 2026-08-17 by

Generate a loudnorm conversion log file by appending -loglevel verbose to your FFmpeg command and redirecting the output to a text file using shell redirection operators. This approach captures detailed metadata and normalization statistics, allowing you to analyze audio levels for compliance or quality assurance without altering the final media file.

Understanding Loudnorm Metadata Output

The loudnorm filter in FFmpeg is designed to measure and normalize audio loudness according to specific standards like EBU R128. By default, when you apply this filter, FFmpeg prints summary statistics to the standard error stream. These statistics include integrated loudness (I), loudness range (LRA), threshold (THRESH), and target offset (OFFSET). Accessing this data is crucial for two-pass normalization, where the first pass measures the audio and the second pass applies the calculated corrections. Without capturing these logs, you cannot accurately determine the parameters needed for consistent audio leveling across multiple files. To ensure these metrics are available for analysis, you must instruct FFmpeg to output verbose logging information. The standard output usually contains warnings and errors, while the loudnorm statistics appear in the error stream. Therefore, separating or capturing both streams ensures you do not miss critical diagnostic data. This process is identical whether you are working on a Linux distribution or a Windows environment, though the syntax for file redirection differs slightly between operating systems. For users who frequently convert large batches of media, seeing this data in real-time can clutter the terminal. Redirecting the output to a dedicated log file allows you to review the results later or parse them programmatically. This method is particularly useful when integrating FFmpeg into larger automation scripts, as seen in workflows for converting video for specific devices like iPhones, as discussed in our guide on FFmpeg on Linux - Convert Video to Play on iPhone [Solved].

Step-by-Step Guide for Linux Users

On Linux systems, you can capture the loudnorm log by combining your conversion command with shell redirection operators. The primary goal is to send the standard error stream, which holds the loudnorm statistics, to a text file while keeping the standard output visible or discarding it if unnecessary. Use the following structure for your command:
ffmpeg -i input.mp3 -af loudnorm=I=-16:TP=-1.5:LRA=11 -loglevel verbose 2> loudnorm.log
In this command, -i input.mp3 specifies your source audio file. The -af flag applies the loudnorm filter with specific targets: Integrated loudness at -16 LUFS, True Peak at -1.5 dBTP, and Loudness Range at 11 LU. The -loglevel verbose argument ensures that all internal processes, including the loudnorm measurement, are printed. The crucial part is 2> loudnorm.log, which redirects file descriptor 2 (standard error) to a file named loudnorm.log. After the conversion completes, open loudnorm.log with any text editor. You will see lines starting with [Parsed_loudnorm_0 @ ...] followed by the JSON-like block containing the measured values. If you also want to capture standard output (warnings) into the same file, use >> loudnorm.log 2>&1 instead. This merges both streams into one comprehensive log.

Step-by-Step Guide for Windows Users

Windows PowerShell and Command Prompt handle stream redirection differently than Unix shells. In PowerShell, you can use the Start-Transcript cmdlet or direct redirection. For simple script-based logging, direct redirection is more efficient. Open PowerShell and run the following command:
ffmpeg -i input.mp3 -af loudnorm=I=-16:TP=-1.5:LRA=11 -loglevel verbose 2> loudnorm.log
PowerShell supports the 2> syntax similarly to Bash, directing standard error to the specified file. If you are using an older version of PowerShell or CMD, you might need to use cmd /c "ffmpeg ... 2> loudnorm.log" to ensure proper interpretation of the redirection operator. Alternatively, you can use the tee utility if installed via Git Bash or WSL within Windows. This allows you to view the log in real-time while saving it. However, native PowerShell redirection is generally sufficient for generating static logs for analysis. This technique is equally applicable when dealing with complex audio conversions, such as those required for specific hardware like the aDB RX90/91, as detailed in Convert Audio to RTP with FFmpeg for aDB RX90/91.

Analyzing the Log File Content

Once the log file is generated, you need to extract the relevant data. The loudnorm filter outputs a block that resembles JSON but is embedded in verbose text. Look for the section labeled Parsed_loudnorm_0. Inside this block, you will find four key metrics:
  • Input Integrated: The average loudness of the source material.
  • Input Threshold: The point below which audio is considered silent or negligible.
  • Input LRA: The dynamic range of the audio.
  • Input True Peak: The maximum instantaneous peak level.
These values are used in the second pass of normalization. For example, if the first pass shows an Input Integrated of -20 LUFS, you would set the I=-20 parameter in your second pass command to match the original dynamics more closely, rather than forcing a generic -16 LUFS target. This two-pass method prevents over-compression and preserves the artistic intent of the audio. If you encounter issues where no log is generated, verify that your FFmpeg version is up to date. Older versions may not support the verbose loudnorm output correctly. Additionally, ensure that the path specified in the redirection command has write permissions. On Linux, check directory ownership; on Windows, ensure you are running the terminal with appropriate privileges if writing to system directories. For troubleshooting other common FFmpeg issues, such as missing audio tracks during conversion, refer to our article on Fixing FFmpeg: No Audio when Converting DVD VOB to MP4. This often helps isolate whether the problem lies with the codec selection or the stream mapping rather than the logging mechanism itself.

Frequently Asked Questions

Why is my loudnorm log empty?

An empty log typically indicates that the -loglevel verbose flag was omitted or that the redirection operator failed due to permission issues. Ensure you are targeting file descriptor 2 for standard error, as loudnorm statistics are not sent to standard output by default.

Can I use the log file for automated processing?

Yes, the log contains structured data that can be parsed by scripts using tools like grep or awk. You can extract the integrated loudness value and feed it directly into the next FFmpeg command for two-pass normalization, creating a fully automated workflow.

Does loudnorm work on multi-channel audio?

The loudnorm filter analyzes each channel independently unless you use the print_format=json option combined with specific matrix mixing settings. It is best practice to downmix to stereo before applying loudnorm if you require a single unified loudness measurement for the entire track.

What is the difference between I, LRA, and TP?

I stands for Integrated Loudness, representing the overall perceived volume. LRA is Loudness Range, measuring the dynamic variation between quiet and loud sections. TP is True Peak, indicating the absolute maximum sample value to prevent clipping during digital-to-analog conversion.

How do I fix "Permission denied" errors on Linux?

This error occurs when the user running the FFmpeg command lacks write access to the target directory. Use chmod to adjust folder permissions or specify a writable location like /tmp/loudnorm.log for testing purposes.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More