PDA

View Full Version : MP3Gain, MP3Tag, iTunes craziness



eschurr
2007-01-28, 09:41
I've been using MP3Gain to normalize my MPE file sound volume, but I've noticed some weird things happening with MP3Gain and iTunes with SS and wondered if someone could guide me. I've read tons of postings here about ReplayGain, etc. but can't find the answer to this one.

Here's a sample workflow to illustrate the issue:
1. rip CD using iTunes to MP3.
2. Examine file using MP3Tag. FIilecontains many tag values, all in ID3V2.2. It also contains an ITunNorm tag, which i wish it did not have, because i prefer ReplayGain tags, but that's another issue.
3. use MP3Gain to compute and create ReplayGain values.
4. Examine file using MPETag. It now says the current tag is APEv2 (i think MP3Gain writes APEv2 tags) and also indicates the file contains ID3v2.2 tags. But it shows no valus for artist, title, etc. And viewing the Extended Tags only shows the tags MP3Gain wrote (ReplayGain, etc) and not the iTunNorm tag or anything else (title, artist, etc -- but they are all still displayed in iTunes)

-- Why would MP3Tag not show the values in the tags?
-- Does MP3Gain do something nasty to those values?

SteveEast
2007-01-28, 09:57
Have you got Mp3tag set to show ALL tag types in the songs? You need to have the "Tags in File" column (%_tag%) showing.

You can use Mp3tag to strip all those annoying ITunNorm tags.

Steve.

eschurr
2007-01-28, 10:02
yes, i do have it set to read all tags. and the "tags in file" column is displayed, and it says the file contains APEv2 and ID3v2.2 tags.

I have used MP3Tag to strip the iTunNorm tag in the past, but after running MP3Gain over the file the iTunNorm tag doesn't show in MP3Tag. I doubt MP3Gain removes it. But if i can't see it in MP3Tag i can't remove it!

Argh. All the variations on this tagging stuff is really confusing.

eschurr
2007-01-28, 17:49
Can anyone explain this?

I have a sample MP3 file where SlimServer shows a volume adjustment value of -13.50 (i think it came from an iTunNorm tag).

Check this out:

1. use MP3Tag to delete the iTunNorm tag. There were no ReplayGain values in the files.
2. In Slimserver, clear library, rescan
3. Slimserver shows no volume adjustment (this makes sense)
4. In MP3Gain, load the track. Run track analysis. it shows a track adjustment value of -4.5
5. Go to MP3Tag for the same file. It shows a ReplayGain value of -9.26!
6. Go to Slimserver: clear library, rescan
7. Slimserver shows a volume adjusment value of -9.26 (this matches what MP3Tag shows, but is different than what MP3Gain shows, wich generated the value)
8. In Foobar2000, advanced edit: shows ReplayGain value of -4.745 (this matches what MP3Gain showed during Track Analysis but is different from MP3Tag and Slimserver)
9. MP3Gain: Undo, remove tags from files
10. MP3Tag: no replay gain value (makes sense)
11. Foobar2000: no replay gain value (makes sense)
12. Foobar2000: scan per-file track gain. shows value of -9.27
13. MP3Tag: shows replaygain value of -9.27
14. MP3Gain: Track analysis shows value of -4.5 (huh?)
15. MP3Tag: shows ReplayGain value of -4.5
16. FooBar2000 advanced edit: shows value of -9.27
17 SlimServer. Clear library, rescan.
18. Slimserver: volume adjustment value of -4.75

What is going on here?

thesil
2007-01-28, 20:41
I am not being facetious here, but isn't about the music? If it aint broke, don't fix it; just enjoy the tunes, INMHO

DrNic
2007-01-29, 10:48
Can anyone explain this?

I have a sample MP3 file where SlimServer shows a volume adjustment value of -13.50 (i think it came from an iTunNorm tag).

Check this out:

1. use MP3Tag to delete the iTunNorm tag. There were no ReplayGain values in the files.
2. In Slimserver, clear library, rescan
3. Slimserver shows no volume adjustment (this makes sense)
4. In MP3Gain, load the track. Run track analysis. it shows a track adjustment value of -4.5
5. Go to MP3Tag for the same file. It shows a ReplayGain value of -9.26!
6. Go to Slimserver: clear library, rescan
7. Slimserver shows a volume adjusment value of -9.26 (this matches what MP3Tag shows, but is different than what MP3Gain shows, wich generated the value)
8. In Foobar2000, advanced edit: shows ReplayGain value of -4.745 (this matches what MP3Gain showed during Track Analysis but is different from MP3Tag and Slimserver)
9. MP3Gain: Undo, remove tags from files
10. MP3Tag: no replay gain value (makes sense)
11. Foobar2000: no replay gain value (makes sense)
12. Foobar2000: scan per-file track gain. shows value of -9.27
13. MP3Tag: shows replaygain value of -9.27
14. MP3Gain: Track analysis shows value of -4.5 (huh?)
15. MP3Tag: shows ReplayGain value of -4.5
16. FooBar2000 advanced edit: shows value of -9.27
17 SlimServer. Clear library, rescan.
18. Slimserver: volume adjustment value of -4.75

