i have just started using lame 3.97 beta2 with all2lame, encoding at -v2-new and i am noticing that 'replaygain' is being applied.
so i have two questions:
1. what is replaygain exactly?
2. should i use it?
i have already performed several searches on here but have not found a satisfactory answer to my question.
i would be very grateful if anyone would please provide a simple explanation. many thanks
Squeller
May 31 2006, 07:35
Measures perceived loudness and peak and stores it in metadata (i.e. does not touch the audio material)
Yes, you should use it. Yes, you should use foobar2000.
And you should read
http://wiki.hydrogenaudio.org/index.php?title=Replaygain
Okkkkay, but why does the wiki say "Notes: Added during encoding; not supported by any player yet; Track Gain only" under lame? Has replaygain not been implemented in lame forever? Maybe I'm missing something...
pepoluan
May 31 2006, 08:03
QUOTE(Squeller @ May 31 2006, 20:35)

Measures perceived loudness and peak and stores it in metadata (i.e. does not touch the audio material)
Yes, you should use it.
Actually, whether you want to use it or not depends on your willingness to no longer fiddle with the volume button.
thank you for the wiki. i have read it all.
but i still have a question - why would i want to use replaygain? i mean, i have 100% faith in the insurpassable production and mastering quality of the original recording which i am encoding here. why on earth would replaygain even be necessary in this instance?
pepoluan
May 31 2006, 08:09
@rhys: Ah, I see my post got in only several seconds before yours. So here's my (hopefully) more detailed explanation:
You don't have to use ReplayGain if you don't want to.
It is only for your convenience: ReplayGain all your tracks, and forever be free of having to fiddle with the volume button because tracks from one CD is mastered differently from tracks from other CDs (i.e. having different loudness).
ReplayGain does not change quality in any way. Only perceived loudness. In a reversible way.
@ryran: LAME adds RG tags during encoding. But no player support those tags, so to the players, the MP3's produced are practically without RG. I don't know why, but it's the sad fact of life, I'm afraid.
QUOTE(pepoluan @ May 31 2006, 10:09)

LAME adds RG tags during encoding. But no player support those tags, so to the players, the MP3's produced are practically without RG. I don't know why, but it's the sad fact of life, I'm afraid.
wha-huh? well if I'm following, then I think that page should explain something more about replaygain for the mp3 format, as in talk about foobar or
something. as it stands now, it makes it sound like mp3 + replaygain is not doable.
thank you pepoluan
so are you saying that if i play an mp3 file which contains replaygain metadata on my standard winamp or xbmc, then because these players do not read the replaygain metadata, the file will just be played as normal with no replaygain applied, and this is therefore something which i do not need to worry about, unless i choose to use a compatible player such as foobar?
pepoluan
May 31 2006, 08:25
QUOTE(ryran @ May 31 2006, 21:16)

QUOTE(pepoluan @ May 31 2006, 10:09)

LAME adds RG tags during encoding. But no player support those tags, so to the players, the MP3's produced are practically without RG. I don't know why, but it's the sad fact of life, I'm afraid.
wha-huh? well if I'm following, then I think that page should explain something more about replaygain for the mp3 format, as in talk about foobar or
something. as it stands now, it makes it sound like mp3 + replaygain is not doable.
Valuable input, thanx

Will update offending page Real Soon
Oh yeah. Except the page already talks about foobar. Forgot about that. Well.. in any case, I read that page a couple days ago because I was considering replaygaining all my tracks and came away quite confused, despite the fact that I've been using foobar2000 since Peter first started releasing betas after the uhh fall-out /w ns 'n friends oh so long ago .
Mmmm. Point being that I suppose we should just change the part about lame a bit. It's confusing and irrelevant.
pepoluan
May 31 2006, 08:41
Synthetic Soul
May 31 2006, 09:02
Just added WVGAIN.
haregoo
May 31 2006, 09:28
QUOTE(pepoluan @ May 31 2006, 23:09)

