AACGAIN
AACGain is a modification to Glen Sawyer's excellent
mp3gain program. It supports AAC (mp4/m4a/QuickTime) audio files in
addtion to mp3 files. If you are not familiar with mp3gain, stop reading this,
and go to http://mp3gain.sourceforge.net.
AACGain normalizes the volume of digital music files using the
Replay Gain algorithm. It works by modifying the global_gain fields in
the mp4 samples. Free-form metadata tags are added to the file to save undo
information, making the normalization process reversable.
AACGain uses the same command-line user interface as mp3gain, and is compatible
with the mp3gain Visual Basic GUI.
It also integrates with iTunes using my iGain GUI.
BACK UP YOUR MUSIC FILES BEFORE USING AACGAIN! THIS IS EXPERIMENTAL SOFTWARE.
THERE HAVE BEEN BUGS IN PAST RELEASES THAT CORRUPTED MUSIC FILES. I AM NOT
RESPONSIBLE FOR DAMAGED FILES.
AACGain was implemented using
-
mpeg4ip's
mp4v2
library to parse the files and to read and write metadata, and
-
FAAD2 to
decode the audio samples.
AACGain is released under GPL
I am distributing AACGain in source code form only
-
to avoid any MPEG royalty issues, and
-
to ensure that early users have the knowledge to fix whatever bugs they find
:-)
A compiled binary for Microsoft Windows® is hosted at
rarewares.org.
Version 1.8 is now available
- Built with mpeg4ip/mp4v2 version 1.6.1. Aacgain 1.7.1 was built with
version 1.5.20. Mp4v2 version 1.6.1 corrects problems that corrupted
video files containing Quicktime chapter markers.
- Built with latest mp3gain version 1.4.7 sources checked into CVS.
The mp3gain changes made since 1.7.1 support sample rates up to 96000.
Previous versions had a maxmimum sample rate of 48000.
- Ignores faad2 "scalefactor out of range" errors. These errors resulted
in "invalid file format" errors on apparently good files.
Version 1.7.1 fixed the following issue:
- MSVC++ solution and project files have been converted to Visual
C++ 2005 Express Edition. Other than the version number, no other
source code changes have been made.
Version 1.7 fixed the following issue:
-
If the total length of the directory plus file name path exceeded 64 bytes,
memory corruption would occur. This has been corrected.
Version 1.6 fixed the following issue:
-
Files with a 'cprt' (copyright) tag are now processed correctly. Previous
versions of aacgain corrupted the metadata of files with a copyright tag.
-
AACGain now works on video or other files where the first audio track has a
track number of other than 1. Previous versions required the audio track to
have a number of 1. AACGain will still only process the first audio track found
on a file. Thanks to Arthur Yarwood at Sony Computer Entertainment Europe for
this fix.
Version 1.5 fixed the following issue:
-
Running AACGain on Apple lossless or other unsupported file format resulted in
a crash with an unhandled exception.
Version 1.4 fixed the following issues:
-
Temporary files are created in the same directory as the input file. Formerly
they were created in the same directory that the program was run in. This
solves a problem only seen on Unix systems where the temporary file could not
be renamed back to the original input filename, if the input file was located
on a different filesystem from where the program was run. Windows users are
unaffected by this problem and can continue to use 1.3.
Version 1.3 fixed the following issues:
-
Always uses the /t (use temp file) option, even if it is not specified on the
command line. This resolves issues where processed files would not play on the
iPod Shuffle.
-
Preserves original values of MP4 properties bufferSizeDB, maxBitrate and
avgBitrate. Without this change, mpeg4ip/mp4vs was recalulating the actual
values of these parameters. This caused bitrate as displayed by iTunes to
change slightly, i.e. songs ripped at 320KB would display as 319KB.
-
Incorporates recent changes to mp3gain which prevent crashes when working with
48KB files on Linux.
-
Source code directory structure was reorganized to be compatible with mp3gain
CVS on sourceforge. Thanks to Glen Sawyer, the AACGain source code is now
hosted on sourceforge's CVS repository as part of the mp3gain project.
Version 1.2 fixed the following issues:
-
Compatibility issue with MP3GainGUI version 1.2.5 or 1.3.4.
-
All temporary files created are erased.
Version 1.1 fixed the following issues:
-
Multi-channel and mono files now work.
-
Fixes compatibility issues with MP3GainGUI: the /o option always outputs Album
gain.
-
The /f option is ignored for AAC files. If a file starts with a 'ftyp' atom, it
is assumed to be AAC, even if /f was specified. This prevents the /f option
from corrupting valid AAC files.
-
Uses portable versions of all library functions, and has been successfully
compiled under Linux. Thanks to Prakash Punoor for his help with this.
Thanks to Glen Sawyer, source code for AACGain is hosted in the
sourceforge cvs repository as part of the
mp3gain project. in
this directory.
Contact me if you want to contribute
to its development.
Unix
Prakash Punnoor has set up a build system
for Linux. It is checked into cvs as
unix_build_system.tar.bz2.
Miguel Angel Alvarez has used this to
package the build for aacgain 1.7. You can download aacgain-1.7.tar.bz2,
aacgain-1.7-1.i586.rpm, or
aacgain-1.7-1.src.rpm.