Help - Search - Members - Calendar
Full Version: "--dbgain xx" in 3.95 ?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
High Fidelity
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 ??? rolleyes.gif
sony666
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.
High Fidelity
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...
ancl
QUOTE(High Fidelity @ Jan 12 2004, 04:42 PM)
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?
dreamliner77
Yeah, that's about right/
n68
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..


huh.gif
smile.gif
High Fidelity
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.
magic75
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
n68
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..


smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.