@rhys: Ah, I see my post got in only several seconds before yours. So here's my (hopefully) more detailed explanation:
You don't have to use ReplayGain if you don't want to.
It is only for your convenience: ReplayGain all your tracks, and forever be free of having to fiddle with the volume button because tracks from one CD is mastered differently from tracks from other CDs (i.e. having different loudness).
This is not correct in a strict sense.
ReplayGain can prevent clipping noise.
Quote from MP3Gain Help
QUOTE
The default is 89.0 dB because most mp3s will not have clipping at this volume level.
("Clipping" means that when the mp3 file is decoded by your player, some of the sound samples will be too loud. The player will "clip" these samples so that they do not exceed the maximum allowable value. This clipping creates a sort of rough, "scratchy" sound during loud parts of the song.)
This phenomenon is common in lossy encoding.
pepoluan
May 31 2006, 10:04
But to declare that RG prevents clipping would be wrong. It is just a happy side-effect. There are instances, rare ones, where the MP3s will still clip, as implied by the quote there (i.e. "... most mp3s will not ..."). Besides, RG is applicable not only for MP3s but also Vorbis, FLAC, etc.
If you push your player output high with pre-amp and DSP's, clipping may still happen.
Anyways, what I was trying to declare is that the main aim of RG is for loudness compensation and not quality manipulation.
haregoo
May 31 2006, 10:26
QUOTE(pepoluan @ Jun 1 2006, 01:04)

But to declare that RG prevents clipping would be wrong. It is just a happy side-effect. There are instances, rare ones, where the MP3s will still clip, as implied by the quote there (i.e. "... most mp3s will not ..."). Besides, RG is applicable not only for MP3s but also Vorbis, FLAC, etc.
I don't think that to prevent clipping is "side-effect".
RG implementation defines
Peak Amplitude to prevent clipping.
QUOTE
If you push your player output high with pre-amp and DSP's, clipping may still happen.
This is another problem. If decoded audio data is clipped, there is no way to recover.
freak393
May 31 2006, 11:03
May I ad to the discussion by asking if there is a general agreement on to which level the "gain" is applied?
Meaning: Does one add replaygain (for me it would be mp3gain as I'm using ipod and itunes) on each individual album OR on a whole collection which in case 2 leads to the following question of how to add new albums at the same gain level as the existing collection.
Also, when using equalised i.e. "gained" wavpack files (via wavgain) which are then converted into mp3 - do they need to be treated with a "gain" tool again or is the gain from wavpack preserved throgh the conversion process?
Thanx for the answers!
freak
pepoluan
May 31 2006, 11:22
QUOTE(freak393 @ Jun 1 2006, 00:03)

May I ad to the discussion by asking if there is a general agreement on to which level the "gain" is applied?
Meaning: Does one add replaygain (for me it would be mp3gain as I'm using ipod and itunes) on each individual album OR on a whole collection which in case 2 leads to the following question of how to add new albums at the same gain level as the existing collection.
Add Replaygain per Album, as there may be difference in albums are mastered. One CD may need to be boosted by +1.6dB while the other may need to be faded by -2.7dB. This ensures that between albums the loudness are consistent.
However, if the tracks in the album do not depend on each other (e.g. collection of singles), you can only use trackgain. No need for albumgain. Albumgain is needed if the tracks depend on each other (e.g. classical music, where the tracks are part of the whole symphony, or live recording, where the tracks are merely the start markers of each song).
QUOTE(freak393 @ Jun 1 2006, 00:03)

Also, when using equalised i.e. "gained" wavpack files (via wavgain) which are then converted into mp3 - do they need to be treated with a "gain" tool again or is the gain from wavpack preserved throgh the conversion process?
Theoretically, no. But compression sometimes cause slight change in dynamics. Besides, RG is lossless and reversible, so there's no harm there. Go ahead and do RG scan.
But, wavgaining a waveform before compresing is a baaaaaaad thing to do
tyler_durden
May 31 2006, 11:46
Rplay gain for both album and track are supported by the Squeezebox streaming audio player, at least for flac files. Not sure about mp3, but who listens to mp3 anyway?
QUOTE(freak393 @ May 31 2006, 13:03)

for me it would be mp3gain as I'm using ipod and itunes
in case you've never heard of
rockbox: it's firmware you load on to your ipod to replace the default player software, and it supports replaygain [so you wouldn't need to do mp3gain]. aamong other things, gapless playback and vorbis support rock.
alternatively, itunes has an equivalent feature to replaygain called soundcheck.
there's even a plugin for foobar (foo_pod) that has the ability (I haven't used it for this) to convert replaygain tagging info to soundcheck info.
ps @ tyler: a whoooooooooole lot of people still encode mp3s dude. it's a thing called compatibility. =p
Mike Giacomelli
May 31 2006, 14:14
^^^ Can those read the lame RG tags though? IIRC they only read the ID3v2/APEv2 tags, not the ones Lame writes.
rockbox is only available for a select number of iriver digital audio players.
i bought an hp-140 on the basis of a rockbox upgrade
QUOTE(rhys @ May 31 2006, 17:22)

