davelasker
Dec 19 2004, 19:57
As promised
here, I finally completed 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.
I am releasing it in source code only
a) to avoid any MPEG royalty issues, and
b) to ensure that early users have the knowledge to fix whatever bugs they find
You can download the source code from
http://altosdesign.com/aacgain/ Source code is for a Windows command line application. Contact me if you want to help make aacgain multi-platform or otherwise contribute to its development.
Dave
kurtnoise
Dec 20 2004, 01:38
Great news, thanks.....

Could someone make a compile ?
Great program
aacgain works well, except a multichannel aac.
I get an error message saying "Not enough samples in E:\temp\SURROUNDTEST.m4a to do analysis"
pnjman
Dec 20 2004, 07:07
Great Work!
davelasker
Dec 20 2004, 22:43
QUOTE(witt @ Dec 20 2004, 02:45 AM)
Great program
aacgain works well, except a multichannel aac.
I get an error message saying "Not enough samples in E:\temp\SURROUNDTEST.m4a to do analysis"
Witt gave me some multi-channel files to test with. I don't have time to debug it today but will look at it Wednesday.
Thanks!
Dave
first of all: thanks a lot for this great tool

than of course i have the question for our aac pros about whether doing this is really a good idea (quality- and mpeg-4 compatibility wise)?
rjamorim
Dec 21 2004, 07:03
Just uploaded a version compiled by Dave himself to RareWares.
DarkAvenger
Dec 21 2004, 08:29
I have made an experimental linux compile. I don't know whether it works though, as it doesn't like my aac file. Do I need a mp4 container for it?
davelasker
Dec 21 2004, 09:11
QUOTE(DarkAvenger @ Dec 21 2004, 07:29 AM)
I have made an experimental linux compile. I don't know whether it works though, as it doesn't like my aac file. Do I need a mp4 container for it?
aacgain requires an mp4 container.
is this tool used with the same switches like MP3Gain, or how does one use this?
I tried running it with -h, --h, -help, --help etc, to no avail...
can it be used with the MP3Gain gui, or a modifaction of it?
cmdline-noob-mode.off
Otto42
Dec 21 2004, 09:28
QUOTE(Digga @ Dec 21 2004, 09:17 AM)
is this tool used with the same switches like MP3Gain, or how does one use this?
I tried running it with -h, --h, -help, --help etc, to no avail...
can it be used with the MP3Gain gui, or a modifaction of it?
cmdline-noob-mode.offTry /? or /h instead.
And it appears to be a modification of MP3Gain, so it probably would work with the GUI. It doesn't appear that he modified the switches any.
just had a go with the MP3Gain gui (replaced mp3gain.exe with the renamed aacgain.exe).
after enableing 'no check for layer I or II', the gain was applied.
however, using the nero and compaact! files from the
m4a-bible thread results in uplayable files in Wa.
undo changes or remove tags doesn't make it better either.
btw, /? or /h doesn't work for me...
I tried mp3gain gui with aacgain.exe renamed to mp3gain.exe with a couple of m4a files produced by faac and it worked perfect! You can only add files by the "Add files" button and select "All files" in the next dialog. You can't select directories with m4a's though.
QUOTE(echo @ Dec 22 2004, 12:34 AM)
I tried mp3gain gui with aacgain.exe renamed to mp3gain.exe with a couple of m4a files produced by faac and it worked perfect!
hmm, that's strange. I'm gonna try it with selfencoded files again tomorrow.
davelasker
Dec 21 2004, 21:52
QUOTE(Digga @ Dec 21 2004, 04:45 PM)
hmm, that's strange. I'm gonna try it with selfencoded files again tomorrow.
Command line and help are the same as mp3gain. /? or /h if you compile for windoze, -? or -h otherwise.
What's a "selfencoded" file?
Dave
DarkAvenger
Dec 22 2004, 06:11
@davelasker
So I got the linux version running (completely ported - probably not the smartest way, though...), but I found a strange thing: In gain_analysis.c I had to make the buffers bigger, otherwise it would segfault. Using the windows compile on my file (using wine) works though. But after my adjustment linux and windows version do find the same values, so could you please check whether there is a hidden bug I may have stepped onto?
I will send you a patch soon.
QUOTE(davelasker @ Dec 22 2004, 04:52 AM)
What's a "selfencoded" file?
audio files encoded by yourself, opposed to files encoded by someone else (as the files I tried it with before).
I tried it again today and it works flawlessly with self encoded nero LC files.
it chokes on the files talked above though.
davelasker
Dec 22 2004, 11:01
QUOTE(Digga @ Dec 21 2004, 08:43 AM)
after enableing 'no check for layer I or II', the gain was applied.
The no check for layer I or II option forces the file to be treated as mp3 (as in original mp3gain). This option should not be used for AAC files.
Dave
Is aacgain restricted to the same decibel steps as mp3gain? Haven't had a chance to check it yet, but I'm sensitive enough to volume fluctuations that a even a 1dB shift from album to album can seem jarring. (No criticism of your program intended... just trying to decide whether aacgain or wavegain is still my best option! There will obviously be times when one or the other is more appropriate, so I am grateful for both tools.)
- M.
QUOTE(davelasker @ Dec 22 2004, 06:01 PM)
QUOTE(Digga @ Dec 21 2004, 08:43 AM)
after enableing 'no check for layer I or II', the gain was applied.
The no check for layer I or II option forces the file to be treated as mp3 (as in original mp3gain). This option should not be used for AAC files.
I had to use that option in order to get the files gained. only that way the two audio bible mp4 files where accepted. in the light of your comment it wouldn't strike me so odd that they weren't playable anymore.
QUOTE(echo @ Dec 21 2004, 04:34 PM)
I tried mp3gain gui with aacgain.exe renamed to mp3gain.exe with a couple of m4a files produced by faac and it worked perfect! You can only add files by the "Add files" button and select "All files" in the next dialog. You can't select directories with m4a's though.
Yeah, I'm tweaking the GUI to recognize the "m4a" and "mp4" file extensions.
-Glen
QUOTE(Snelg @ Dec 22 2004, 11:11 AM)
Yeah, I'm tweaking the GUI to recognize the "m4a" and "mp4" file extensions.
-Glen
That would be great. Thanks Glen.
davelasker
Dec 22 2004, 23:15
QUOTE(M @ Dec 22 2004, 10:23 AM)
Is aacgain restricted to the same decibel steps as mp3gain?
Yes it is. Both mp3gain and aacgain work by altering the "global_gain" field of each audio sample. Each increment or decrement of global_gain alters the sound level by 1.5dB. So 1.5dB is the minimum resolution.
Dave
QUOTE(davelasker @ Dec 23 2004, 12:15 AM)
QUOTE(M @ Dec 22 2004, 10:23 AM)
Is aacgain restricted to the same decibel steps as mp3gain?
Yes it is. Both mp3gain and aacgain work by altering the "global_gain" field of each audio sample. Each increment or decrement of global_gain alters the sound level by 1.5dB. So 1.5dB is the minimum resolution.
Dave
Thanks for the answer Dave. I suspected that might be the case, but I wasn't sure whether or not AAC utilized the same global_gain structure.
- M.
further information on development (v1.1, mono and multichannel fixes):
http://www.hydrogenaudio.org/forums/index....topic=30206&hl=
DarkAvenger
Jan 3 2005, 07:08
BTW, I have made a hopefully working Linux build system ready for aacgain. I sent it to Dave and hopefully he likes it... Othrwise, if you want it, drop me an email.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.