Skip to main content
Topic: MP3gain alternative.. ReplayGain? (Read 23889 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

MP3gain alternative.. ReplayGain?

Hello, many years ago I looked for a program similar to MP3gain, but that could work with other formats (e.g: ogg and flac now).
MP3gain was an useful GUI application that could scan many files and change their volume towards a set value (I used 90db).

Sadly, I couldn't find many alternatives.
At the time I heard only about ReplayGain, but I think it was only a generic media player setting applied to all songs.
Also, it used a different scale with negatives, like -6db instead of 90db.

What's the status of ReplayGain nowadays?
Is there a program similar to MP3gain for any file now?




Re: MP3gain alternative.. ReplayGain?

Reply #1
Mp3gain is a program that implements replaygain. There are many others, including foobar2000.

Re: MP3gain alternative.. ReplayGain?

Reply #2
Foobar will apply ReplayGain to most of my media files, including MP4 videos. Rather useful, given the wildly varying volume levels you get on videos, even from the same supplier sometimes.

Re: MP3gain alternative.. ReplayGain?

Reply #3
Thanks, but I'd like to apply ReplayGain directly to the files (e.g: changing metadata) instead of only to a player, so they'll keep their volume on different devices or after a conversion. Is this possible? (massively like MP3gain would be preferable)

(btw, I use VLC here as a player and I see it has a global RG setting with that negative scale. How could I optionally set 90db there?)

Re: MP3gain alternative.. ReplayGain?

Reply #4
ReplayGain works with any format but it has to be supported by the player.   iTunes has something similar called Sound Check.

MP3Gain is still around.
There is also WAVgain and VorbisGain.

Re: MP3gain alternative.. ReplayGain?

Reply #5
ReplayGain is a generic set of tags that can be included in almost any music file to indicate its loudness level relative to a standard level.  Most players will then be able to read the tags and normalise the loudness.

mp3gain was a standalone program that would analyse the loudness of MP3 tracks, although it would then directly modify the volume of each frame rather than just writing metadata.  Upside is every player would automatically use the altered volume, downside is that every player would automatically get the altered volume.

With improvements on MP3 metadata support, many replaygain programs will now write and read volume normalisation data into tags that can optionally be used or ignored, and are also easier to reset.

In VLC, you have two dB settings related to replaygain.  One is a default level, which I believe is the replaygain adjustment applied to all audio that doesn't actually have replaygain data included.  The second is a "preamp", which is a volume adjustment to be applied in addition to any replaygain normalisation.  This can be used to prevent (or reduce) clipping, for example.  The "actual" volume you get after normalisation depends on the level configured in the original replaygain analysis, and any preamp you then apply (and obviously your volume control).  Older (now very old) replaygain tags may have been written to an 83dB reference level, but this was quickly changed to 89dB as the 83dB level was considered too quiet.  Newer still, "replaygain" tags are now often produced using the EBU R128 standard, which is actually a level of -23dB LUFS and comparable to 83 dB.  To complicate things further, some tools analyse using the R128 algorithms but then adjust the normalisation to be comparable to the replaygain 89dB standard.  Analyse everything with the same tool and you shouldn't have issues, but it is something to keep in the back of your mind if some tracks start playing unexpectedly loud or quiet.  Good players can be configured to handle these glitches.

Re: MP3gain alternative.. ReplayGain?

Reply #6
So, after all these years there isn't still a single ReplayGain editor for all file formats? :\

Also, I still don't understand why 0db on some scales is an inaudible low level and on others means extra loud.
Is there a conversion table or something?

Re: MP3gain alternative.. ReplayGain?

Reply #7
Any program that supports ReplayGain can do it with all formats it supports, provided that the format in question can be tagged. Permanently altering files like MP3Gain does can be done losslessly to MP3, Opus and AAC with foobar2000 (supported containers are Matroska and MP4). If you don't mind re-encoding a file you can use foobar2000's converter to permanently apply ReplayGain to any format you can encode.

0dB means no change to signal. For example audio player or amplifier can't tell you how loud playback volume will be in terms of sound pressure but it can tell you that the amplitude of the signal is lowered by X decibels.

Re: MP3gain alternative.. ReplayGain?

Reply #8
Thanks, but I don't want to change formats (e.g: I want to keep .ogg and .flac).
I guess that just editing the replaygain metadata in each file isn't possible too.
What a bummer..

Thanks for the info about the 0db.
So probably VLC can't set a fixed RP level, but only lower it by N db. Meh, it seems quite useless.

Re: MP3gain alternative.. ReplayGain?

Reply #9
You can edit replaygain data in FLAC files (not sure what you mean by .ogg, Vorbis perhaps?).  Good music players and metadata tools will let you edit the values by hand, although really you don't want to do that.  If there is something wrong with the replaygain data in the files now, or it is missing, just re-analyse them and write the tags again.  Other than that, I'm really struggling to see what your problem is.  You keep complaining, but haven't really explained what you want to do that you can't.

VLC, so far as I know, won't analyse and write replaygain tags.  Get a proper music player or standalone tool.  There are plenty.

Re: MP3gain alternative.. ReplayGain?

Reply #10
Quote
Also, I still don't understand why 0db on some scales is an inaudible low level and on others means extra loud.
Decibels are relative and you always need a reference.

The digital reference of 0dBFS (zero decibels full scale) is the "digital maximum"* so digital dB levels are usually negative.  (Floating-point digital can go over 0dBFS.)

The acoustic sound pressure level (the loudness you hear with your ears) is 0dB SPL and that 's approximately the quietest sound humans can hear so dB SPL levels are usually positive.

Quote
Is there a conversion table or something?
There is no standard calibration/conversion because we all have a volume control and my speakers are bigger than yours!  ;)  

