IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
aacgain in dBs
Azevedo
post May 3 2014, 00:35
Post #1





Group: Members
Posts: 100
Joined: 3-November 08
Member No.: 61632



Hi!

I'm using ffmpeg to encode an audio source to MP4 AAC using the switch -af volumedetect.
(actually I convert it to PCM wav and pipe the output to NERO AAC, but it is not the point)

Works neat and yet gives me the volume analysis bellow so I can save time and CPU not having to run aacgain to analyse the AAC stream to find the volume.
(Considering the source audio will be from a movie-kind length, so 2 hours+, which takes sooooooo long for aacgain to analyses and apply gain to it.)

[Parsed_volumedetect_0 @ 0000000000388040] n_samples: 5763072
[Parsed_volumedetect_0 @ 0000000000388040] mean_volume: -30.7 dB
[Parsed_volumedetect_0 @ 0000000000388040] max_volume: -6.2 dB
[Parsed_volumedetect_0 @ 0000000000388040] histogram_6db: 9
[Parsed_volumedetect_0 @ 0000000000388040] histogram_7db: 39
[Parsed_volumedetect_0 @ 0000000000388040] histogram_8db: 146
[Parsed_volumedetect_0 @ 0000000000388040] histogram_9db: 370
[Parsed_volumedetect_0 @ 0000000000388040] histogram_10db: 987
[Parsed_volumedetect_0 @ 0000000000388040] histogram_11db: 1907
[Parsed_volumedetect_0 @ 0000000000388040] histogram_12db: 3315


By doing some test I found that I have to apply this amount of gain to the encoded AAC file: 6.2 dB in order to get 89dB volume.

The problem comes up when I try to use aacgain.exe to apply those 6.2 dB to the AAC stream so it will be @ 89dB.

aacgain.exe /e encoded.mp4
Recommended "Track" dB change: 6.320000
Recommended "Track" mp4 gain change: 11
Max PCM sample at current gain: 3429.587245




From aacgain -h:
/g <i> - apply gain i without doing any analysis

And finally: aacgain.exe /g 6.2

It does apply the gain but instead of 89dB it goes to 101dB!

Am I doing something wrong or this aacgain tool won't do the gain in dBs as expected?

This post has been edited by Azevedo: May 3 2014, 00:38
Go to the top of the page
+Quote Post
[JAZ]
post May 3 2014, 00:41
Post #2





Group: Members
Posts: 1798
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



Even though I don't think you are obtaining what you think you obtain (i.e. max volume is not directly related to loudness), you are making a trivial mistake.


What is in here: "-6.2" that isn't in here: "6.2".
Or what's the difference between 101 and 89? 12. What's 6+6? 12.
Go to the top of the page
+Quote Post
Azevedo
post May 3 2014, 00:56
Post #3





Group: Members
Posts: 100
Joined: 3-November 08
Member No.: 61632



QUOTE
What is in here: "-6.2" that isn't in here: "6.2".

Well its obvious I want a gain of 6.2dB and I'm not getting it by

aacgain.exe /g 6.2 encoded.mp4

QUOTE
Or what's the difference between 101 and 89? 12. What's 6+6? 12.

Coincidence my friend.
There is no correlation between those numbers ( I tested in others situations )

but thanks for answering

This post has been edited by Azevedo: May 3 2014, 01:27
Go to the top of the page
+Quote Post
larswes
post May 3 2014, 07:13
Post #4





Group: Members
Posts: 55
Joined: 25-September 04
From: Sweden
Member No.: 17288



-6.2 dB is not a replaygain value, so it's useless if you want to aacgain to 89 dB.
-6.2 dB only tells you how far from clipping you are:
https://www.ffmpeg.org/ffmpeg-filters.html#volumedetect

This post has been edited by larswes: May 3 2014, 07:18
Go to the top of the page
+Quote Post
[JAZ]
post May 3 2014, 12:34
Post #5





Group: Members
Posts: 1798
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



QUOTE (Azevedo @ May 3 2014, 01:56) *
Well its obvious I want a gain of 6.2dB and I'm not getting it by

QUOTE
The problem comes up when I try to use aacgain.exe to apply those 6.2 dB to the AAC stream so it will be @ 89dB.
It does apply the gain but instead of 89dB it goes to 101dB!


Well... It is obvious to me that you do NOT want a gain of 6.2 dB.
QUOTE
/g <i> - apply gain i without doing any analysis

A gain increases the volume.

Said that, I would like to know where did you get the 101dB value from. Scanning the modified file with aacgain? If so, what does it report previous to add the gain?


QUOTE (Azevedo @ May 3 2014, 01:56) *
Coincidence my friend.
There is no correlation between those numbers ( I tested in others situations )


I know there is no correlation with the max_volume: -6.2 dB and the it goes to 101dB!. The question is what are you doing? (Other than using the wrong value)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th December 2014 - 07:46