Skip to main content

Normalize audio via ffmpeg

Project description

ffmpeg-normalize

PyPI version Docker Image Version GitHub Actions Workflow Status

All Contributors

A utility for batch-normalizing audio using ffmpeg.

This program normalizes media files to a certain loudness level using the EBU R128 loudness normalization procedure. It can also perform RMS-based normalization (where the mean is lifted or attenuated), or peak normalization to a certain target level.

✨ Features

  • EBU R128 loudness normalization — Two-pass by default, with an option for one-pass dynamic normalization
  • RMS-based normalization — Adjust audio to a specific RMS level
  • Peak normalization — Adjust audio to a specific peak level
  • Selective audio stream normalization — Normalize specific audio streams or only default streams
  • Video file support — Process video files while preserving video streams
  • Docker support — Run via Docker container
  • Python API — Use programmatically in your Python projects
  • Shell completions — Available for bash, zsh, and fish
  • Album Batch normalization – Process files jointly, preserving relative loudness

🚀 Quick Start

  1. Install a recent version of ffmpeg
  2. Run pip3 install ffmpeg-normalize and ffmpeg-normalize /path/to/your/file.mp4, alternatively install uv and run uvx ffmpeg-normalize /path/to/your/file.mp4
  3. Done! 🎧 (the normalized file will be called normalized/file.mkv)

🆕 What's New

  • Version 1.36.0 introduces presets with --preset! Save and reuse your favorite normalization configurations for different use cases. Comes with three built-in presets: podcast (AES standard), music (RMS-based batch normalization), and streaming-video (video content). Create custom presets too!

    Example:

    ffmpeg-normalize input.mp3 --preset podcast
    

    applies the podcast preset (EBU R128, -16 LUFS) to your file. Learn more in the presets guide.

  • Version 1.35.0 has batch/album normalization with --batch. It preserves relative loudness between files! Perfect for music albums where you want to shift all tracks by the same amount.

    Example:

    ffmpeg-normalize album/*.flac --batch -nt rms -t -20
    

    shifts the entire album so the average RMS is -20 dB, preserving the original relative loudness as mastered.

  • Version 1.34.0 brings selective audio stream normalization! You can now:

    • Normalize specific audio streams with -as/--audio-streams (e.g., -as 1,2 to normalize only streams 1 and 2)

    • Normalize only default audio streams with --audio-default-only (useful for files with multiple language tracks)

    • Keep other streams unchanged with --keep-other-audio (copy non-selected streams without normalization)

      Example:

      ffmpeg-normalize input.mkv -as 1 --keep-other-audio
      

      normalizes stream 1 and copies all other audio streams unchanged.

Other recent additions:

  • Shell completions (v1.31.0) — Tab completion for bash, zsh, and fish shells. See the installation guide for setup instructions.
  • --lower-only option — Prevent audio from increasing in loudness, only lower it if needed (works with all normalization types).

See the full changelog for all updates.

📓 Documentation

Check out our documentation for more info!

🤝 Contributors

The only reason this project exists in its current form is because @benjaoming's initial PRs. Thanks for everyone's support!

Benjamin Balder Bach
Benjamin Balder Bach

💻
Eleni Lixourioti
Eleni Lixourioti

💻
thenewguy
thenewguy

💻
Anthony Violo
Anthony Violo

💻
Eric Jacobs
Eric Jacobs

💻
kostalski
kostalski

💻
Justin Pearson
Justin Pearson

💻
ad90xa0-aa
ad90xa0-aa

💻
Mathijs
Mathijs

💻
Marc Püls
Marc Püls

💻
Michael V. Battista
Michael V. Battista

💻
WyattBlue
WyattBlue

💻
Jan-Frederik Schmidt
Jan-Frederik Schmidt

💻
mjhalwa
mjhalwa

💻
07416
07416

📖
sian1468
sian1468

⚠️
Panayiotis Savva
Panayiotis Savva

💻
HighMans
HighMans

💻
kanjieater
kanjieater

🤔
Ahmet Sait
Ahmet Sait

💻
georgev93
georgev93

💻
David Bern
David Bern

💻
randompersona1
randompersona1

💻
Add your contributions

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ffmpeg_normalize-1.37.4.tar.gz (34.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ffmpeg_normalize-1.37.4-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file ffmpeg_normalize-1.37.4.tar.gz.

File metadata

  • Download URL: ffmpeg_normalize-1.37.4.tar.gz
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ffmpeg_normalize-1.37.4.tar.gz
Algorithm Hash digest
SHA256 750318eda82645f3acedaaa089aa0814022dd009b2de5e23b8b1fbdbf2f39467
MD5 9dac16b922c4cb858401c4c9b6651bad
BLAKE2b-256 dae89f20934ce8d86f71751078a52944108183528f7a90cae9295b97981966b2

See more details on using hashes here.

File details

Details for the file ffmpeg_normalize-1.37.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ffmpeg_normalize-1.37.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0f4aa210ed17818794de15a4827aef079401cda849dfc2816a4874e865222316
MD5 6cfbe3748df343ed7fe12ab1759a37f5
BLAKE2b-256 ef52a59c46c6565c660b574a8538caac23b37974713ee98e8a3439f006b13587

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page