Issue: To prevent sections from suddenly being much louder than others, you want to normalize or balance the volume (loudness). I also reduced the size of the files by reducing the bit rate to from 256kbps to 192kbps (bit rate) at the same time.
- download ffmpeg for Windows from https://www.gyan.dev/ffmpeg/builds/ (e.g., https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-9.0.2-essentials_build.7z)
- extract it to a suitable location e.g., c:\ffmpeg902
- update the PATH envirinment varuable on your system to include the path the ffmpeg executable e.g., c:\ffmpeg902\bin
- open a new command prompt, and create a python virtial environment (assumes you have python installed on your system already and have added it to the PATH envionment variable)
example:
cd C:\Users\itababa\
python -m venv myenv - activate the virtual environment
C:\Users\itababa\myenv\Scripts\activate.bat - Install the python ffmpeg-normalize module into the virtual environment
pip install ffmpeg-normalize
deactivate - open a command prompt, CD to the location of your MP3 files e.g. C:\Users\itababa\Downloads\mymusic\
- create a sub-folder to hold the normalized files e.g., mkdir normalized
- run a loop to normalize all the mp3 files in the current directory
C:\Users\itababa\myenv\Scripts\activate.bat
for %i in (*.mp3) do ffmpeg-normalize “%i” -c:a libmp3lame -b:a 192k -ar 44100 -o “normalized\%i”
NOTE: The description/meaning of the parameters used by ffmpeg-normalize:
LRA=11: Loudness Range. This controls the dynamic range to keep the audio feeling smooth and natural rather than overly compressed. [1, 2, 3]
I=-16: Sets the Target Integrated Loudness to -16 LUFS (the standard for online video distribution).
TP=-1.5: True Peak ceiling. It ensures that even when the volume is boosted, the loudest spikes won’t pass -1.5 dB, completely eliminating audio clipping or cracking.