Can audio volume output be standardized?

Is it possible to have all output volume standardized?

What I mean is if I play two files in succession, the volume attributed in each file can vary drastically. This means grabbing the remote to the downstream audio device and changing the volume.

I am hoping this is already implemented and I just have my settings off, but, if not, could this be a requested feature?

It would be helpful if the player had the option to set a standard output volume so that the volume does not need to be adjusted unnecessarily afterwards by an amplifier downstream.

I understand there could be problems with gain and confusion over which audio channel to use for the metric. I put forward as a constructive suggestion using 70-80% of whatever is deemed to be the commonly set volume in most files and using the R/L channels as the metric.

thank you.

Leveling the audio across a large set of media files is tricker than you’d think. Doubly so with cinematic movies and the like where the director aims for very low volume whisper-like scenes and very low fight scenes (Think Star Wars kinds of battle scenes). One might think you could go through all media files and get an average volume then try to apply that but the volume levels are really specific to the media at hand and the intended volume.

Still, I find sometimes some episodes or movies have just been recorded at a lower volume and can use a boost. For that I have this script:

Mars:cat /System/bin/louder.sh 
#!/bin/bash
if [ $# -gt 2 -o $# -lt 1 ]; then
  echo "Usage: $0 <Video filename> [<loudness>]"
  exit 1
fi

vdir=$(dirname "$1")
video=$(basename "$1")
vfile=${video%.*}
vext=${video#*.}
loudness=${2:-3}

#ffmpeg -i "$1" -filter:a "volume=$loudness.0" "$vdir/$vfile.louder.$vext"
ffmpeg -i "$1" -vcodec copy -af "volume=$loudness.0" "$vdir/$vfile.louder.$vext"
Mars:

This will give a 3db boost (by default) to a video file and create another video file with the word “louder” in it. You should spot check it to make sure it didn’t corrupt the file then move it in place.

1 Like

And this is compounded by sources with multichannel audio that need to be mixed down for playback. Some files describe how levels should be boosted, but some don’t. Some devices boost the levels, some boost the center, others don’t.

There are multiple threads and feature requests and hacks discussing how Plex handles this (or doesn’t) on the forum.

Sometimes the easiest solution is to enable Night Mode or Speech Clarity mode on a TV or Soundbar or Receiver.


You might also be interested in the ffmpeg loudnorm, dynaudionorm or acompressor filters.

loudnorm can set the PEAK volume to a consistent level, without adjusting the dynamics.

dynaudionorm basically does the same thing as loudnorm, repeatedly. It’s the equivalent of sitting there adjusting the volume repeatedly.

acompressor adjusts the dynamics, reducing the loudest sounds so that the quiet ones can be increased.

2 Likes

Thanks for teasing out two distinct scenarios.
I admit, I was not thinking about some kind of homogenization of the volume within a movie with a large range of sound for dramatic effect. It’s certainly an option I could see some people wanting, but I was simply thinking of the second form of volume control you mentioned.
Thanks for the script! I may end up using it - especially if a notable and small group of files need volume tweaking, but I’m not sure I want to, potentially remix my entire library. haha

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