# Program to Normalize the Audio in a Video File?



## barryzito777 (Mar 6, 2009)

I have a rather large collection of videos in various formats ( .mkv .avi .mp4 etc) that I've amassed over the years of my favorite TV shows (Talking about half a terabyte of files). Seeing as how they've come from various sources over the years they have different volume levels on them. This usually isn't much of an issue but when playing multiple video files in succession it can be an issue because you're listening to audio that all of a sudden is insanely loud or super quiet when it goes from one video to another.

Is there a program which I can feed in my video files and have the audio on them all normalized to the same range? I know I can do this one by one with basic video editing software but to do it one at a time would take forever. Any recommendation is appreciated.


----------



## Oddba11 (May 13, 2011)

Not that I'm aware. You would need to demux the audio from the file, adjust the level, and then mux the audio and video back together. The program needed to demux the audio would vary by the source file type.


----------



## Cinamyd (Feb 9, 2011)

For MP4 files, I've found YAMB (Yet Another an MP4Box GUI) is good for stripping out the audio stream from MP4 files. If it's AAC audio or MP3 audio, software like foobar2000 or mp3gain/aacgain can normalize (ReplayGain, now based around R-128 method) even without re-encoding the audio. Then YAMB in Create mode can take in the original video stream and the new version of the audio and put them together.

If you fully demux then attempt to remux from the raw streams without the MP4 container keeping them in sync, you might get timing issues.

Using yamb.log, some of the mp4box commandlines used can be discerned, and for a certain file type, e.g. mp4 with LC-AAC audio, you might be able to script something to automatically demux the audio and apply aacgain from the commandline. For movies, the traditional target level is 83.0 dB SPL with the ReplayGain reference file, i.e. -6 dB with respect to the ReplayGain music target.

Your other option is in playback software. The EBU R128 volume normalization thing will hopefully standardize it to some metadata like ReplayGain without requiring expensive Dolby Licenses in the near future, but many players, even Windows Media Player support Quiet Mode and other forms of volume levelling to control the wilder extremes of loudness variation.

I doubt iTunes type software will support all the formats you have, but if it does, it might be possible to use the same Soundcheck as for audio tracks, and Soundcheck mimics its predecessor, ReplayGain fairly well for most purposes.

On Windows 7 or above, you can also right click the volume control, right click a specific playback device (e.g. your soundcard or your DisplayPort/HDMI interface) and use Enhancements to apply Loudness Normalization. In wildly unstandardized arenas like YouTube, that can be a great help although it will rob most of the dynamic range from the material, naturally.


----------

