audionorm
is a powerful and easy-to-use command-line tool written in Go. It allows you to normalize the volume of audio files in bulk. The tool processes MP3 files from a specified folder and outputs normalized WAV files with consistent volume levels, making it ideal for podcast editing, music libraries, and audio projects.
- Batch Processing: Normalize multiple MP3 files at once.
- Custom Normalization Factor: Set your desired volume level (0 to 1).
- MP3 to WAV Conversion: Outputs normalized files in WAV format.
- Ease of Use: Simple command-line interface.
To install audionorm
, ensure you have Go installed, then run:
go install github.com/olbrichattila/audionorm/cmd/audionorm@latest
Basic Command Syntax
audionorm <path> -factor=<value> -help
- path: (Optional) Specifies the folder containing MP3 files. Defaults to the current working directory if not provided.
- -factor: (Optional) A normalization factor between 0 and 1 (e.g., 0.8 for 80% of max volume). Defaults to 1 (no reduction in volume).
- -help: (Optional) Displays usage instructions and exits.
- Normalize audio in the current directory with default settings:
audionorm
- Normalize audio in the current directory with a factor of 0.8:
audionorm -factor=0.8
- Normalize audio in a specific folder (./myfolder) with default settings:
audionorm ./myfolder
- Normalize audio in ./myfolder with a factor of 0.8:
audionorm ./myfolder -factor=0.8
- Display help information and usage instructions:
audionorm -help
- Set a low over-amplification tolerance (e.g., 2):
audionorm ./folder -tolerance=2
- Set a hight over-amplification tolerance (e.g., 2):
audionorm ./folder -tolerance=20
- Convert it back to MP3:
audionorm . -mp3
Note: This feature requires ffmpeg to be installed: Examples of installing:
sudo apt update
sudo apt install ffmpeg
sudo dnf install ffmpeg
sudo pacman -S ffmpeg
sudo apt-get update
sudo apt-get install -y autoconf automake build-essential libtool pkg-config
sudo apt-get install -y libx264-dev libx265-dev libvpx-dev
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure
make
sudo make install
Install homebrew if not yet installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install ffmpeg
sudo port install ffmpeg
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install ffmpeg
https://ffmpeg.org/download.html#build-windows
The tolerance feature allows the program to handle naturally occurring high volumes without clipping or distortion. By setting a tolerance level, the program will permit a certain amount of over-amplification, enabling loud segments to remain audible and impactful.
- Key Parameter: -tolerance=
- Range: 0 to 20
- 0 (default): Disables over-amplification.
- 1-20: Gradually increases the permissible over-amplification level, where higher values allow greater tolerance.
When -tolerance is set, the utility adjusts its normalization process to allow some high-volume segments to exceed the standard threshold. This is particularly useful for dynamic audio content, such as music or dialogue, where peaks contribute to the overall experience.
For instance, a tolerance value of 2 permits minor over-amplification, while a value of 20 allows significant amplification for dramatic peaks.
The normalization factor adjusts the output volume:
- 1: Retains the original volume.
- 0.8: Reduces the volume to 80%.
- Values closer to 0: Significantly lower the volume.
This flexibility ensures that your audio output meets your specific needs, whether you are fine-tuning a podcast or preparing a uniform music library.
Benefits of Using audionorm
- Save time by batch processing audio files.
- Ensure consistent audio quality across all files.
- Easy integration into automated workflows and scripts.
This project is licensed under the MIT License. Feel free to use, modify, and distribute this tool.
Coming soon.
- Bitrate setup,
- wav as input file
- Learn more about me on my personal website. https://attilaolbrich.co.uk/menu/my-story
- Check out my latest blog blog at my personal page. https://attilaolbrich.co.uk/blog/1/single