MP3Gain: Difference between revisions

From Hydrogenaudio Knowledgebase
(fix forum link)
m (→‎Tags: Added info on tag removal.)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''MP3Gain''' is a program that analyzes [[MP3]] files to determine how loud they sound to the human ear. It can then adjust the [[MP3]] files so that they all have the same loudness without any quality loss. This way, you don't have to keep reaching for the volume dial on your [[MP3]] player every time it switches to a new song.
{{infobox software
| name                = MP3Gain
| logo                =
| screenshot          = [[File:MP3Gain.png|256px]]
| caption              = MP3Gain 1.2.5 main window
| developer            = Glen Sawyer
| released            = <!-- {{start date and age|YYYY|MM|DD}} -->
| stable_release      = 1.2.5
| stable_release_date  = {{start date and age|2005|01|09}}
| preview_release      = 1.3.4
| preview_release_date = {{start date and age|2018|09|24}}
| preview_release_ref  =
| operating_system    = Windows
| use                  = [[ReplayGain]]
}}
'''MP3Gain''' is a program that analyzes [[MP3]] files to determine how loud they sound to the human ear. It can then adjust the MP3 files so that they all have the same loudness without any quality loss. This way, you don't have to keep reaching for the volume dial on your MP3 player every time it switches to a new song.


MP3Gain is an implementation of [[ReplayGain]], supporting Track mode and Album mode. However, with most other formats, the necessary loudness adjustment of ReplayGain is stored as metadata, thus leaving the encoded results alone. With MP3Gain, the loudness adjustment is done on the data itself, albeit in a lossless/reversible way. Another difference with MP3Gain is the fact that it can only adjust physical volume in 1.5 dB steps.
MP3Gain is an implementation of [[ReplayGain]], supporting Track mode and Album mode. However, with most other formats, the necessary loudness adjustment of ReplayGain is stored as metadata, thus leaving the encoded results alone. With MP3Gain, the loudness adjustment is done on the data itself, albeit in a lossless/reversible way.


== Technical Explanation ==
Another difference with MP3Gain is the fact that it can only adjust physical volume in 1.5 [[bel|dB]] steps.
 
== Technical explanation ==
Here's the technical reason on why it's lossless (despite operating on the data itself), and also why the smallest change possible is 1.5 dB:  
Here's the technical reason on why it's lossless (despite operating on the data itself), and also why the smallest change possible is 1.5 dB:  


Line 12: Line 29:
* Likewise, if you subtract 1 from this field, you multiply the amplitude by 2^(-1/4) = 84 % = -1.5 dB.
* Likewise, if you subtract 1 from this field, you multiply the amplitude by 2^(-1/4) = 84 % = -1.5 dB.


The way MP3Gain works actually has a very strong benefit: Since it is the data itself that is modified, MP3Gain does not require special support from players.
The way MP3Gain works actually has a very strong benefit: since it is the data itself that is modified, MP3Gain does not require special support from players.
 
== Tags ==
MP3Gain writes the following [[APEv2]] [[tag]]s, which is what allows the tool to reverse the changes:
 
* MP3GAIN_MINMAX
* MP3GAIN_ALBUM_MINMAX
* MP3GAIN_UNDO
 
Modifying the file's tags in another program, such as [[foobar2000]], may cause any MP3Gain-specific tags to be stripped from the file.<ref>{{ha|url=https://hydrogenaud.io/index.php?topic=101182.0|title=Remove ReplayGain tags without removing MP3Gain tags}}</ref>
 
== References ==
<references/>


== Links ==
== External links ==
* [http://mp3gain.sourceforge.net/ MP3Gain's official website]
* [http://mp3gain.sourceforge.net/ MP3Gain's official website]
* [https://hydrogenaud.io/index.php/topic,3274 MP3Gain tutorial] on HA Forums
* [https://hydrogenaud.io/index.php/topic,3274 MP3Gain tutorial] on HA Forums

Latest revision as of 18:19, 17 March 2020

MP3Gain

MP3Gain 1.2.5 main window
Developer(s) Glen Sawyer
Release information
Initial release
Stable release 1.2.5 (January 9, 2005; 19 years ago)
Preview release 1.3.4 / September 24, 2018; 6 years ago
Compatibility
Operating system Windows
Additional information
Use ReplayGain
License TBC
Website {{{website}}}

MP3Gain is a program that analyzes MP3 files to determine how loud they sound to the human ear. It can then adjust the MP3 files so that they all have the same loudness without any quality loss. This way, you don't have to keep reaching for the volume dial on your MP3 player every time it switches to a new song.

MP3Gain is an implementation of ReplayGain, supporting Track mode and Album mode. However, with most other formats, the necessary loudness adjustment of ReplayGain is stored as metadata, thus leaving the encoded results alone. With MP3Gain, the loudness adjustment is done on the data itself, albeit in a lossless/reversible way.

Another difference with MP3Gain is the fact that it can only adjust physical volume in 1.5 dB steps.

Technical explanation

Here's the technical reason on why it's lossless (despite operating on the data itself), 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 holds an 8-bit integer which can represent values 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).

  • If you add 1 to this field in all the MP3 frames, you effectively multiply the amplitude of the whole file by 2^(1/4) = 119 % = +1.5 dB.
  • Likewise, if you subtract 1 from this field, you multiply the amplitude by 2^(-1/4) = 84 % = -1.5 dB.

The way MP3Gain works actually has a very strong benefit: since it is the data itself that is modified, MP3Gain does not require special support from players.

Tags

MP3Gain writes the following APEv2 tags, which is what allows the tool to reverse the changes:

  • MP3GAIN_MINMAX
  • MP3GAIN_ALBUM_MINMAX
  • MP3GAIN_UNDO

Modifying the file's tags in another program, such as foobar2000, may cause any MP3Gain-specific tags to be stripped from the file.[1]

References

External links