Basic (I hope) audio question

Hello Shotcutters, I have what I hope is an easy question about audio. I’ve watched the tutorial videos and I’ve not seen the answer to this in those.

I have a timeline made up of several clips with 5.1 audio and would like to have Shotcut look at the audio for the entire timeline and apply a gain such that the loudest audio hits -5dB. I believe this is called audio peak normalization. From working with single-track audio in Audacity I thought this is what the normalize function does, but the tutorial I watched talks about the 2-pass normalizing the loudness of the entire clip, which sounds like it is adjusting it so that the average loudness is at a set value, which is not what I’m trying to do. Likewise, the 1-pass normalizer will adjust levels within a moving window, which will change the audio level of one part of the timeline respective to the rest, which is not what I want to do

The more I dig into this, the more complicated it gets. Any hints would be welcome.

Shotcut does not have a filter to accomplish exactly this. The Normalize filters (both one and two pass) adjust the gain to achieve a target program loudness (which isn’t exactly the same a “average” loudness).

If you can use an external tool to find the maximum peak sample, you can apply a gain filter in Shotcut to adjust the gain.

After a bit of googling, I found ffmpeg will do what I’m trying to do. I get the feeling audio veterans will not be shocked by this.

Specifically, this page describes how to analyze (in the section labeled “Peak and RMS Normalization”) and then use that information to adjust the volume (in the section labeled “Changing volume”.)

After some experimentation, I discovered that aiming for a peak of around -9.5dB as reported by ffmpeg roughly corresponds to -5 lufs on Shotcut’s Audio Peak Meter, which is what I was shooting for.

Note:I don’t know anything about proper audio editing or audio engineering, I was just looking to adjust the volume on some TV shows that had low volume levels.

If that’s the project, then pretty good results (and likely more consistent) could also be had by doing a Shotcut normalize to a -16 dB/LUFS target then following it with a Limiter set to -1.5 dB. If there’s a lot of distortion or clipping, then use the -23 dB/LUFS standard from R.128/ATSC to normalize rather than -16.

The complication with peak normalization is that a single loud sound effect like an explosion could wreck the gain level for the rest of the entire video. LUFS normalization handles this situation much more gracefully by aiming for a target (similar to an average) rather than sacrificing the entire video volume to protect the single highest peak that probably no one even cares to protect.

2 Likes

Good information.

Bookmarked.

Thank you.

That was the general understanding I had as well, however in my particular case the source material I’m working with is DVR’d over the air digital TV shows, I’m just editing out the commercials. I was going with the presumption that the audio was, overall, balanced, normalized, compressed etc. by whoever produced the show, so there shouldn’t be any crazy loud sounds. Some shows are fine, no adjustment needed, but others quiet enough that I find myself kicking the volume up when I’m watching it. My goal was to bring those quiet shows up to the point where I’m not having to crank my volume on playback to get a normal listening volume. I know that some shows are going to have a larger dynamic range, which is why I thought that scanning for the peak volume over the whole show and then adjusting the gain for the whole show so that that peak is -5dB or so would be the way to go. That way I’d preserve the dynamic range that the sound engineer created.

This topic was automatically closed after 90 days. New replies are no longer allowed.