12/23/12 19:00:26

Controlling the Loudness of Too Loud Movies

This post is dedicated to a good friend and his problems when watching movies. Here’s the story. He’s watching movies on a Mac, but the audio is output to his stereo. A common setup. The problem is that at “dialog level” the movie sounds fine, but in action-packed sequences the audio is just way too loud.

A while ago he was asking me for a solution. He was annoyed to reach for the volume control like some monkey. Wasn’t this computer supposed to make things easier? I couldn’t think of a good solution, but now that I watched all episodes of #TNG1 again, I can.

So here’s the solution I’ve come up with. It’s far less pretty than you might think.

I’ve tested this with Logic and Apple’s free AU Lab. I’m going to provide my AU Lab session with settings at the end.

Explanation Audio Mixing

Here’s my attempt at explaining why this is going wrong.

When you’re an audio engineer mixing a movie soundtrack. There are several “tracks” that need to be incorporated in a movie. The main ones are dialog, audio effects, and music.

To emphasize gripping scenes, loudness is used. The more “gripping” a scene is, the louder it usually is too. This is known as dynamic.

The problem is that our home “theaters” are not cinema theaters. We have less space, less people and less power. Therefore the mixed audio doesn’t translate well to the smaller home theaters. There’s a too high dynamic range coming from the movie. It’s like having a concert in the kitchen.

To adapt to the changes, the movie would have to be mixed again to fit in the smaller home space. As your own movie collection might suggest, this doesn’t happen often (or at all). Studios don’t have the budget for this kind of customization. (It would have to be done for every language too)

Solution (Not Pretty™)

The solution to this problem is some sort of live re-processing of the movie’s audio, shrinking the possible dynamic range.

The audio routing is relatively simply. A movie player plays the movie, the audio signal gets transmitted over some kind of audio bus, an audio processor grabs that signal and outputs to some other bus (possibly the same, but a different channel), then a transmitter needs to grab the processed signal off that bus and transfer it to the receiving end.

Soundflower would be a one-stop solution, but neither Plex nor Airfoil allow audio track selection for Soundflower. Airfoil always takes from channel 1 and 2, and Plex always outputs to channel 1 and 2. It’s not possible to tell Airfoil to use channel 3 and 4 instead. That limitation in mind, it’s not possible to use 1-2 as the audio processor’s input, and 3-4 as its output.

Airfoil can “hijack” any app’s audio output though. Therefore the app processing the audio needs to be hijacked in order for the signal to be sent to an AirPlay compatible receiver.

Signal Flow diagram:

Plex has its output set to Soundflower (2ch). Logic/AU Lab have one channel’s input set to the same device. Logic/AU Lab process the audio with some limiter and compressor. The output of either app is hijacked by Airfoil, which transmits the signal to an AirPlay receiver.



Set audio output to Soundflower (2ch). (PreferencesSystemAudio)

Logic Pro/AU Lab2

In Logic go to preferences and set AudioAudio Input to Soundflower (2ch) and output to Built-In Audio.

In AU Lab create a new document and use Soundflower 2ch as input and Built-In Audio as output. Change later in WindowStudio.


Finally, hijack AU Lab’s audio output. (Select AU Lab in the upper input selection) and submit to an Airplay receiver. This way, everything AU Lab outputs will be in Airfoil.
If Airfoil doesn’t seem to be able to catch the audio. Disable everything, quit AU Lab and then restart AU Lab by activating sending from Airfoil. This will launch AU Lab from Airfoil, hijacking all audio output.

AU Lab

AU Lab is a free tool that can even save and load documents including AU settings.

Audio Processing

The audio processing is relatively straight forward. We need to catch the very loud parts and make them not exceed a certain level. A limiter does the job:

Apple AUDynamicProcessor

This way the movie will never get past a certain volume. Note that I set a +10 dB make up gain.

Another loudness processor (compressor) is being used to smoothen the audio further.

Apple AUDynamicProcessor

With this compressor, the overall loudness differences become smaller. Loud parts become quieter, quiet parts become louder, thus making everything sound more dense.

To check whether you really hear the processed audio or the original audio, add a very obvious effect like a narrow bandpass filter. (Disable by clicking the small Bypass button in the channel strip)


Some notes here too:

Download: https://www.box.com/s/1030pj75ubihqdov0b0o

  1. Data is awesome! 

  2. More on the audio processing itself later.