1MP3GAIN(1)                  General Commands Manual                 MP3GAIN(1)
2
3
4

NAME

6       mp3gain — lossless mp3 normalizer
7

SYNOPSIS

9       mp3gain [options]  [infile]  [infile 2 ...]
10

DESCRIPTION

12       This manual page documents briefly the mp3gain command.
13
14       This  manual  page  was written for the Debian distribution because the
15       original program does not have a manual page.
16
17
18       mp3gain can analyze and adjust mp3 files so that  they  have  the  same
19       volume.
20
21       mp3gain  does  not  just do peak normalization, as many normalizers do.
22       Instead, it does some statistical analysis to determine  how  loud  the
23       file  actually sounds to the human ear. Also, the changes mp3gain makes
24       are completely lossless. There is no quality lost in the change because
25       the  program  adjusts  the  mp3 file directly, without decoding and re-
26       encoding. Also, this works with all mp3 players, i.e. no support for  a
27       special tag or something similar is required.
28
29       mp3gain  actually changes your file's gain only when you use one of the
30       options -r,  -a, -g, or -l. If none of these options is given,  only  a
31       tag denoting the recommended gain change is written to the file. If you
32       only want to print the recommended gain change (and not modify the file
33       at all) you have to use the -s s (skip tag) option.
34
35       The method mp3gain uses to determine the desired volume is described at
36       www.replaygain.org (link to URL http://www.replaygain.org/) .  See also
37       /usr/share/doc/mp3gain-1.4.6/README.method .
38

OPTIONS

40       -?           -h
41                 Show summary of options.
42
43       -g i      apply gain i to mp3 without doing any analysis
44
45       -l 0 i    apply gain i to channel 0 (left channel) of mp3 without doing
46                 any analysis (ONLY works for STEREO mp3s,  not  Joint  Stereo
47                 mp3s)
48
49       -l 1 i    apply  gain  i  to  channel  1 (right channel) of mp3 without
50                 doing any analysis (ONLY works for  STEREO  mp3s,  not  Joint
51                 Stereo mp3s)
52
53       -r        apply  Track gain automatically (all files set to equal loud‐
54                 ness)
55
56       -k        automatically lower Track gain to not clip audio
57
58       -a        apply Album gain automatically (files are all from  the  same
59                 album: a single gain change is applied to all files, so their
60                 loudness relative to each other remains  unchanged,  but  the
61                 average album loudness is normalized)
62
63       -m i      modify suggested MP3 gain by integer i
64
65       -d n      modify suggested dB gain by floating-point n
66
67       -c        ignore clipping warning when applying gain
68
69       -o        output is a database-friendly tab-delimited list
70
71       -t        mp3gain writes modified mp3 to temp file, then deletes origi‐
72                 nal instead of modifying bytes in original file (This is  the
73                 default in Debian)
74
75       -T        mp3gain  modifys bytes in original file instead of writing to
76                 temp file.
77
78       -q        Quiet mode: no status messages
79
80       -p        Preserve original file timestamp
81
82       -x        Only find max. amplitude of mp3
83
84       -f        Force mp3gain to assume input file is an  MPEG  2  Layer  III
85                 file  (i.e.  don't  check  for  mis-named Layer I or Layer II
86                 files)
87
88       -s c      only check stored tag info (no other processing)
89
90       -s d      delete stored tag info (no other processing)
91
92       -s s      skip (ignore) stored tag info (do not read or write tags)
93
94       -s r      force re-calculation (do not read tag info)
95
96       -u        undo changes made by mp3gain (based on stored tag info)
97
98       -w        "wrap" gain change if gain+change > 255 or  gain+change  <  0
99                 (see below or use -? wrap switch for a complete explanation)
100
101       -v        Show version of program.
102
103       If you specify -r and -a, only the second one will work.
104
105       If you do not specify -c, the program will stop and ask before applying
106       gain change to a file that might clip
107
108   The WRAP option
109       Here's the problem: The "global gain" field that mp3gain adjusts is  an
110       8-bit unsigned integer, so the possible values are 0 to 255.
111
112
113       MOST  mp3 files (in fact, ALL the mp3 files I've examined so far) don't
114       go over 230. So there's plenty of headroom on top--  you  can  increase
115       the gain by 37dB (multiplying the amplitude by 76) without a problem.
116
117
118       The  problem is at the bottom of the range. Some encoders create frames
119       with 0 as the global gain for silent frames.   What  happens  when  you
120       _lower_ the global gain by 1?  Well, in the past, mp3gain always simply
121       wrapped the result up to 255.  That way, if you lowered the gain by any
122       amount  and  then raised it by the same amount, the mp3 would always be
123       _exactly_ the same.
124
125
126       There are a few encoders out there, unfortunately, that  create  0-gain
127       frames  with other audio data in the frame.  As long as the global gain
128       is 0, you'll never hear the data.  But if you lower the gain on such  a
129       file,  the  global  gain is suddenly _huge_.  If you play this modified
130       file, there might be a brief, very loud blip.
131
132
133       So now the default behavior of mp3gain is to _not_ wrap  gain  changes.
134       In other words,
135
136
137          1. If the gain change would make a frame's global gain drop below 0,
138             then the global gain is set to 0.
139
140
141          2. If the gain change would make a frame's global  gain  grow  above
142             255, then the global gain is set to 255.
143
144
145          3.
146
147             If  a  frame's global gain field is already 0, it is not changed,
148             even if the gain change is a positive number.
149
150
151       To use the original "wrapping" behavior, use the -w switch.
152
153

SEE ALSO

155       The homepage of mp3gain is located  at  http://mp3gain.sourceforge.net/
156       (link to URL http://mp3gain.sourceforge.net/)  .
157
158

AUTHOR

160       This  manual  page was written by Stefan Fritsch sf@sfritsch.de for the
161       Debian system (but may be used by others).  Permission  is  granted  to
162       copy, distribute and/or modify this document under the terms of the GNU
163       Lesser General Public License, Version 2.1 or any  later  version  pub‐
164       lished by the Free Software Foundation.
165
166
167
168                                                                    MP3GAIN(1)
Impressum