Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: normalize (unix program) and my library (Read 4362 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

normalize (unix program) and my library

I use the Linux operating system, primarily GStreamer based applications to play my music. I also occasionally use iTunes and an RCA mp3 CD player.

I usually rip in Windows using EAC and then encode to tagged flac in Linux for archive purposes (I never did get EAC straight to flac working right - but Windows is a foreign OS to me, I just don't know how to use it well, so that may be just me) and then go from flac to mp3 via lame ( lame-3.96.1 currently ) for my library listening needs.

Some albums were just too quiet, I had to turn the volume up. Then turn it back down when a song from that album was over.

It looks like lame has an option to boost the PCM before encoding, but you have to know what to boost it to. When lame encodes a file, I also noticed it sets something called "replay gain" but either it doesn't do what I think it does, or it isn't respected by my software (or my mp3 cd player).

In xmms there is a normalize plugin, but I could hear it changing the volume of songs (either up or down) in the first few seconds, and found that annoying. So I searched and found a program called normalize that will normalize a wav file.

I tried that on the album that was the quietest - I decoded the flacs, ran normalize -b *.wav - and then encoded the results - and it was exactly how I wanted it to be - didn't have to crank up the stereo to hear the music.

Is that the right way to deal with this issue or is there a better way?
The one thing I like about normalize before the encode is that with the -b option, it takes all of the files fed to it into account when determining the normalize, so that a song that is suppose to be quieter than others on an album still are.

Also - most of my music is 16-bit but some is 24-bit (like my Rattle and Hum DVD audio rip) and I left it at 24 bit because it plays fine that way. From another thread here on normalizing it seems that normalizing is related to the bit/frequency? I'm confused about that a little.

normalize (unix program) and my library

Reply #1
on windows what you want is program called mp3gain

http://mp3gain.sourceforge.net/
"You can fight without ever winning, but never win without a fight."  Neil Peart  'Resist'


normalize (unix program) and my library

Reply #3
Quote
normalize does peak normalization. It won't always work, so you'd be better off using Replay Gain.

http://en.wikipedia.org/wiki/Replay_Gain
[a href="index.php?act=findpost&pid=260789"][{POST_SNAPBACK}][/a]


From the article -

Quote
Typically, this information is then stored in the audio file as metadata, allowing Replay Gain compliant audio players to automatically attenuate the output so that such files will play back at similar loudness to one another.


The songs do have a replay gain set by lame when they are encoded - but it doesn't seem to work.

The worst album - "Lamb Favorites"

sox old-mp3 - quiet
rhythmbox/jubilee/totem old-mp3 - quiet

used normalize on the wave and then lame to encode - plays fine.
My bootlegs also sound better after running normalize before encoding (they often were quiter than commercial CD as well)

All players played it at an acceptable level w/o me needing to adjust the volume.
So it seems that linux media players (and my mp3 cd player) don't respect the replay gain that lame sets when it encodes the song. Either that or lame did not correctly detect the needed replay gain, which I guess is also a possibility.

iTunes OTOH would play the files just fine, but I think iTunes does its own thing, because it scans songs when you add them and prints some message about adjusting audio levels.

normalize (unix program) and my library

Reply #4
Run mp3gain on your files, and they'll be the same volume no matter what player you use.

edit: And it's not just for Windows.

normalize (unix program) and my library

Reply #5
Quote
Run mp3gain on your files, and they'll be the same volume no matter what player you use.


It works with sox anyway (I haven't tested the others) - thanks.
It does seem from the documentation though that it won't just work with any player, the player needs to know what to do with the tag, so hopefully my mp3 cd player does. That's the one where the issue is the worst, because I use it with headphones so adjusting volume up can be ear damaging on next song.

normalize (unix program) and my library

Reply #6
mp3gain modifies the MP3 file directly. That used to be the default behaviour, but I haven't checked lately.

Anway, direct modification does not involve tags. Undo information might be written as APEv2 tags, but if your CD player can cope with APEv2 then you're all set.

If you CD player can't handle APEv2, then tell mp3gain not to write undo information.

 

normalize (unix program) and my library

Reply #7
Quote
mp3gain modifies the MP3 file directly. That used to be the default behaviour, but I haven't checked lately.

Anway, direct modification does not involve tags. Undo information might be written as APEv2 tags, but if your CD player can cope with APEv2 then you're all set.

If you CD player can't handle APEv2, then tell mp3gain not to write undo information.
[a href="index.php?act=findpost&pid=260803"][{POST_SNAPBACK}][/a]


Whatever it does - it works across the board on all the players I use, so it seems to be a better solution than normalizing the wav files and then encoding them.

I also like the fact it has a switch ( -k ) so as not to clip.
normalize might prevent that too, but I don't know.