Clarification b/w MP3 Gain and Replay Gain

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Clarification b/w MP3 Gain and Replay Gain

Re: Clarification b/w MP3 Gain and Replay Gain

by nohitter151 » Fri Apr 24, 2009 3:55 pm

fourteen wrote:
ZvezdanD wrote:Yes, I got to this conclusion when I tested this long time ago - Analyze Volume in MM is same as Track Analysis from MP3Gain (writes Replay Gain value to some tag) and Level Track Volume of MM is same as Apply Track Gain in MP3Gain (writes to global gain field). Yes, none of this processes recode mp3 files, they are both losseless.
Although you are discussing mp3 files in this thread, it may be worth emphasizing that the Level Track Volume "process" may indeed re-encode the audio depending on the encoding format of the track. Perhaps not when the track is mp3 format but it may very well do so when the track is in a different format. So one should proceed with caution before commiting to using Level Track Volume.
I believe that MediaMonkey's "Level track volume" function can only be used on mp3's, so I don't think that is a concern.

Re: Clarification b/w MP3 Gain and Replay Gain

by fourteen » Fri Apr 24, 2009 3:16 pm

ZvezdanD wrote:Yes, I got to this conclusion when I tested this long time ago - Analyze Volume in MM is same as Track Analysis from MP3Gain (writes Replay Gain value to some tag) and Level Track Volume of MM is same as Apply Track Gain in MP3Gain (writes to global gain field). Yes, none of this processes recode mp3 files, they are both losseless.
Although you are discussing mp3 files in this thread, it may be worth emphasizing that the Level Track Volume "process" may indeed re-encode the audio depending on the encoding format of the track. Perhaps not when the track is mp3 format but it may very well do so when the track is in a different format. So one should proceed with caution before commiting to using Level Track Volume.

Re: Clarification b/w MP3 Gain and Replay Gain

by amallen » Fri Apr 24, 2009 9:26 am

Thanks ZvezdanD. I appreciate all the info!

amallen

Re: Clarification b/w MP3 Gain and Replay Gain

by ZvezdanD » Fri Apr 24, 2009 12:49 am

Yes, I got to this conclusion when I tested this long time ago - Analyze Volume in MM is same as Track Analysis from MP3Gain (writes Replay Gain value to some tag) and Level Track Volume of MM is same as Apply Track Gain in MP3Gain (writes to global gain field). Yes, none of this processes recode mp3 files, they are both losseless.

Writing to some tag has advantage since it is faster, it needs to write just one value on the begin of the file and is much easier to undo since you could do this just by removing that one tag. On another side, writing to the global gain field has advantage that such mp3 files would be playable with same volume level on every player, even on those that do not support Replay Gain written to some tag. You should check if your iPod support this tag or not; if it does then I recommend the first approach.

Re: Clarification b/w MP3 Gain and Replay Gain

by amallen » Thu Apr 23, 2009 8:46 pm

ZvezdanD,

Thanks for taking the time to write such a detailed explanation. If I understand you correctly, it comes down to this: MM3's Analyze Track or Volume writes volume adjustments to the mp3 TAGS while MM3's Level Track Volume and MP3Gain both write volume adjustments to the GLOBAL GAIN FLAG. None of these processes recode your mp3 files (i.e. - change the music itself). Finally, if you want to undo changes to the global gain flag it is best to use MP3Gain.

So, as far as playback on my iPod Classic is concerned, is there an advantage using either MM3's Track/Volume Analysis and writing to tags versus using the MP3Gain app and writing to the global gain flag?

Re: Clarification b/w MP3 Gain and Replay Gain

by ZvezdanD » Thu Apr 23, 2009 5:45 pm

I don't know exactly how MM works, but I suppose if you choose the option "Update tags when editing properties" from the Options dialog and if you choose "Analyze Volume" that MM stores the calculated value to some tag in mp3 file (this is what you say that could be undone). Such value could read only players that support Replay Gain value entered to tags. On another side, if you choose "Level Track Volume", the global gain flag would be adjusted for all mp3 frames (this is what you say that cannot be undone) and such mp3 file could be reproduced equally even on players which don't support Replay Gain standard. However, even in that case there is not re-encoding as you wrote, and actually you could revert back volume level for mp3 file without sacrificing its quality. You only need to know the starting value for the volume level, before its modification.

If you turn off the option "Ignore (do not read or write tags)" in the MP3Gain program and when you choose "Apply Track Gain" (which is same as "Level Track Volume" in MM), after that you could undone this process with its option "Undo Gain changes" if you are not satisfied with the result. MM doesn't have have such option, and this is one of reasons why I prefer MP3Gain. However, as I said, you could always return to the previous state without audio degradation, even in MM, but only if you know the original track volume.

By the way, the global gain flag is just one value for each mp3 frame (IIRC 2048 bytes) which determines audio volume for that frame. If you change that value for some frame of mp3 file, this doesn't mean that you are changing music since the frame with the audio data remains unchanged.

If you don't have MP3Gain installed, I recommend it, just to be able to read its help. Here is some excerpt from it, Glen is much better in explanation than me:
The bad news: MP3Gain can only adjust the volume of your mp3 files in steps of 1.5 dB.

The good news: 1.5 dB is a small enough step for most practical purposes. Most humans can just barely hear a volume change of 1 dB.

