I have a website that collects audio recordings from visitors using Flash, I am using ffmpeg2theora to convert the files from FLV to OGG…because I am re-using the files for an HTML5 Web page (OGG is supported on Firefox and Chrome). But, some files are loud and some are really quiet.
Is there a way to make all the files sound about the same loudness? It’s OK if the quality is poorer for the quieter audio files, just as long as it’s easier to hear the message that someone has left.
it’s called normalisation, you can do it in bulk with many players like foobar2000 (which calls it replaygain) or other audio software. At it simplest it makes the loudest sample in a song 100% and the softest 0% then averages out everything in between. Something like replaygain goes a step further and allows you to sample across a whole albulm or set of files which is useful in cases where certain tracks on are album are supposed to be quieter than others (like a ballad vs a rock track).
If you really do mean to do it programmically then foobar2000 can also be scripted.
For a more linux-friendly solution you may also like Normalize
EDIT: It occurs to me that replaygain may not be the best choice since it requires a compatible player and there is no guarentee HTML5 players will be. I’d use Normalise (see comment).