ReplayGain does  have a conversion, but I don't remember exactly what it is.   The reason RelayGain needs a calibration/conversion is because in order to match loudness you need to know how loud you're listening, and that's because of the Equal Loudness Curves.   Complicated stuff!)

Although there is generally no calibration, there is a direct correlation...   If you decrease the digital level by 3dB the acoustic loudness will also decrease by 3dB, etc.


Quote
(I used 90db).
FYI - Many (most?) songs, including quiet sounding songs, are already 0dB peak-normalized.  That means you can't go any louder without clipping (distortion).   So, if you want to match volumes you have to (mostly) make the loud songs quieter, rather than making the quiet songs louder (if you want to avoid clipping.)

With some quiet-sounding songs you won't be able to hit the target level (87 or 90dB) without clipping.

If you don't allow clipping (a ReplayGain option) some songs won't be touched at all.  

When you increase the target volume (to 90dB or higher) MORE songs in your library either won't be adjusted (or won't be adjusted enough), or if you allow clipping MORE songs will be distorted.

The 87dB level is a compromise that allow most songs to be volume-matched while (hopefully) still giving you enough volume.   (Of course the actual listening-volume depends on the analog electronics and your speakers or headphones and if you've got enough analog gain the digital level is not too important.)

In other words, when you set a higher target level you are leaving ReplayGain "less room to work".




---------------------------------------------------------------------------------
*  0dBFS is the digital maximum for integer formats, analog-to-digital converters, digital-to-analog converters, etc.     For floating-point audio the 0dB reference is 1.0 and it can go way-way over 0dB.  For all practical purposes floating point audio has no upper or lower limit. 

For example, with 16-bits you can "count" from −32,768 to 32,767.  If the positive & negative peaks hit those values that's 0dB (peak) and you simply can't go any higher.  That's the peak level, not the RMS or average and it doesn't correlate well with perceived loudness.

 If the "numbers" are all zeros, that's "digital dead silence" and -infinity dB.  

The "numbers" are smaller with 8-bits and bigger with 24-bits, but everything is scaled for the ADC & DAC so a 0dB 8-bit file plays just as loud as a 0dB 24-bit file. 

Zero is "digital dead silence or -infinity dB.

Re: MP3gain alternative.. ReplayGain?

Reply #11
I'm really struggling to see what your problem is.  You keep complaining, but haven't really explained what you want to do that you can't.
I'm just trying to understand the options, but they all seem limited.
I'm kinda baffled that no comprehensive program has been created after a decade or more.
And when I said "editing the RP metadata", I didn't mean manually, but massively through a program.

Anyway, thanks for the suggestions and explanations guys.

Re: MP3gain alternative.. ReplayGain?

Reply #12
I'm still baffled.  You claim there is no comprehensive program.  What is fb2000?  It will automatically apply replaygain, in line with just about any settings you can dream up, to every music track you have, both track and album gain, all in one go if you want.  Is that not comprehensive enough?  There are other programs, too, that will produce similar results.  There are also standalone analysers for various codecs.  For example, the Linux flac encoder will do replaygain for you, and there is vorbisgain too.  I'm really not sure what you're looking for that doesn't already exist.

Re: MP3gain alternative.. ReplayGain?

Reply #13
I'm still baffled.  You claim there is no comprehensive program.  What is fb2000?  It will automatically apply replaygain, in line with just about any settings you can dream up, to every music track you have, both track and album gain, all in one go if you want.  Is that not comprehensive enough?  There are other programs, too, that will produce similar results.  There are also standalone analysers for various codecs.  For example, the Linux flac encoder will do replaygain for you, and there is vorbisgain too.  I'm really not sure what you're looking for that doesn't already exist.
In summary:
- I was looking for an MP3gain (UI, edits files directly losslessly, changes volume to a N value avoiding clipping, mass scans & edits in a few clicks) but for all files.
- it seems that it doesn't exists and that RG in players or metadata are more commonly used.
- WAVgain is useless for me, because I don't have WAVs.
- VorbisGain is command line and well, only limited to .ogg (vorbis). So it's a partial inconvenient solution.
- I'm on Windows, so no "Linux flac encode".
- Foobar is a player, but I guess it has an additional RG function? It's good that it support MP3, Opus, AAC (no flac and ogg?) but sadly you said that it only supports MKV and MP4, and I don't want to convert audio files to containers common for videos.
- if there are more comprehensive programs than these, please suggest them. ¯\_(O_o)_/¯

Re: MP3gain alternative.. ReplayGain?

Reply #14
Quote
Thanks, but I'd like to apply ReplayGain directly to the files (e.g: changing metadata) instead of only to a player, so they'll keep their volume on different devices or after a conversion.
That's contradictory...   MP3Gain changes the actual MP3/MPEG audio data.   But it's done by changing some information in the MPEG frame-headers so it's non-lossy and reversible. 

ReplayGain writes metadata without touching the actual audio data at all.

Quote
Is this possible?
I'm not aware of a program that works on more than one format.   You'd need to use WaveGain for WAV files, etc.   

Audacity has a "ReplayGain" type plug-in (it may be an "unofficial" plug-in) and Audacity works with almost any audio format (with the optional FFmpeg import/export library).    But, like all "regular" audio editors, compressed audio gets decompressed when you open it and you go through another generation of lossy compression if you re-export in a lossy format.    And, I'm not sure if you can automate it.

There are LUFS loudness scanner plug-ins for DAWs & audio editors, but these generally just scan/check the loudness and it's up to you to make any desired changes.

Re: MP3gain alternative.. ReplayGain?

Reply #15
 
Quote
I'm on Windows, so no "Linux flac encode".
FLAC is lossless so you can convert to WAV and back losslessly.  (Yes, it's a couple of extra steps and there could be some "complications" with existing metadata.)

You can convert ANY format to WAV and then run WaveGain, but lossy files will go through an extra generation of lossy compression.  Or you can convert EVERYTHING to MP3 and use MP3Gain.

Quote
- Foobar is a player, but I guess it has an additional RG function? It's good that it support MP3, Opus, AAC (no flac and ogg?) but sadly you said that it only supports MKV and MP4, and I don't want to convert audio files to containers common for videos.
Foobar 2000 can play almost anything!  But, that doesn't matter if you're going to change the actual loudness of the files.

Re: MP3gain alternative.. ReplayGain?

Reply #16
- I was looking for an MP3gain (UI, edits files directly losslessly, changes volume to a N value avoiding clipping, mass scans & edits in a few clicks) but for all files.
- it seems that it doesn't exists and that RG in players or metadata are more commonly used.
With most formats that's simply not possible. MP3 and AAC are the few exceptions that allow manipulating gain afterwards. In Opus that is achieved by a simple gain value in header.

- WAVgain is useless for me, because I don't have WAVs.
- VorbisGain is command line and well, only limited to .ogg (vorbis). So it's a partial inconvenient solution.
- I'm on Windows, so no "Linux flac encode".
- Foobar is a player, but I guess it has an additional RG function? It's good that it support MP3, Opus, AAC (no flac and ogg?) but sadly you said that it only supports MKV and MP4, and I don't want to convert audio files to containers common for videos.
- if there are more comprehensive programs than these, please suggest them. ¯\_(O_o)_/¯
foobar2000 can do everything you mentioned above. I wasn't clear enough in my earlier comment with the Matroska and MP4 support. It means foobar2000's permanent file altering of loudness (like MP3Gain does) can be done for Opus, MP3 and AAC. For Opus its native Ogg container is supported and Opus in Matroska should work too. For MP3 its native .mp3 format works and it should also work in MP4 and Matroska. AAC in raw ADTS stream (.aac) doesn't seem supported but AAC in MP4 is and Matroska should be. Normal regular ReplayGain scanning that writes metadata works for absolutely everything.

Re: MP3gain alternative.. ReplayGain?

Reply #17
With most formats that's simply not possible. MP3 and AAC are the few exceptions that allow manipulating gain afterwards. In Opus that is achieved by a simple gain value in header.

foobar2000 can do everything you mentioned above. I wasn't clear enough in my earlier comment with the Matroska and MP4 support. It means foobar2000's permanent file altering of loudness (like MP3Gain does) can be done for Opus, MP3 and AAC. For Opus its native Ogg container is supported and Opus in Matroska should work too. For MP3 its native .mp3 format works and it should also work in MP4 and Matroska. AAC in raw ADTS stream (.aac) doesn't seem supported but AAC in MP4 is and Matroska should be. Normal regular ReplayGain scanning that writes metadata works for absolutely everything.
Ah, this is good news, thanks.
Then I'll try Foobar2k and its RG functions.
However, can it: scan & modify multiple files (e.g: drag&drop\playlist\folder), avoid clipping, overwrite files instead of creating copies?
Too bad that Flac is left out tho.

Re: MP3gain alternative.. ReplayGain?

Reply #18
What is it that you want to do with flac files, exactly???

Provide an example.
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

Re: MP3gain alternative.. ReplayGain?

Reply #19
If you were on Linux, you could use my loudgain which currently handles FLAC, Ogg Vorbis and MP3 and uses The EBU R128-based ReplayGain 2 algorithm.

Re: MP3gain alternative.. ReplayGain?

Reply #20
@phaolo: There are three different things here.

#1 ReplayGain tags in the metadata section. That is instruction to the player to say "when you have decoded this, adjust level by xx upon playing".
Good: can be changed if they are wrong or missing, can be re-done when a better algorithm comes up.
Changeable with "any" tagger, provided the format is tag-able.
Bad: quite a few players are simply too retarded to support it.

#2 Gain control in the format itself. MP3 has that, AAC has that, and Opus has that.
Good: can be changed - in rough (but fine enough for most purposes!) increments. Lossless apart from volume change (well, you can willfully f*ck it up).
Not changeable with a common tagger, requires some special tool.
Bad: changes more than the file in a way that makes it not so easy to understand what is going on.

#3 File volume. Say, in WAV.
Bad: Reencodes the file, i.e. changes it. But as long as the original file is lossless and you don't change extremely much, the risk of quality loss is small.
NOTE BELOW: less often as necessary with lossless files as with floating-point lossy formats like MP3/AAC.


MP3Gain does two things to #2: scan to determine volume, and apply the change to the file. A player like foobar2000 can achieve the same by first running #1 to determine volume (and write it to tags), and then with a second command apply the changes to the file.


As for the "NOTE": WAV/FLAC have a defined maximum volume. MP3/AAC do not: it can happen that it is too loud and will clip if played at "full" volume. That makes a case for doing #1 or #2, and if you have to use a player that does not support ReplayGain: do #2.
It is unclear whether you have any case for doing the same with FLAC files; see Greynol's answer in Reply #18.
The "problem" is that if you adjust gain on mp3s only, they will often not be as your WAVs/FLACs, due to the target level. There are ways to fix it though.
High Voltage socket-nose-avatar

Re: MP3gain alternative.. ReplayGain?

Reply #21
#1 ReplayGain tags in the metadata section. [..]
#2 Gain control in the format itself. MP3 has that, AAC has that, and Opus has that. [..]
#3 File volume. Say, in WAV.  [..]
MP3Gain does two things to #2: scan to determine volume, and apply the change to the file. A player like foobar2000 can achieve the same by first running #1 to determine volume (and write it to tags), and then with a second command apply the changes to the file.
Thanks for the additional explanation.
I'd be fine with using #2 for formats that support it (maybe add a #1 metadata too for compatibility?) and #1 for everything else.
What I'm looking for is having files with a defined consistent volume level on different devices (as much as possible).
(btw I originally thought that MP3Gain did #3 in a lossy way somehow)

It is unclear whether you have any case for doing the same with FLAC files; see Greynol's answer in Reply #18.
The "problem" is that if you adjust gain on mp3s only, they will often not be as your WAVs/FLACs, due to the target level. There are ways to fix it though.
I didn't understand the problem about Flac at all, though (and so Greynol's comment).
Doesn't it support any RG metadata? Or it's just that Foobar doesn't scan&edit it and there isn't any other method on Windows? (which would be annoying)


Re: MP3gain alternative.. ReplayGain?

Reply #22
It’s a tag. You can edit it. I think it’s a bad idea, but you can edit it.

Better: configure the preamp gain in foobar2000 to add that measly 1dB for converting and/or playback.
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

Re: MP3gain alternative.. ReplayGain?

Reply #23
I didn't understand the problem about Flac at all, though (and so Greynol's comment).
Doesn't it support any RG metadata? Or it's just that Foobar doesn't scan&edit it and there isn't any other method on Windows? (which would be annoying)

I may be missing the point here, but just to (I think) clarify. One can certainly add ReplayGain metadata tags to FLAC files.  foobar2000 will do this as well as many other programs.  And many programs will play back those FLAC files, using the RG tag, including foobar2000.

Re: MP3gain alternative.. ReplayGain?

Reply #24
OP:

Pretty much every format can get tagged. Pretty much every format can get ReplayGain tags.
Issue is: are you using a player that can reads and honors the ReplayGain tags upon playback? If you are willing to switch to a player that does so, then problem solved without changing anything but tags. Many here use foobar2000, but you should get other advice at this forum.

If you want to use a player that does not honor ReplayGain tags (my in-car player does not ...), then you might consider if the volume differences are so bad that you would start altering files. For in-car use, I make lossy files that are totally expendable, so I don't worry about any "irreversibilities". Anyway:
* With MP3/AAC/Opus, you can alter files without re-encoding (thus you don't lose quality)
* With lossless formats you can re-encode and virtually not lose quality - though you should read a bit more fine print, and there are lots of reasons to leave your lossless files as they were (like, CD rips blah blah blah).


Now here is the "problem": ReplayGain usually tells your player to reduce volume. Among my CD rips, the typical reduction is 7 dB. So if I would only alter my mp3s, a non-ReplayGain player would play them at 7 dB lower volume than they would play my FLACs.

Meaning: you should be a bit clearer about what you think you want to achieve, and then you might get better help at how to achieve it.
High Voltage socket-nose-avatar

 
SimplePortal 1.0.0 RC1 © 2008-2019