Help - Search - Members - Calendar
Full Version: adding replaygain from the command line?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
billbill
I would very much like to add replaygain to all my mp3 files. I know I can open up mp3s in foobar2000 and add replaygain from there. But there are a bunch of other things that also need to be done to them and I would like to cut down the number of manual steps. I would instead like to automate the whole process with a batch utility.

Is there any way I can add replaygain to my mp3s from the command line? Can this be done with foobar2000? Is there a standalone utility for adding replaygain to mp3s? I've looked around, but I can't find any info on this topic.
Jan S.
Check cmd version of mp3gain:
http://mp3gain.sourceforge.net/download.php
billbill
I hadn't noticed that, thanks.

Still, I was hoping not to use MP3Gain. It is my understanding that this changes the audio of the mp3 somehow. I would only like to change the tags if possible. I use these mp3s in many different places and I would like to have the option of not using the replaygain info.
Jan S.
QUOTE(billbill @ Mar 11 2004, 08:15 PM)
I hadn't noticed that, thanks. 

Still, I was hoping not to use MP3Gain.  It is my understanding that this changes the audio of the mp3 somehow.  I would only like to change the tags if possible.  I use these mp3s in many different places and I would like to have the option of not using the replaygain info.

Later version of MP3gain can add the info to tags too.
I haven't tried using it though.
Hanky
A follow up question:
Recent LAME versions add replaygain info to the produced mp3 files. It would be useful if mp3gain used this instead of the time consuming analysis process.
billbill
I did some tests with mp3gain and it might work for my needs. I was able to verify that it is possible to use mp3gain to add replaygain info to apev2 tags without touching the audio portion at all (I used a hex editor to verify this). In the GUI mode (using 89.0dB), I did this by chosing "Album Analysis" and in command mode I did it by using mp3gain.exe "file1" "file2" "file3" ...

I ran the command line utility on copies of 6 albums and I also ran replaygain through foobar on 6 other copies of these albums. I was kind of disappointed because although the results are close to foobar's, they are not exactly the same. I guess they use slightly different algorithms to compute the results. Most differences look like they are due to rounding, but some are off by more than that.

Here are some examples of the apev2 tags these methods produced:

CODE
/mp3gain/Bob Segar - 1975 - Beautiful Loser/01 - Beautiful Loser.mp3
replaygain_album_gain: "-3.460000 dB"
replaygain_track_gain: "-1.880000 dB"
replaygain_track_peak: "0.919048"
replaygain_album_peak: "1.057503"
mp3gain_minmax: "128,210"
mp3gain_album_minmax: "128,210"

/foobar/Bob Segar - 1975 - Beautiful Loser/01 - Beautiful Loser.mp3
replaygain_album_gain: "-3.45 dB"
replaygain_track_gain: "-1.84 dB"
replaygain_track_peak: "0.919048"
replaygain_album_peak: "1.057502"


CODE
/mp3gain/Bob Seger - 1972 - Smokin' O.P.'s/01 - Bo Diddley.mp3
replaygain_album_gain: "-8.540000 dB"
replaygain_track_gain: "-8.810000 dB"
replaygain_track_peak: "1.182291"
replaygain_album_peak: "1.309607"
mp3gain_minmax: "132,210"
mp3gain_album_minmax: "060,210"

/foobar/Bob Seger - 1972 - Smokin' O.P.'s/01 - Bo Diddley.mp3
replaygain_album_gain: "-8.46 dB"
replaygain_track_gain: "-8.71 dB"
replaygain_track_peak: "1.182291"
replaygain_album_peak: "1.309606"

/mp3gain/Bob Seger - 1972 - Smokin' O.P.'s/02 - Love the one you're with.mp3
replaygain_album_gain: "-8.540000 dB"
replaygain_track_gain: "-9.400000 dB"
replaygain_track_peak: "1.168578"
replaygain_album_peak: "1.309607"
mp3gain_minmax: 092,210
mp3gain_album_minmax: "060,210"

/foobar/Bob Seger - 1972 - Smokin' O.P.'s/02 - Love the one you're with.mp3
replaygain_album_gain: "-8.46 dB"
replaygain_track_gain: "-9.36 dB"
replaygain_track_peak: "1.168578"
replaygain_album_peak: "1.309606"


CODE
/mp3gain/Bob Seger - 1976 - Live Bullet/01 - Nutbush City Limits.mp3
replaygain_album_gain: "-2.680000 dB"
replaygain_track_gain: "-3.120000 dB"
replaygain_track_peak: "0.993038"
replaygain_album_peak: "1.011196"
mp3gain_minmax: "102,210"
mp3gain_album_minmax: 093,210

/foobar/Bob Seger - 1976 - Live Bullet/01 - Nutbush City Limits.mp3
replaygain_album_gain: "-2.68 dB"
replaygain_track_gain: "-3.20 dB"
replaygain_track_peak: "0.993037"
replaygain_album_peak: "1.011195"


CODE
/mp3gain/Bob Seger - 1976 - Night Moves/01 - Rock N Roll Never Forgets.mp3
replaygain_album_gain: "-1.550000 dB"
replaygain_track_gain: "-2.790000 dB"
replaygain_track_peak: "0.993942"
replaygain_album_peak: "0.993942"
mp3gain_minmax: "117,210"
mp3gain_album_minmax: 090,210

/foobar/Bob Seger - 1976 - Night Moves/01 - Rock N Roll Never Forgets.mp3
replaygain_album_gain: "-1.53 dB"
replaygain_track_gain: "-2.76 dB"
replaygain_track_peak: "0.993941"
replaygain_album_peak: "0.993941"


CODE
/mp3gain/Bob Seger - 1976 - The Distance/01 - Even Now.mp3
replaygain_album_gain: "-1.880000 dB"
replaygain_track_gain: "-3.740000 dB"
replaygain_track_peak: "0.923168"
replaygain_album_peak: "0.944383"
mp3gain_minmax: 082,210
mp3gain_album_minmax: 058,210

/foobar/Bob Seger - 1976 - The Distance/01 - Even Now.mp3
replaygain_album_gain: "-1.88 dB"
replaygain_track_gain: "-3.72 dB"
replaygain_track_peak: "0.923168"
replaygain_album_peak: "0.944383"
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.