Hi,
I would like to have a "Apply ReplayGain to MP4 Data" option in foobar, analogue to "Apply ReplayGain to MP3 Data" which is already there. As this option does not seem to exist at the moment, I am trying to create it by myself, using aacgain as an external application. However, I have two question regarding aacgain's operation. Let's start with an example:
AAC-File, ReplayGain info added by foobar:
Atom "----" [replaygain_album_gain] contains: -7.32 dB
Atom "----" [replaygain_album_peak] contains: 1.124630
Atom "----" [replaygain_track_gain] contains: -6.76 dB
Atom "----" [replaygain_track_peak] contains: 1.075577
After running aacgain for an analysis:
C:\aacgain\test\test.m4a
Recommended "Track" dB change: -6.760000
Recommended "Track" mp3 gain change: -4
Max PCM sample at current gain: 35244.492188
Max mp3 global gain field: 182
Min mp3 global gain field: 99
Recommended "Album" dB change for all files: -7.320000
Recommended "Album" mp3 gain change for all files: -5
The relevant tags look like this:
Atom "----" [replaygain_album_gain] contains: -7.32
Atom "----" [replaygain_album_peak] contains: 1.12
Atom "----" [replaygain_track_gain] contains: -6.76
Atom "----" [replaygain_track_peak] contains: 1.08
Atom "----" [replaygain_track_minmax] contains: 99,182
And after applying a gain change of -7 to the file:
Atom "----" [replaygain_album_gain] contains: 3.21
Atom "----" [replaygain_album_peak] contains: 0.33
Atom "----" [replaygain_track_gain] contains: 3.78
Atom "----" [replaygain_track_peak] contains: 0.32
Atom "----" [replaygain_track_minmax] contains: 92,175
Atom "----" [replaygain_undo] contains: 7,7
So my questions are:
1) Is the only difference between foobar's and aacgain's tags that foobar puts "dB" into the tag and uses more digits? Could I therefore just strip the "dB" and some digits from foobar's tags to make aacgain use them? "com.apple.iTunes" as mentioned in this thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=55934) does not seem to be added by aacgain anymore.
2) What does the gain value stand for? I cannot find the value of 7, neither directly nor in a dB-ized form in either gain or peak tag changes.gain went from -7.32 to +3.21 (+10.53), peak went from 1.08 to 0.32 (1/3.38). 10^(10.53/20)=3.36. So this fits, but where is the 7?
Thanks for your help.
rumpel