The other good news is that this volume adjustment is completely lossless. In other words, if you adjust an mp3 by -6 dB and then change your mind, you can adjust it again by +6 dB and it will be exactly the same as it was before you made the first adjustment.

Here's the technical reason why it's lossless, and also why the smallest change possible is 1.5 dB:

The mp3 format stores the sound information in small chunks called "frames". Each frame represents a fraction of a second of sound. In each frame there is a "global gain" field. This field is an 8-bit integer (so its value can be a whole number from 0 to 255).

When an mp3 player decodes the sound in the frame, it uses the global gain field to multiply the decoded sound samples by 2(gain / 4).

So if you add 1 to this gain field in all the frames in the mp3, you effectively multiply the amplitude of the whole file by 2(1/4) = 119% = +1.5 dB.

Likewise, if you subtract 1 from the global gain, you multiply the amplitude by 2(-1/4) = 84% = -1.5 dB.

Re: Clarification b/w MP3 Gain and Replay Gain

by amallen » Thu Apr 23, 2009 4:49 pm

nohitter151: Thanks for clarification re Track Volume values and Sound Check when syncing to the iPod. That's helpful info.

ZvezdanD: I know the MP3Gain module is based on the Replay Gain algorithm. What is unclear to me is in what cases is volume information written to tags (and can be undone) and where the music in the mp3 file is permanently changed (and cannot be undone)? I have found conflicting info in this forum. Perhaps you could enlighten me?

Re: Clarification b/w MP3 Gain and Replay Gain

by nohitter151 » Thu Apr 23, 2009 3:23 pm

amallen wrote:Re Sound Check on the iPod: I thought Sound Check only reads a tag generated by iTunes. I thought Replay Gain and MP3 Gain mp3 tags were automatically read by the iPod.
I am not 100% sure of this, but I believe that when MM synchs tracks to the iPod it copies the track volume number to the ipod database for sound check use.

In any case, this is what it says in the MediaMonkey help:
MediaMonkey syncs Soundcheck values which the iPod uses to level volume

Re: Clarification b/w MP3 Gain and Replay Gain

by ZvezdanD » Thu Apr 23, 2009 3:12 pm

amallen wrote:Volume LEVELING, on the other hand, actually decodes and re-encodes your mp3 files (i.e. - changes them) and there is no way to undo leveling.
During volume leveling of mp3 files there are not decoding and re-encoding of mp3 files. The mp3gain dll library are used for this and it only changes the globalgain flag of mp3 frames. This process is losseless and you could undo leveling without any impact on the audio quality.
amallen wrote:Does MM3 use MP3 Gain or Replay Gain when performing track/album analysis? It appears to be Replay Gain but I have read conflicting information.
The mp3gain module is based on the Replay Gain algorithm, you should know that if you visited MP3Gain site. I suppose MM uses same code as MP3Gain stand alone application since they are mentioning its author in the about dialog box. If you are interested, I am still using MP3Gain and AACGain for volume leveling.

Re: Clarification b/w MP3 Gain and Replay Gain

by amallen » Thu Apr 23, 2009 2:52 pm

Re Sound Check on the iPod: I thought Sound Check only reads a tag generated by iTunes. I thought Replay Gain and MP3 Gain mp3 tags were automatically read by the iPod.

Re: Clarification b/w MP3 Gain and Replay Gain

by nohitter151 » Thu Apr 23, 2009 2:24 pm

I can't answer them all, but for 4), no there are no conflicts. I regularly analyze all my mp3 files for both track and album gain tags and there is no problem there. However, the volume analysis values are not used at all if you do not enable "Sound check" on your iPod.

Clarification b/w MP3 Gain and Replay Gain

by amallen » Thu Apr 23, 2009 2:09 pm

I have some questions and could use clarification regarding MP3 Gain and Replay Gain, specifically as they pertain to Media Monkey 3, the iPod (Classic in my case), and track/volume analysis.

First, I assume the following are true:
1. In MM3, track and album ANALYSIS add info to the mp3 tags but do not change the music in the mp3 files. Volume LEVELING, on the other hand, actually decodes and re-encodes your mp3 files (i.e. - changes them) and there is no way to undo leveling.
2. Your iPod will automatically recognize both track and album analysis tags generated by MM3 and adjust playback of mp3s based on those tag values.

My questions:
1. Does MM3 use MP3 Gain or Replay Gain when performing track/album analysis? It appears to be Replay Gain but I have read conflicting information.
2. How does MM3 use MP3 Gain? The Help states MP3 Gain is used for leveling, which is supposed to alter the music in your mp3 files. The MP3 Gain web site, on the other hand, states that the MP3 Gain stand-alone application does NOT decode and re-encode your mp3 files (http://mp3gain.sourceforge.net/faq.php). Which is correct?
3. Is there a difference between how the MP3 Gain algorithm is used in MM3 versus the MP3 Gain stand-alone application? Put differently, would I get the same result written to the same tags whether I used MM3 or the MP3 Gain stand-alone app? In a related vein, how about an expert opinion between using MM3's track/album analysis versus MP3 Gain's stand-alone app?
4. Are there any conflicts or problems for iPod playback if I have both Track Volume and Album Volume tags populated? (FYI, I have Sound Check turned off on my iPod since I do not use iTunes to manage my music.)

The bottom line is that I would like to use the best method of track and/or album analysis on my mp3 library and ensure any volume adjustments are recognized when playing my iPod Classic.

Thanks,

amallen

Top