I want to normalize the volume of my whole music collection (.ogg files only).
Of course I can't (don't want to) do this in a GUI tool (too much clicking effort).
Is there a command line tool for
Ubuntu Linux to do this?
Checkout the appropriately named Normalize:
It works for all types of file formats, including wav, mp3 and .ogg.
I should mention that the tools I list below are not actually normalization tools, per se. They are tools for applying the replaygain algorithm to determine the music file's loudness and add a tag to the file indicating the relative loudness. The critical difference is that normalization actually involves re-encoding the audio data, whereas replaygain essentially just adds a sticky note telling your music player how loud the song is, so that the player can adjust for that. The advantage is that replaygain is lossless, because it doesn't modify the audio data. The disadvantage is that replaygain has no effect unless your music player knows about the tags. In particular, lots of portable mp3 players that support ogg fail to support replaygain tags, so if you're normalizing these audio files for a portable device, you're probably not going to want replaygain.
Anyway, here's a list of all the replaygain-able file types that I know of and the replaygain tool that works on them:
And that's all the ones I can think of for now.
The downside is that you'll need to install a bunch of python modules to use it, since I've not given any thought to ease of setup.
You could investigate Replay Gain. I've not played with it much, but my understanding is that it scans a file (or directory/album) and adds meta-data to the tags, so that a Replay Gain aware player then adds the required amount of gain during playback to normalise the volume level.
Advantages: no decode/recode process, so faster, and no extra audio degradation due to re-encode
Disadvantages: Replay aware player(s) required.