What is going on here?

Hi
Does this not just show the difference between the reference values set between ReplayGain & MP3Gain?
MP3Gain can have a user defined value therefore when you are IN that program if you analyse the track and your reference value is set to 93dB - the values in the list below it are referenced to this value. Going into MP3Tag or Foobar - shows you the stored "replaygain" value which is always referenced to 89dB (I think).
MP3Gain will let you change the reference point (as said above) but his only works when the value is written to the file (ie the track data is altered - rather than reading a value from a tag). Otherwise the analysis value stored to tag is like the value stored to tag from Foobar's Replaygain...

Hope that makes some sense!!

Nic

DrNic
2007-01-29, 10:50
I am not being facetious here, but isn't about the music? If it aint broke, don't fix it; just enjoy the tunes, INMHO

Respectfully - 1) this doesn't help the Original Poster, and 2) volume normalisation might be extremely important to some to enjoy "the music", particularly if people listen in random mode etc.

Nic

thesil
2007-01-29, 12:11
No offense intended

eschurr
2007-01-29, 19:06
None taken. :)

this article was VERY interesting. http://www.hydrogenaudio.org/forums/index.php?showtopic=24527&st=0

it leads me to wonder: why screw around with ReplayGain tags? Why not just use MP3Gain to volume adjust the files so they play the same volume in SB and all other MP3 players? is there somee downside to this?

Also DrNic: thanks for your comments. I did not realize that Foobar2000 always uses 89db. That would explain something.

Mark Lanctot
2007-01-30, 07:33
MP3Gain will let you change the reference point (as said above) but his only works when the value is written to the file (ie the track data is altered - rather than reading a value from a tag). Otherwise the analysis value stored to tag is like the value stored to tag from Foobar's Replaygain...

Playing around with the MP3Gain GUI, I don't know. I can alter the reference level at any time. It appears that all it needs is one "analysis" pass, either during that session or before. In the file it appears to store a value that it places in its "volume" column, the "track gain" column is simply a difference between the volume value and the reference value you type in at the top.

So when you open the GUI, the volume and gain values pop up instantly for files that were previously analyzed. If there's been no analysis, there won't be any volume/gain values until they are analyzed.

When you change the reference value, note that the gain values change instantly without rewriting the files (in fact they change as you type) - this is indicating it's an in-session instant calculation based on the difference between the new reference value and the volume value. But this new adjustment won't be saved in the file unless you do a track analysis again.

The gain button operates the same but performs both the analysis and alters the volume bits. So the next time you view such files, you'll always see a gain of 0 because the file's volume has actually been altered to your reference value. It will only indicate anything other than 0 if your reference value isn't what you used when you altered the file's volume the first time.

thing-fish
2007-01-30, 08:20
None taken. :)

this article was VERY interesting. http://www.hydrogenaudio.org/forums/index.php?showtopic=24527&st=0

it leads me to wonder: why screw around with ReplayGain tags? Why not just use MP3Gain to volume adjust the files so they play the same volume in SB and all other MP3 players? is there somee downside to this?

That really is interesting. I always thought that MP3Gain = ReplayGain. From that article, it appears not!

eschurr
2007-01-30, 09:15
thanks -- that's consistent with my experience, too.

I can't see any reason to write ReplayGain tags (which only work with smart devices like a Squeezebox) as vs. adjusting the Gain on the file so it plays at the desired level on ANY playback device (like an iPod).

Can you?

DrNic
2007-01-30, 09:54
thanks -- that's consistent with my experience, too.

I can't see any reason to write ReplayGain tags (which only work with smart devices like a Squeezebox) as vs. adjusting the Gain on the file so it plays at the desired level on ANY playback device (like an iPod).

Can you?

Well, this depends if you are using a lossless compression (as I do). For MP3 you've already commited to lossing data - so altering the volume permanently really doesn't have a significant impact - other than if you have chosen to "write" the track gain values you won't be able to swap over to the "album" gain values without a re-write in the tags.
For lossless files performing the Replaygain alteration on the fly results in a playback that is not truely lossless anymore.
Writing the tags (rather than the file) is useful if you want to be able to switch between album & track gains "on the fly" for either format.
Hope that rambling makes some sense!!

