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: Converting 'Normalize' (db) output to use with --scale (lame) (Read 3054 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Converting 'Normalize' (db) output to use with --scale (lame)

Could anyone tell me how to convert the oputput from 'normalize' (Decibels) to use with the --scale option in 'lame'

For example I have this 'normalize' output
Quote
[Bobby@NoIP]$ normalize -n 15\ - example audio.WAV
Computing levels...
level        peak        gain
-16,7914dBFS -1,0410dBFS  4,7914dB  15 - example audio.WAV


And I want to get a number out of this to use with the --scale option in the 'lame' encoder.

Any hints ?

Converting 'Normalize' (db) output to use with --scale (lame)

Reply #1
WaveGain

I prefer foobar2000 Diskwriter with "Use Replay Gain".
These are essentially same procedure.

Converting 'Normalize' (db) output to use with --scale (lame)

Reply #2
Yes, use WaveGain instead of normalize.
See this topic and this post in it.

Converting 'Normalize' (db) output to use with --scale (lame)

Reply #3
You can use a simple shell script:

album mode:
Code: [Select]
GAIN=$(wavegain -a -p -x *.wav);
for all in *.wav
do
    lame --scale $GAIN "$all";
done

radio mode:
Code: [Select]
for all in *.wav
do
    lame --scale $(wavegain -p -x "$all") "$all";
done


or simply for a single file:
Code: [Select]
lame --scale $(wavegain -p -x file.wav) file.wav


Edit: radio gain is done for each file.

Converting 'Normalize' (db) output to use with --scale (lame)

Reply #4
Thanks everyone who replied.  I'm encoding mostly speech CDs so I'l be using the "Albun mode" of WaveGain, neat tool but took a while to find