aacgain - Tags and Values |
![]() ![]() |
aacgain - Tags and Values |
Feb 8 2009, 12:48
Post
#1
|
|
|
Group: Members Posts: 30 Joined: 10-January 07 From: NRW, Germany Member No.: 39526 |
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: CODE 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: CODE 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: CODE 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: CODE 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 |
|
|
|
Feb 8 2009, 16:33
Post
#2
|
|
![]() Group: Developer Posts: 2983 Joined: 2-December 07 Member No.: 49183 |
QUOTE So this fits, but where is the 7? 7 * 1.50515 dB = 10.53605 dB. 1.50515 = 1/4 * 20*lg(2) - the smallest possible step of volume adjustment for mp3 files (and, probably, AAC - I just don't know). |
|
|
|
Feb 8 2009, 18:29
Post
#3
|
|
|
Group: Members Posts: 30 Joined: 10-January 07 From: NRW, Germany Member No.: 39526 |
1.50515 = 1/4 * 20*lg(2) - the smallest possible step of volume adjustment for mp3 files (and, probably, AAC - I just don't know). Thanks, that answers question 2 and also explains the difference between "Recommended dB change" and "Recommended mp3 gain" in aacgain's output. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd May 2013 - 10:51 |