Nic

eschurr
2007-01-30, 10:02
Your explanation makes a lot of sense.

it sounds like:

for MP3 files, adjusting the Gain directly is ok (certainly no worse than using MP3s in the first place) and will work for any device that plays MP3 (that's good).

for lossless formats (FLAC, etc) ReplayGain values are the way to go becasue they don't alter the musical part of the files.

Right?

Mark Lanctot
2007-01-30, 11:04
for lossless formats (FLAC, etc) ReplayGain values are the way to go becasue they don't alter the musical part of the files.

But of course, no tools exist that can alter the volume of lossless files the way MP3Gain can for MP3s.

Of course there are 'normalization' algorithms, but this is something else entirely and very undesireable.

Mark Lanctot
2007-01-31, 16:52
That really is interesting. I always thought that MP3Gain = ReplayGain. From that article, it appears not!

Right, I believe it uses the RG algorithm to calculate "loudness", but that's where the commonalities end - MP3Gain allows you to adjust the reference value and alter the actual audio.

I'm not familiar with all the ReplayGain tools out there for the various other formats, but I suspect those two features are unique.

eschurr
2007-02-25, 12:53
After some experimentation, I am confused and a bit skeptical of what i've read.

My goal is to modify my MP3 files to play at a consistent volume in my Squeezebox as well as my iPod without using ReplayGain. I want to know how to operate the MP3Gain GUI to do that.

one of the postings says that by hitting the "track analysis" button in MP3Gain it will modify the volume bits but not write ReplayGain tags. to write those tags, the posting says, you need to hit the TrackGain button.

however, after experimentation, i find that hitting Track Analysis does nothing except report the difference between the file's current volume and the target volume. the only way to implement the change is to hit the ReplayGain button -- which alters the volume in Squeezebox playback EVEN WITHOUT USING SQUEEZEBOX'S VOLUME ADJUSTMENT (TRACK GAIN).

Can anyone confirm or correct this -- please?

Mark Lanctot
2007-02-25, 13:16
You have two buttons: track analysis and track gain.

Track analysis merely writes the RG tags. So you need an RG-aware program like SlimServer to use the volume levelling function. Nothing will happen in iTunes/iPod, it's not RG-aware AFAIK.

Track gain will not only write the RG tags, it will also alter the audio, which means it can be used with non-RG-aware programs/players. If you play these files back in SS, you'll get levelled playback without using RG. If you use RG, you'll get a "double levelling", don't do this.

If this contradicts one of my earlier posts in this thread I'll correct that earlier post.

MrSinatra
2007-02-25, 14:11
good to know.

when i rip with EAC and lame 3.96 or above, it does seem to calcualte a replaygain value.

however, i can't find that value written in the tags at all, (using winamp or mp3tag)

am i doing something wrong? my best guess at this point is the value is not being written into the tag b/c i don't have a proper command line switch... is that feasible?

eschurr
2007-02-25, 14:28
Mark:

if what you say is correct, why:

-- does the MP3Gain help system indicate that the "Track analysis" button "analyzes the files" but it doesn't say anything about writing tags or values? it sounds to me like it reads and analyzes the file but doesn't write anything back to it.

-- doesn't Windows Explorer indicate the file has been modified whne you hit "track analysis?" it does when you hit "track gain." Wouldn't writing RG tags to the files with Track Analyis cause the file to be modified?

Just trying to understand!

jeffmeh
2007-02-25, 14:29
good to know.

when i rip with EAC and lame 3.96 or above, it does seem to calcualte a replaygain value.

however, i can't find that value written in the tags at all, (using winamp or mp3tag)

am i doing something wrong? my best guess at this point is the value is not being written into the tag b/c i don't have a proper command line switch... is that feasible?

It is probably in the LAME tag. I do not know what players can even use the Replaygain values in the LAME tag, but here is a link to a tool you can use to view it. http://phwip.f2o.org/audio#lametag

Also, you will not be able to see it through MP3Tag, AFAIK.

MrSinatra
2007-02-25, 15:11
yeah, mp3tag also doesn't seem to natively support "albumartist"

the weird thing is the newest winamp IS supposed to support replaygain, but i don't see it in winamp either.

i use both 1.1 and 2.3 id tags for my mp3s.

i downloaded ur suggestion, LameTagGUI and tried it out...

its petty sweet, if what it says is true.

here are the results for one of my AC-DC files:


>lametag.exe "AC-DC - 01 - It's A Long Way To The Top (If You Wanna Rock 'N' Roll).mp3"

LameTag - Reads the LAME tag from an mp3 file
Copyright (c) 2005 phwip
Release 0.4.1, compiled 2005-09-09

D:\mp3home\AC-DC\High Voltage [ReMaster]\AC-DC - 01 - It's A Long Way To The Top (If You Wanna Rock 'N' Roll).mp3
Tag revision: 0
Encoder string: LAME
Version string: 3.96r
Quality: 59 (V4 and q1)
Encoding method: cbr
Lowpass: 20,500Hz
RG track peak: <not stored>
RG track gain: -10.8dB (determined automatically)
RG album gain: <not stored>
nspsytune: yes
nssafejoint: yes
nogap continued: no
nogap continuation: no
ATH type: 4
Bitrate: 255 or higher
Encoder delay: 576 samples
Padded at end: 1,284 samples
Noise shaping: 1
Stereo mode: joint
Unwise settings: no
Source sample freq: 44.1kHz
MP3Gain change: <none>
Preset: cbr 256
Surround info: none
Music length: 9,667,395 bytes
Music CRC: B989
Actual Music CRC: B989
Info tag CRC: 4AC3
Actual InfoTag CRC: 4AC3

here is another AC DC tag:


>lametag.exe "AC-DC - 01 - Hells Bells.mp3"

LameTag - Reads the LAME tag from an mp3 file
Copyright (c) 2005 phwip
Release 0.4.1, compiled 2005-09-09

D:\mp3home\AC-DC\Back In Black [ReMaster]\AC-DC - 01 - Hells Bells.mp3
LAME tag not found.

what confuses me is that does have a lame tag.

why doesn't it see it?

also, the first file does list a replaygain value...

BUT how do i know SS is actually using it on playback?

i do have SS configured to "smart gain" but how do i verify it see's a value (or not) for any given file?

Mark Lanctot
2007-02-25, 15:52
-- does the MP3Gain help system indicate that the "Track analysis" button "analyzes the files" but it doesn't say anything about writing tags or values? it sounds to me like it reads and analyzes the file but doesn't write anything back to it.

It does write the results of its analysis in APEv2 tags. You can see this in two ways: (1) the program "remembers" the results of previous analyses, even after it's restarted, and (2) a separate tagger program like Mp3tag will clearly indicate that an APEv2 tag has been added after a track analysis is carried out. You can see this immediately if you have both programs open at the same time - look at the tag types in Mp3tag, modify the gains in MP3Gain, and when you refresh in Mp3tag, poof, APEv2 tags appear in the analyzed files. Foobar indicates the same thing.

In fact, if you were to use a tagger to remove the APEv2 tags, I bet MP3Gain would "forget" its analysis.

The MP3Gain documentation is skimpy - I don't think they even indicate what type of tags they use.


-- doesn't Windows Explorer indicate the file has been modified whne you hit "track analysis?" it does when you hit "track gain." Wouldn't writing RG tags to the files with Track Analyis cause the file to be modified?

Hmm, it should - you are modifying bits in the file. I don't doubt what you're saying, but the fact remains, the RG tags have been added. Some tagging programs can change tags while NOT altering the timestamp - perhaps MP3Gain operates this way?

Mark Lanctot
2007-02-25, 15:55
BUT how do i know SS is actually using it on playback?

i do have SS configured to "smart gain" but how do i verify it see's a value (or not) for any given file?

I believe it's in the file info - click on the file, and if you see a volume adjustment or album volume adjustment value, SS sees it.

It doesn't seem to see LAME RG tags, but LAME RG tags seem to be supported by very few programs. It's a shame, FLAC RG tagging at encode time works very well.

MrSinatra
2007-02-26, 11:49
I believe it's in the file info - click on the file, and if you see a volume adjustment or album volume adjustment value, SS sees it.

u mean drill down to a song in SS?

when i do that, i see this:


SongInfoSong Info for Killer On The Rampage
--------------------------------------------------------------------------------
Play this song
Add this song to the playlist

Title: Killer On The Rampage
Artist: Eddy Grant
Band/Orchestra: Eddy Grant
Composer: Eddy Grant
Album: Killer On The Rampage
Genre: Reggae
Track: 6
File Format: MP3
Duration: 3:30
Year: 1982
Comment: Track 6
File Length: 6,742,769 Bytes
Bitrate: 256kbps VBR
Sample Rate: 44.1 kHz
ID3 Tag Version: ID3v2.3.0
Location: D:\mp3home\Eddy Grant\Killer On The Rampage\Eddy Grant - 06 - Killer On The Rampage.mp3 (Download)
Date Modified: Thu, 22 Feb 2007, 16:52:35
Artwork:

so, no mention of any gain that i see...

however, if i check the file with the utility lametagGUI, i get this info:


>lametag.exe "Eddy Grant - 06 - Killer On The Rampage.mp3"

LameTag - Reads the LAME tag from an mp3 file
Copyright (c) 2005 phwip
Release 0.4.1, compiled 2005-09-09

D:\mp3home\Eddy Grant\Killer On The Rampage\Eddy Grant - 06 - Killer On The Rampage.mp3
Tag revision: 0
Encoder string: LAME
Version string: 3.97
Quality: 59 (V4 and q1)
Encoding method: cbr
Lowpass: 19,700Hz
RG track peak: <not stored>
RG track gain: -0.4dB (determined automatically)
RG album gain: <not stored>
nspsytune: yes
nssafejoint: yes
nogap continued: no
nogap continuation: no
ATH type: 4
Bitrate: 255 or higher
Encoder delay: 576 samples
Padded at end: 1,296 samples
Noise shaping: 1
Stereo mode: joint
Unwise settings: no
Source sample freq: 44.1kHz
MP3Gain change: <none>
Preset: cbr 256
Surround info: none
Music length: 6,738,337 bytes
Music CRC: 34F5
Actual Music CRC: 34F5
Info tag CRC: 278A
Actual InfoTag CRC: 278A

and it says -0.4

so it looks like for any of my files that do have this value, SS doesn't see them, why?

what is SS supposed to see, if not these values?


It doesn't seem to see LAME RG tags, but LAME RG tags seem to be supported by very few programs. It's a shame, FLAC RG tagging at encode time works very well.

i might have misspoke in an earlier post...

are "LAME Tags" different and separate from IDv2.3 type tags?

kdf
2007-02-26, 12:10
Quoting MrSinatra <MrSinatra.2mmldb1172515801 (AT) no-mx (DOT) forums.slimdevices.com>:


>> RG track gain: -0.4dB (determined automatically)

> so it looks like for any of my files that do have this value, SS
> doesn't see them, why?

my guess is that the note, "determined automatically" is lametagGUI
inserting the value on the fly for the display, instead of it being a
value stored in the tags. Mind you, this is just a guess, as I'm not
familiar with lametagGUI, but it would be a simple explanation of why
slimserver isn't seeing the value.

> what is SS supposed to see, if not these values?

Slimserver does nothing to determine or set the relpalygain values; it
only reads tags and will only display them in songinfo if the tags
have values.

Have you tried using Foobar? Does lametagGUI have any option for
storing the replay gain values?

-kdf

jeffmeh
2007-02-26, 12:25
u mean drill down to a song in SS?

when i do that, i see this:



so, no mention of any gain that i see...

however, if i check the file with the utility lametagGUI, i get this info:



and it says -0.4

so it looks like for any of my files that do have this value, SS doesn't see them, why?

what is SS supposed to see, if not these values?



i might have misspoke in an earlier post...

are "LAME Tags" different and separate from IDv2.3 type tags?

Yes, the LAME Tag is different and separate from IDv2.3 type tags. The SlimServer will not use the Replaygain values in the LAME Tag. If you want to use Replaygain with MP3 files, you can use MP3Gain or Foobar, each of which should write to tags SlimServer can use.

Mark Lanctot
2007-02-26, 12:42
u mean drill down to a song in SS?

when i do that, i see this:

so, no mention of any gain that i see...

Yup, it's not there. Here's an example of one it can see, although it's FLAC:



Home / Song Info for The Lonely End of the Rink
Play this song
Add this song to the playlist

*
Title:
The Lonely End of the Rink
*
Artist:
The Tragically Hip
*
Album:
World Container
*
Genre:
Rock
*
File Format:
FLAC
*
Duration:
3:51
*
Volume Adjustment:
-9.19 dB
*
Album Volume Adjustment:
-8.95 dB
*
File Length:
27,278,968 Bytes
*
Bitrate:
944kbps CBR
*
Sample Rate:
44.1 kHz
*
Location:
K:\My Music\The Tragically Hip\World Container\The Lonely End of the Rink.flac (Download)
*
Date Modified:
Saturday, December 9, 2006, 2:46 PM


however, if i check the file with the utility lametagGUI, i get this info:

and it says -0.4

so it looks like for any of my files that do have this value, SS doesn't see them, why?

As others have said, the LAME RG tag is non-standard so SS doesn't see it, along with almost every other player out there. It'd be nice if it could (one less step in encoding), but SS is far from alone in not supporting it. Also LAME does not seem to have much control over how it writes RG values - they seem to be placed there automatically whether you want it to or not, so I'd rather not rely on it.

SS can see RG tags written with MP3Gain and foobar.

MrSinatra
2007-02-26, 14:00
jeffmeh: thx, good to know! more below:


Quoting MrSinatra <MrSinatra.2mmldb1172515801 (AT) no-mx (DOT) forums.slimdevices.com>:


>> RG track gain: -0.4dB (determined automatically)

> so it looks like for any of my files that do have this value, SS
> doesn't see them, why?

my guess is that the note, "determined automatically" is lametagGUI
inserting the value on the fly for the display, instead of it being a
value stored in the tags. Mind you, this is just a guess, as I'm not
familiar with lametagGUI, but it would be a simple explanation of why
slimserver isn't seeing the value.

kdf, u should definitely check out lametagGUI, its a very nice app that doesn't "install" on your system, you just nav to a mp3, double click it, and it immediately shows you whats in the lame tag.

http://phwip.f2o.org/audio#lametag

the site is a bit slow, but its worth it.

based on how fast it does this, nearly instantaneously, (and how small the app is and just generally how it feels) i think it is showing you info in the LAME tag, not doing any calculations. i think "determined automatically" is a reference to Lame 3.9x determining that value at the time of encoding.

but i could just as easily be wrong on all these assumptions.

i'm a bit confused when u say this:


...but it would be a simple explanation of why
slimserver isn't seeing the value.

lets for the sake of argument assume my assumption is right, and the value IS in there, [in the lame tag].

i gather from what all of you are saying, that even if it were there [in the lame tag], SS wouldn't see it anyway, right? b/c SS apparently either ignores LAME tags altogehter, OR it ignores ReplayGain values in LAME tags at the very least.

...is that correct?


> what is SS supposed to see, if not these values?

Slimserver does nothing to determine or set the relpalygain values; it
only reads tags and will only display them in songinfo if the tags
have values.

ok, but does that mean in ID3v2.3 tags? as opposed to being in LAME tags?


Have you tried using Foobar? Does lametagGUI have any option for
storing the replay gain values?

-kdf

as far as i can see, lametagGUI has no editing ability whatsoever. i think it is strictly a reader of lame tags, thats it. [i could be wrong]

i haven't tried foobar b/c:

i am concerned from this thread and other things i read, i might hit a button and it'll change the audio file itself, which isn't what i want to happen.

i simply want the gain for each file adjusted on playback (by SS or winamp or whatever) to a set db amount, be it 83 or 89 or whatever the replaygain standard is set to.

i thought when i encoded with LAME, all my files would get the RG value inserted. some didn't [get a lame tag at all] obviously, and so i need to rerip those, np. but most did, and if they did there is a RG value in the lame tag. (again, assuming my assumption above is correct)

so if the RG standard is 83db, then i want all songs on playback to be gain-adjusted on the fly to a set level of 83db.

this shouldn't modify the audio file itself, nor should it compress or affect the dynamic range. it should simply raise or lower the gain to tht db level for each track as required.

my first wish would be for SS to use the value in the LAME tag, or FLAC or what have you.

but if that is not possible, how does one go about putting them in the tag so that SS, winamp, whatever can use them?

first, must the value be in a ID3v2.3 tag?

second, what is the value's field called?

third, should this value be recalculated? or would it be better to simply copy the LAME Tags value into the new ID3v2.3 field?

fourth, do i want or need to do analysis for albums? why, if each track itself is adjusted to 83db?

fifth, what program does all this best, without adjusting the audio file itself?

sorry for how long and complex this reply was, but the whole issue has me thoroughly confused, and i think i am missing a major piece of understanding this puzzle. thx, -mdw

kdf
2007-02-26, 14:23
Quoting MrSinatra <MrSinatra.2mmrmb1172523901 (AT) no-mx (DOT) forums.slimdevices.com>:

> kdf, u should definitely check out lametagGUI, its a very nice app that
> doesn't "install" on your system, you just nav to a mp3, double click
> it, and it immediately shows you whats in the lame tag.
>
> http://phwip.f2o.org/audio#lametag

thanks. I'll make a note to check it out tonight.

> i gather from what all of you are saying, that even if it were there
> [in the lame tag], SS wouldn't see it anyway, right? b/c SS apparently
> either ignores LAME tags altogehter, OR it ignores ReplayGain values in
> LAME tags at the very least.
>
> ...is that correct?

basically yes. If slimserver isn't looking for a given tag, then it
won't end up in the database and won't appear on the songinfo page.

> ok, but does that mean in ID3v2.3 tags? as opposed to being in LAME
> tags?

yes, I was referring to ID3 tags. APE V2 tags are also valid.


> first, must the value be in a ID3v2.3 tag?

If I am reading the code correctly, yes.

> second, what is the value's field called?

RVAD, RVA, RVA2 seem to be the ID3 names.

> third, should this value be recalculated? or would it be better to
> simply copy the LAME Tags value into the new ID3v2.3 field?

I can't really answer that, as I am not sure of what the difference
might be between the LAME tags and ID3 tag values for Replaygain. I'd
expect they should only need to be copied.

> fourth, do i want or need to do analysis for albums? why, if each
> track itself is adjusted to 83db?

you don't *need* to, but some albums may have been designed by the
artist to be particularly quiet for certain tracks compare to others.
So, when listening to an entire album, slimserver can be set up to use
the Album Gain, which would instead be based on normalising against
the average volume across the album.

> fifth, what program does all this best, without adjusting the audio
> file itself?

I use foobar. I can't say it's the best, but it does only set tags.
No altering of the audio for the replay gain operations.

> sorry for how long and complex this reply was, but the whole issue has
> me thoroughly confused, and i think i am missing a major piece of
> understanding this puzzle. thx, -mdw

Too many options. My choice was to avoid comparing and go with foobar
when it was first recommended for setting the tags that slimserver was
going to look for. I've had no problems, so no reason to use up time
looking elsewhere.

-kdf

MrSinatra
2007-02-26, 14:55
Yup, it's not there. Here's an example of one it can see, although it's FLAC:

did u do what jeffmeh said, and use foobar or mp3gain to put it in there?

wouldn't it be nice if EAC simply copied the LAME tag value to the ID3 tag at the time of encoding?

how did you do yours? did u just add a value in a tag, or did u change the audio file itself?


As others have said, the LAME RG tag is non-standard so SS doesn't see it, along with almost every other player out there. It'd be nice if it could (one less step in encoding), but SS is far from alone in not supporting it.

is this the kind of thing someone could write a plugin for? or is that not possible if the scanner won't look for that information on library scans?


Also LAME does not seem to have much control over how it writes RG values - they seem to be placed there automatically whether you want it to or not, so I'd rather not rely on it.

SS can see RG tags written with MP3Gain and foobar.

which are in an ID3 tag i take it...

as to how lame writes RG tags, i did find this info about the switches:


* --replaygain-accurate compute ReplayGain more accurately and find the peak sample
Enable decoding on the fly. Compute "Radio" ReplayGain on the decoded data stream. Find the peak sample of the decoded data stream and store it in the file.

ReplayGain analysis does not affect the content of a compressed data stream itself, it is a value stored in the header of a sound file. Information on the purpose of ReplayGain and the algorithms used is available from http://www.replaygain.org/

By default, LAME performs ReplayGain analysis on the input data (after the user-specified volume scaling). This behavior might give slightly inaccurate results because the data on the output of a lossy compression/decompression sequence differs from the initial input data. When --replaygain-accurate is specified the mp3 stream gets decoded on the fly and the analysis is performed on the decoded data stream. Although theoretically this method gives more accurate results, it has several disadvantages:
tests have shown that the difference between the ReplayGain values computed on the input data and decoded data is usually no greater than 0.5dB, although the minimum volume difference the human ear can perceive is about 1.0dB
decoding on the fly significantly slows down the encoding process
The apparent advantage is that:
with --replaygain-accurate the peak sample is determined and stored in the file. The knowledge of the peak sample can be useful to decoders (players) to prevent a negative effect called 'clipping' that introduces distortion into sound.

Only the "RadioGain" ReplayGain value is computed. It is stored in the LAME tag. The analysis is performed with the reference volume equal to 89dB. Note: the reference volume has been changed from 83dB on transition from version 3.95 to 3.95.1.

This option is not usable if the MP3 decoder was explicitly disabled in the build of LAME. (Note: if LAME is compiled without the MP3 decoder, ReplayGain analysis is performed on the input data after user-specified volume scaling).

See also: --replaygain-fast, --noreplaygain, --clipdetect



--------------------------------------------------------------------------------


* --replaygain-fast compute ReplayGain fast but slightly inaccurately (default)
Compute "Radio" ReplayGain on the input data stream after user-specified volume scaling and/or resampling.

ReplayGain analysis does not affect the content of a compressed data stream itself, it is a value stored in the header of a sound file. Information on the purpose of ReplayGain and the algorithms used is available from http://www.replaygain.org/

Only the "RadioGain" ReplayGain value is computed. It is stored in the LAME tag. The analysis is performed with the reference volume equal to 89dB. Note: the reference volume has been changed from 83dB on transition from version 3.95 to 3.95.1.

This switch is enabled by default.

See also: --replaygain-accurate, --noreplaygain

and


* --noreplaygain disable ReplayGain analysis
By default ReplayGain analysis is enabled. This switch disables it.

See also: --replaygain-accurate, --replaygain-fast

jeffmeh
2007-02-26, 15:06
AFAIK, the LAME Tag is pretty useless for Replaygain. I suggest that you create the Replaygain tags with Foobar, because I would not even trust the LAME ones enough to copy them. You will also save some encoding time by turning off Replaygain in LAME.

KDF already answered your question regarding album gain values. It is easy enough to have Foobar calculate those also, and it does it in the same pass when calculating track gain for each individual track in the album, so you may as well go for it.

I see that you already found the LAME documentation. I believe Foobar uses 89db as the reference value at this point in time, like the latest LAME encoder.

MrSinatra
2007-02-26, 15:37
ok... so i need to master foobar.

i will give it a twirl.

can i automate foobar to do my whole collection at once?

can i make it so that it will only deal with RG tags, and not affect any other tags in any other way?

and will it write into ID3 tags, or will it create ape tags which i don't want?

and also what button do i use to simply add the RG tags?

and which button do i avoid so as not to change the audiofile itself in anyway?

am i right in thinking that if i do this, SS will affect gain on the fly on playback to the reference 89db level?

and is there anyway to configure EAC/Lame 3.9x to write the track values into the ID3 tag at the time of ripping? (or ape tag if thats the only one possible?)

--

also, for anyone who is having trouble getting to that lametagGUI site, i put the 2 required zips up on the web:

http://www.thelion.fm/mp3tools/

Mark Lanctot
2007-02-27, 07:01
did u do what jeffmeh said, and use foobar or mp3gain to put it in there?

This was done at encode time with the FLAC encoder using the --replay-gain switch. As many have pointed out, it will only do track gains correctly. Usually the album gain gets the same value, not sure why it's different in this case.


wouldn't it be nice if EAC simply copied the LAME tag value to the ID3 tag at the time of encoding?

But EAC's not handling the ReplayGain calculation at all (nor should it, it's a ripper). The LAME encoder is, and it's doing it exactly the way the LAME developers intended...which no one supports.


