How to Normalize Audio Loudness with LUFS: A Two-Pass Guide
- Authors

- Name
- Geeks Kai
- @KaiGeeks
The fastest repeatable workflow is to measure the entire file, choose the loudness target required by its destination, and run a second normalization pass using the measured integrated loudness, true peak, loudness range, and threshold. This is more predictable for finished files than adjusting only their highest peak.
If you already own or have permission to process the file, the Geekskai Audio Toolkit performs this two-pass workflow locally in your browser. A signed-in account receives 30 Free Credits per UTC day and processes one file at a time.
Peak normalization answers a narrow question: how close does the highest sample or true peak come to the ceiling? It can make two files share a similar maximum peak while they still sound noticeably different in average loudness.
LUFS-based normalization instead estimates perceived programme loudness over time. The European Broadcasting Union describes EBU R 128 as a move from using peak meters alone to measuring and normalizing loudness with loudness meters. The EBU also publishes separate guidance for broadcast, streaming, radio, short-form, and cinematic material, which is why one target should not be treated as universal. See the EBU loudness specification overview.
FFmpeg's official loudnorm filter supports both single-pass and double-pass operation. It can target integrated loudness, loudness range, and maximum true peak. See the loudnorm filter documentation.
A two-pass file workflow works like this:
This workflow is appropriate for completed files because the first pass can inspect the whole programme. A live stream cannot be measured from beginning to end before playback, so live workflows have different constraints.
For a command-line workflow, install FFmpeg from its official download page and use Python 3 to carry the first-pass values into the second pass. Save the following as normalize.py. The example target is -16 LUFS with a -1 dBTP ceiling, not a universal delivery specification; change the target string only after checking your destination.
import json
import math
from pathlib import Path
import re
import subprocess
import sys
if len(sys.argv) != 3:
raise SystemExit("Usage: python3 normalize.py input.wav output.wav")
source_path, output_path = sys.argv[1:]
if Path(source_path).resolve() == Path(output_path).resolve():
raise ValueError("Keep the source and output paths separate.")
if Path(output_path).exists():
raise FileExistsError("Refusing to overwrite an existing output file.")
if Path(output_path).suffix.lower() != ".wav":
raise ValueError("This example writes PCM WAV; use a .wav output path.")
target_filter = "loudnorm=I=-16:TP=-1:LRA=11"
analysis = subprocess.run(
["ffmpeg", "-hide_banner", "-i", source_path, "-map", "0:a:0",
"-af", target_filter + ":print_format=json", "-f", "null", "-"],
check=True, capture_output=True, text=True,
)
measurement_match = re.search(r'\{\s*"input_i"[\s\S]*?\}', analysis.stderr)
if measurement_match is None:
raise ValueError("No loudnorm measurement was returned; inspect the FFmpeg log.")
measurements = json.loads(measurement_match.group())
measurement_fields = {
"measured_I": "input_i", "measured_LRA": "input_lra",
"measured_TP": "input_tp", "measured_thresh": "input_thresh",
"offset": "target_offset",
}
if not all(math.isfinite(float(measurements[key])) for key in measurement_fields.values()):
raise ValueError("Non-finite loudness measurements; check for silence or invalid audio.")
measured_options = [f"{option}={measurements[key]}" for option, key in measurement_fields.items()]
second_filter = ":".join([target_filter, *measured_options, "linear=true", "print_format=json"])
export = subprocess.run(
["ffmpeg", "-hide_banner", "-i", source_path, "-map", "0:a:0",
"-af", second_filter, "-ar", "48000", "-c:a", "pcm_s24le", "-n", output_path],
check=True, capture_output=True, text=True,
)
print(export.stderr)
Run python3 normalize.py input.wav normalized.wav with your own authorized source. The script refuses to overwrite an existing output. It selects the first audio stream and writes 24-bit PCM WAV at 48 kHz; those are explicit choices for this example, not claims about the browser toolkit’s sample rate. A non-zero FFmpeg exit raises an error; inspect that error instead of treating a partial file as success.
The second-pass log includes normalization_type. Two passes do not guarantee linear processing. FFmpeg can fall back to dynamic mode when the source loudness range exceeds the requested range or the gain would breach the true-peak ceiling. Its filter documentation explains the conditions; the implementation shows the measurement fields. Explicit output sample rate avoids accidentally retaining dynamic mode’s 192 kHz processing rate.
ffmpeg -hide_banner -i normalized.wav -map 0:a:0 -af loudnorm=I=-16:TP=-1:LRA=11:print_format=json -f null -
Read input_i and input_tp from this check: its input is now your exported file. Check them against your destination’s loudness tolerance and peak ceiling. The check’s output_* fields describe another hypothetical normalization pass and are not the measurement of the file you just delivered. Also verify duration, channels and audible quality; matching a number does not repair clipping.

Audio Toolkit interface captured on November 12, 2026, before sign-in. The displayed presets are starting points; use your destination’s delivery specification.
The current Audio Toolkit accepts MP3, WAV, FLAC, and M4A input files up to 200 MB each. Processing uses FFmpeg in the browser; audio and filenames are not uploaded to Geekskai for processing.
The toolkit’s normalization pipeline requests an analysis pass, then applies the measured values with a -1 dBTP ceiling and linear=true. FFmpeg may still fall back to dynamic mode. The browser workflow does not provide the same command-line log and sample-rate controls as the example above; independently measure an exported file when delivery specifications matter. One Credit covers one minute of combined input audio, rounded up once per batch. Pay As You Go and Regular monthly Credits are available through secure PayPal checkout for batches of up to 50 local files and ZIP export. Paid Credits apply only to Audio Toolkit processing; public third-party downloader allowances remain separate free-product rules.
Start with the delivery specification, not a number copied from an unrelated platform guide.
Normalization is not a repair tool. It will not remove clipping already recorded into a file, eliminate background noise, correct a poor mix, or restore detail lost to aggressive compression.
Choose WAV when the file will be edited again, archived, mastered, or delivered in an uncompressed format. Choose MP3 when a smaller listening or review copy is appropriate and the recipient accepts lossy audio.
The toolkit currently offers:
| Output | Options | Good fit |
|---|---|---|
| WAV | 16-bit or 24-bit PCM | Editing, mastering handoff, archive, lossless delivery |
| MP3 | 320 kbps | Review copies and destinations that accept MP3 |
Converting a lossy MP3 to WAV does not restore information discarded during the original MP3 encoding. It only changes the output container and encoding.
Browser processing uses the local device. Long files and lossless formats can require more memory and time. Close memory-heavy tabs, keep the browser tab active, and test with a shorter file if the device is constrained.
Confirm that its extension is MP3, WAV, FLAC, or M4A and that the file is no larger than 200 MB. Renaming an unsupported file does not convert its actual media format.
Loudness normalization cannot undo clipping or distortion already present in the source. Return to the mix or an earlier master, lower problematic levels, and export a clean source before normalizing again.
Check that you entered the intended target and compare it with the destination's current specification. Perceived loudness also depends on dynamics, frequency balance, and listening conditions; matching a LUFS number does not make different mixes sound identical.
For a private, installation-free workflow, try one file in the Geekskai Audio Toolkit. For plan limits and current checkout availability, see Audio Toolkit pricing.