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: "--dbgain xx" in 3.95 ? (Read 3620 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

"--dbgain xx" in 3.95 ?

Is it possible to implement a kind of gain function in LAME 3.90.x / 3.95.x that normalizes the encoded track to a predefined dB value - something like "--dbgain 89" and the track is normalized to 89 dB by setting the correct scalefactor automatically?
Something that merges routines of wavegain and LAME.

I know this was discussed some time ago, but I'd like to bring it up again.
Maybe I'm wrong, but I think to remember that it was mentioned somewhere Lame 4 will be able to do this, but it would be nice to see this feature in the nearer future.
I'm not talking about albumgain, which surely would be harder to implement. I think a trackgain would be a good start to prepare mp3 samplers for use on standalone players (i.e. in the car).

Maybe the developers have the routines already in a secret drawer ??? 

"--dbgain xx" in 3.95 ?

Reply #1
well given that the replaygain routines are already used in lame 3.95, what you desire should not be too hard to hack in, if a coder sees the need for it.

"--dbgain xx" in 3.95 ?

Reply #2
I don't mean something like mp3gain.
What I have in mind is something that has the same effect as if you normalize the
wav file and encode afterwards (but leaves the wav file untouched).

Advantages:
1. your player does not need to be able to replaygain (i.e. mp3 player in your car)
2. reduced filesize in many cases
3. simplified operation, means it's easier to tell the encoder that you want to normalize to 89 dB for instance, instead of finding out an abstract scalefactor for each file seperately...

"--dbgain xx" in 3.95 ?

Reply #3
Quote
I don't mean something like mp3gain.
What I have in mind is something that has the same effect as if you normalize the
wav file and encode afterwards (but leaves the wav file untouched).

Advantages:
1. your player does not need to be able to replaygain (i.e. mp3 player in your car)
2. reduced filesize in many cases
3. simplified operation, means it's easier to tell the encoder that you want to normalize to 89 dB for instance, instead of finding out an abstract scalefactor for each file seperately...

I believe this is how mp3gain works...(except the reduced filesize thing)... or have I missed something?

"--dbgain xx" in 3.95 ?

Reply #4
Yeah, that's about right/
"You can fight without ever winning, but never win without a fight."  Neil Peart  'Resist'

"--dbgain xx" in 3.95 ?

Reply #5
gday...


Quote
I don't mean something like mp3gain.


are you sure..
if am not way off.. there is only two ways..
replaygaining the file physical.. or ditto tag based..

Quote
Advantages:
1. your player does not need to be able to replaygain (i.e. mp3 player in your car)
"for that.. you will need to alter the file itself.. thus NO tag based solution."

2. reduced filesize in many cases.
"in case it would be minimal reduction"

3. simplified operation, means it's easier to tell the encoder that you want to normalize to 89 dB for instance, instead of finding out an abstract scalefactor for each file seperately...


all together sums up to (as you say) mp3gain embedded in the lame structure..

am i right..


 

"--dbgain xx" in 3.95 ?

Reply #6
What I mean is to adjust the "real" or as you say "physical" loudness of the mp3-file, which is a not a fully reversible process because it adjusts the real loudness of the file. Some low level informations are cut off. That´s why the files are sometimes smaller.

I would like to have scaling easier.
Instead of finding out what the scaling factor is, I´d like to tell lame what the desired loudness is i.e. 89 dB.

Replaygain needs a compliant player ... see ...Replaygainplayer
reducing the loudness by scaling not.
So the loudness adjustment should work on any standalone, portable or car player.

"--dbgain xx" in 3.95 ?

Reply #7
ancl: No, that is not exactly how MP3Gain works. MP3gain modifies the file after encoding by changing the gain value field in each MP3 frame. High Fidelitys suggestion is to normalize before encoding. The MP3Gain way is completely reversible and in some sense lossless, but normalizing before encoding is not, as High Fidelity describes in the post above.

High Fidelity: Just a comment on advantage #1: Using MP3gain works for all players as it modifies the gain field which is part of the MP3 standard. It should work with your car MP3 player.

n68: I would say there are three ways:
1. scaling/replaygaining before encoding (High Fidelitys suggestion or just using wavegain manually)
2. tag-based according to the replaygain-"standard" as in fb2k
3. using MP3gain/changing gain field

I like the idea of lame doing the track gain adjustments manually, but I would prefer if it was done a la MP3gain (changing gain field only) rather than scaling the input to the encoder. Advantage: Reversable or lossless in some sense. Disadvantage: No file size savings

"--dbgain xx" in 3.95 ?

Reply #8
gday...


so in other words.. what H.F realy needs is
ex: speeks multifront.. to runn wavegain prior to lame..
in the same session..
that will not work.. atm.. but with some minor changes
i think it would..

that would be the existing alternative..
but as he pointed out in the first post..
what he (all) realy need is a implement of replaygain in lame..