-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
188 lines (151 loc) · 9.04 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
ReplayGain for wave files, v1.3.2
WaveGain is an application of the ReplayGain algorithms to standard PCM wave
files. Calculated gain adjustments are applied directly to the audio data,
instead of just writing metadata as traditionally done for other formats
like MP3, FLAC and Ogg Vorbis.
The replaygain values can also be added as metadata in a custom RIFF chunk
named 'gain'. This could theoretically allow WAV files to have same lossless
functionality as other formats where audio data is not altered. But since no
current players are aware of this "standard", the metadata is used only by
WaveGain for the "--undo-gain" feature, which is lossy.
About replaygain
-------------------------------------------------------------------------------
Replaygain is a standard that allows compatible players to play audio files with
an adjusted volume gain so they have a consistent perceived loudness.
It is similar in concept to Normalization, but instead of using just the peak
value to calculate the gain, it relies on RMS (sound pressure "power") values
and psychoacoustics models to calculate a gain based on the perceived loudness
of an audio file by a human listener.
Loudness can be averaged either for each individual file, also called "Track" or
"Radio" mode, where every song is adjusted to the same standard loudness; or by
group, also called "Album" mode, where individual "songs" may sound louder or
quieter than others, but each "album" as a whole has the same average loudness
as other albums.
For more information,
http://en.wikipedia.org/wiki/ReplayGain
http://wiki.hydrogenaudio.org/index.php?title=Replaygain
http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_specification
The saga of a Debian package for wavegain:
-------------------------------------------------------------------------------
- Current source code (in .zip format) and windows binaries are published at
http://www.rarewares.org/others.php
http://www.rarewares.org/files/others/
- An i386 binary .deb for version 1.2.6 (from 2005) was published at
http://www.rarewares.org/debian/packages/unstable/index.php
- Later, Linux Mint hosted the source, amd64 and i386 packages for v1.2.8 (2010)
http://packages.linuxmint.com/pool/import/w/wavegain/
This package is a combination of current upstream source, a proper Debian
packaging improved from the Mint release, and some patches to fix some
(serious) Linux issues.
Install how-to
-------------------------------------------------------------------------------
There are 2 approaches: you can build and install a .deb package, or simply
compile and install from source. For both I assume you are already at the
source directory (which is not the root directory of the cloned repository)
Debian method:
This is OUTDATED, UNMAINTANED and NON-WORKING! Use Traditional Method instead!
$ sudo apt-get install devscripts # if you don't already have debuild
$ debuild -- binary && sudo dpkg --install ../wavegain_*.deb
Traditional method:
$ make && sudo make install # by default installs to /usr/local/bin/wavegain
or
$ make && sudo make install prefix=/usr # to install to /usr/bin/wavegain
Currently, 64-bit binaries build fine but can generate corrupted audio on output
files, so to prevent this by default it builts a 32-bit executable instead,
which runs and works fine on 64-bit architectures. However, multi-arch libraries
and headers might be needed as a pre-requiste for compiling. On Debian/Ubuntu this
can be installed by:
sudo apt install gcc-multilib
Pre-compiled binaries and old versions
-------------------------------------------------------------------------------
You can find pre-compiled .DEB binariy packages for i386 and amd64, as well
as as some other goodies, like a mega-archive of all previous versions
and a (lame and outdated) html manual in the Downloads section of GitHub:
https://github.com/MestreLion/wavegain/downloads
License and copyright
-------------------------------------------------------------------------------
WaveGain is Copyright (c) 2002-2010 John Edwards <john.edwards33@ntlworld.com>,
a.k.a. John33, and several other co-authors and contributors are mentioned as
Copyright owners in the source files.
Originally released as LGPL-2.1 or later, although some source code simply says
GPL, and some others some says GPL2+. Despite this, the project as a whole
should be regarded as LGPL-2.1+, as per COPYING file. To avoid further confusion
in the future, I suggest source files be standartized with a common header and
re-licensed, preferably as GPL-3 or later (not LGPL).
I claim no copyright over the C source code, including patches I made.
The Debianization and aditional material, like this README and Makefile, is
Copyright (c) 2012 Rodrigo Silva (MestreLion)
Documentation (from wavegain --help)
-------------------------------------------------------------------------------
Copyright (c) 2002-2010 John Edwards <john.edwards33@ntlworld.com>
Additional code by Magnus Holmgren, Gian-Carlo Pascutto, and Tycho
Usage: wavegain [options] input.wav [...]
OPTIONS
-h, --help Prints this help information.
-a, --album Use ReplayGain Audiophile/Album gain setting, or
-r, --radio Use ReplayGain Radio/Single Track gain setting(DEFAULT).
-q, --adc Apply Album based DC Offset correction.
DEFAULT is Track based DC Offset correction.
-p, --no_offset Do NOT apply DC Offset correction.
-c, --calculate Calculates and prints gain settings, and DC Offsets BUT
DOES NOT APPLY THEM - This is the DEFAULT.
-x, --scale Writes scale values to stdout in the format: n.nnnnnn
In Album mode it only writes the Album Scale value, and
in Title mode it only writes the Title Scale values.
ONLY works in Calculation mode.
-y, --apply Calculates and APPLIES gain settings, and applies
DC Offset correction.
-w, --write Writes a 'gain' chunk into the Wave Header.
Stores the scalefactor applied to the wave data as a
double floating point number. Only written when gain
is applied. Presence will result in file being skipped
if reprocessed.
(Unless '--force' or '--undo-gain' are specified.)
--force Forces the reprocessing of a file that contains a 'gain'
chunk and will result in the new scalefactor overwriting
the existing value.
--undo-gain Reads the scalefactor in the 'gain' chunk and uses the
value to reverse the previously applied gain. This will NOT
recreate a bit identical version of the original file, but
it will be rescaled to the original level.
-z, --recursive Search for files recursively, each folder as an album
-l, --log Write log file.(Default filename = WGLog.txt)
-f, --logfile Specify log filename. (Assumes -l if present.)
-n, --noclip NO Clipping Prevention.
-d, --dither X Dither output, where X =
0 for dither OFF (default).
1 for dither without Noise Shaping.
2 for dither with Light Noise Shaping.
3 for dither with Medium Noise Shaping.
4 for dither with Heavy Noise Shaping.
-t, --limiter Apply 6dB Hard Limiter to output.
-g, --gain X Apply additional Manual Gain adjustment in decibels, where
X = any floating point number between -20.0 and +12.0.
Clipping Prevention WILL be applied UNLESS '-n' is used.
-s, --fast Calculates and prints gain settings - DOES NOT APPLY THEM.
NOTE: This method does NOT process all samples, it only
processes 200 x 16k chunks of samples. Results will
NOT be as accurate as a full analysis but, with most
material, will be within +/- 0.5db. Files of 8,192,000
real samples, or less, will be analysed in full.
DC Offset is neither calculated nor corrected in
FAST mode.
-o, --stdout Write output file to stdout.
FORMAT OPTIONS (One option ONLY may be used)
-b, --bits X Set output sample format, where X =
1 for 8 bit unsigned PCM data.
2 for 16 bit signed PCM data.
3 for 24 bit signed PCM data.
4 for 32 bit signed PCM data.
5 for 32 bit floats.
6 for 16 bit 'aiff' format.
NOTE: By default, the output file will be of the same bitwidth
and type as the input file.
INPUT FILES
WaveGain input files may be 8, 16, 24 or 32 bit integer, or floating point
wave files with 1 or 2 channels and a sample rate of 96000Hz, 88200Hz,
64000Hz, 48000Hz, 44100Hz, 32000Hz, 24000Hz, 22050Hz, 16000Hz, 12000Hz,
11025Hz or 8000Hz.
16 bit integer 'aiff' files are also supported.
Wildcards (?, *) can be used in the filename, or '-' for stdin.
wavegain-1.3.2