rockbox is only available for a select number of iriver digital audio players.
i bought an hp-140 on the basis of a rockbox upgrade

WRONG.not being hostile here, but if you had clicked my link you would've seen that there's a fully-functional ipod port thanks to the work of the ipodlinux project. I just bought a 60gig video ipod last week, but only because of rockbox. in fact, I'm rockin' out to some awesome tunes on it right now.
freak393
Jun 4 2006, 06:19
QUOTE(ryran @ May 31 2006, 21:35)

QUOTE(freak393 @ May 31 2006, 13:03)

for me it would be mp3gain as I'm using ipod and itunes
in case you've never heard of
rockbox: it's firmware you load on to your ipod to replace the default player software, and it supports replaygain [so you wouldn't need to do mp3gain]. aamong other things, gapless playback and vorbis support rock.
alternatively, itunes has an equivalent feature to replaygain called soundcheck.
there's even a plugin for foobar (foo_pod) that has the ability (I haven't used it for this) to convert replaygain tagging info to soundcheck info.
ps @ tyler: a whoooooooooole lot of people still encode mp3s dude. it's a thing called compatibility. =p
Thanks for the reply - heard of rockbox but owning a 3G ipod it's currently no alternative (not available for 3G models) - also, as I've read on the rockbox homepage, energy consumption is still much worse than with the original firmware. AND that already gives me only about 5 hours of playing time.
Do you know how exactly the itunes soundcheck function works in comparison to mp3gain? I.e. where is the gain information stored, is it losless and thus reversible when simply unchecked again, is it album- or trackgain? I fear that with one simple checkbox itunes probably "oversimplyfies".
I did say above that I use itunes and therfore need to use mp3gain - however I did not actually do that yet but am planning to - ONLY, does itunes and my ipod actually utilise/support the gain information embedded by mp3gain? You didn't object so it does?
My understanding of the whole "gain" concept realy just arose within the last day an I wasn't aware that the different gain methods also need to be supported by the player (software and hardware).
QUOTE(freak393 @ Jun 4 2006, 14:19)