how did you do yours? did u just add a value in a tag, or did u change the audio file itself?

It's just a tag. I would never change the audio in a FLAC file and I'm thankful there are no applications out there that can.


is this the kind of thing someone could write a plugin for? or is that not possible if the scanner won't look for that information on library scans?

Reading this LAME tag isn't easy. In fact that program you found is the first and only one I've ever seen that was able to do it.

I'm not sure why it's so hard and uncommon, but it seems to be.


which are in an ID3 tag i take it...

Actually MP3Gain writes an APEv2 tag. foobar seems to use an ID3 tag, in a non-standard way at first - I can recall SS needed to be changed to read it.

Mark Lanctot
2007-02-27, 07:11
foobar, like SlimServer, is free, so go ahead and try it out.


can i automate foobar to do my whole collection at once?

Just load the whole collection in, select all (through Edit - Select All, or click on the first, shift+click on the last), right-click, ReplayGain. There are a series of options to choose from.


can i make it so that it will only deal with RG tags, and not affect any other tags in any other way?

Yes.


and will it write into ID3 tags, or will it create ape tags which i don't want?

I believe it writes RG into ID3 tags. Why don't you want APE tags? They work fine in SS.


and also what button do i use to simply add the RG tags?

The only buttons in foobar are for playback.


and which button do i avoid so as not to change the audiofile itself in anyway?

foobar does not alter the audio in any way when calculating ReplayGain. It has a lot of functions and if you dig really deep it may have a normalization function which may alter the audio, but you'd have to really look for it. You could not alter the audio by accident, and I may be wrong that it can alter the audio at all.

You're thinking of MP3Gain.


am i right in thinking that if i do this, SS will affect gain on the fly on playback to the reference 89db level?

Yes. All RG calculations are done at the 89 dB level. In MP3Gain you can alter the 89 dB reference, but everything else uses 89 and you can't adjust it.


and is there anyway to configure EAC/Lame 3.9x to write the track values into the ID3 tag at the time of ripping? (or ape tag if thats the only one possible?)

Don't think so. LAME does RG in its own non-standard way.