Our organisation has a very large, nested, directory of music. However most of the songs have been recorded at different volumes.

This means that when playing songs (from different albums etc), you might have the speakers turned up load to hear a quiet song, then the next song will be loud and so with the speakers turned up, will be deafening.

Thus I am looking for a program to scale the average volume of all my songs to be all equal to each other. Obviously within the songs, I want to preferve the volume differences, (eg if there is a quiet intro, before the "beat is dropped", I don't want that ruined.)

  • Must work on Debian Wheezy
  • Must support .ogg and .mp3. But the more other formats the better
  • Ideally would be installable from a debian repository, either main, non-free (being not open source, backports or through something like pip.
  • Must support nested directories and normalise across all of them.
  • Must run on the command-line
  • Ideally would have some ability to repeat as new songs are added. (eg if it records the normal volume somewhere.
  • Should not freak out if the songs are accessed when it is trying to convert them. If a song it is about to edit is suddenly played it must handle this gracefully. Ideally by moving that song to latter in the queue of songs to be adjusted.
  • Should take advantage of multiple cores/CPUs
  • 1
    What're you using as a player? Would replaygain/tag based normalisation storage be acceptable or do you need to actually edit the song yourself? – Journeyman Geek Mar 22 '14 at 3:12
  • Generally the music is being player through mpd (music player daemon). I'm not sure what replaygain/tag based normalisation storage means. Looking it up – Lyndon White Mar 22 '14 at 3:15
  • @JourneymanGeek: Yes, looks like a tag based Replaygain should work. MDP supports it. If you know a good tool for that, ten at hwould be a valid answer – Lyndon White Mar 22 '14 at 3:23
  • I do most of my music management in windows (through foobar2k and mp3gain). I have an idea for the approach. I need to take a look at the tools for your specific needs before I can answer. I know where to start now though ;) – Journeyman Geek Mar 22 '14 at 3:41

As far as I know there's no universal tool for it - there's mp3gain for mp3s, vorbisgain for ogg, and metaflac for flac. All three options can be let loose on a folder with subfolders using find - with something like find . -iname '*.mp3' -execdir mp3gain -r -k "{}" \; & - the precise command is via porg.es.

There's a pretty nice pre-made script that handles all three on ubuntu forums - the alternate suggests gstreamer and quad libet together might do the trick as well, and they have the script for that on github

In either case you'd have to run the script on the entire library as new songs are added - replaygain is pretty fast, but you may simply be able to get around it with a list of files that have been normalised (and skip those) or by checking the tags.

Most of these apps, AFAIK arn't multithreaded, they take up fairly trivial amounts of processor power

Your Answer