Do you know how exactly the itunes soundcheck function works in comparison to mp3gain? I.e. where is the gain information stored, is it losless and thus reversible when simply unchecked again, is it album- or trackgain? I fear that with one simple checkbox itunes probably "oversimplyfies".
Soundcheck stores the data in the tags - so it is reversible. It only supports either trackgain OR albumgain (only one gain-value can be stored, not two). So, with soundcheck you can not switch between album and singlemode on-the-fly(during playback) - you need to decide beforehand if you want trackgain or albumgain.
With replaygain, this dilemma does not happen, because typically when you choose albumgain, then it will additionally also write trackgain-values - so that you can later switch between the two (foobar for example does this).
So, when you replaygain your files via foobar, then what really happens is:
scan as album = add albumgain + trackgain values
scan as tracks = add trackgain values only
QUOTE
But, wavgaining a waveform before compresing is a baaaaaaad thing to do tongue.gif
Why exactly? I know you get different peak values but why is this a particualr problem? I'm guessing it affects the dynamic range but I assume it's not significant. Wasn't there a thread a while back about doing this specifically to save (a very small amount) of space in the compressed files? And wavegaining before compression is the only way to automate permenant gaining into an EAC extraction AFAIK. I currently use wavegain to calculate scale factors for LAME to encode album-gained mp3s for use an a portable device, is there any particular reason why I shouldn't? (reversibility isn't an issue).
Main drawbacks of wavgaining are:
- irreversible
- only allows either albumgain OR trackgain (however, if you albumgain, then you still have the option to later add trackgain via tags - but if you wavgain in track-mode, then albummode is lost forever)
If those two are no issue, then i dont see a problem
molnart
Jun 5 2006, 13:19
What do you recommend, how should i replaygain a two disc album? Apply AlbumGain to the discs separately or scan the whole thing as a single album?
What are the pros and cons?
Most probably the situation will be different on double albums (The Wall) and on albums where the second disc contains bonus material (live recording, demos, etc.)
I assume i should scan everything as separate album, but can someone confirm if this is right ?
JunkieXL
Jun 5 2006, 13:34
I listen to a lot of double disc electronic music and I replaygain each disc as a seperate album. Unless the two discs are merely a break in a long live session or performance, I would recommend applying album gain to each disc independantly.
JXL
audiomars
Jun 6 2006, 00:00
QUOTE(molnart @ Jun 6 2006, 00:49)

---- snip ----
Most probably the situation will be different on double albums (The Wall) and on albums where the second disc contains bonus material (live recording, demos, etc.)
I assume i should scan everything as separate album, but can someone confirm if this is right ?
---- snip ----
Hi molnart
You are right. I think it makes sense to scan each disc as a separate album. Thats what I have done on Floyd's The Wall and Roger Waters' In The Flesh. It works perfectly especially on The Wall.
audiomars
mad_arab
Jun 11 2006, 11:47
Does winamp read mp3 replaygain that has been applied with foobar? It doesn't appear to work here, and I prefer winamp for playing...
Hollunder
Jun 11 2006, 11:52
http://wiki.hydrogenaudio.org/index.php?ti...laygain#Windowssomewhere at the bottom of the page is something about a plug-in for winamp
QUOTE(rhys @ May 31 2006, 15:19)

thank you pepoluan
so are you saying that if i play an mp3 file which contains replaygain metadata on my standard winamp or xbmc, then because these players do not read the replaygain metadata, the file will just be played as normal with no replaygain applied, and this is therefore something which i do not need to worry about, unless i choose to use a compatible player such as foobar?
How old is your build of xbmc? if you go into settings>my music>player you should see the options for replay gain, iirc by default its set to track mode with the tech builds but you can turn it off or select album mode. the filetypes it works with are any that can be played with PAplayer, theres a list
here but it doesnt say if any are specific to mplayer which doesnt have replaygain support and im not sure how it would work on wav as your not supposed to tag them and its not like xbmc can scan the files and keep the results in its database (atleast its not possible now, i bet if someone wanted to they could make a python script to do it).
mad_arab
Jun 11 2006, 18:35
QUOTE(Hollunder @ Jun 11 2006, 09:52)

http://wiki.hydrogenaudio.org/index.php?ti...laygain#Windowssomewhere at the bottom of the page is something about a plug-in for winamp
Not easy to find, but I finally did.
Why on earth does not winamp do this by default? And I'm surprise there aren't plugins more easily available than this...
pepoluan
Jun 12 2006, 11:23
QUOTE(rhys @ May 31 2006, 21:19)

thank you pepoluan
so are you saying that if i play an mp3 file which contains replaygain metadata on my standard winamp or xbmc, then because these players do not read the replaygain metadata, the file will just be played as normal with no replaygain applied, and this is therefore something which i do not need to worry about, unless i choose to use a compatible player such as foobar?
Somehow I missed this...
If you use MP3Gain on your MP3 file, then whatever player you use will play the MP3 file with the replaygain correction, because MP3Gain actually modifies the audio data frame-by-frame.
I'm not sure about foobar2000's RG scanner, though. I think it stores RG values inside tags. If that is the case, then players that do not support RG will play the MP3 as if it is not replaygained.
Hi everyone,
I don't understand much the way replaygain works.
So here is my question: can I use replaygain while encoding MP3 (Lame) with CDEx ?
EDIT: I just realised I had to install a plugin into Winamp's folder...
No way to use it with a DAP then (except the rockboxed ones)?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.