Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I am a little confused about how loudness is calculated for a mono audio track.
If I only have a 1-speaker sound system, which mono mode is the correct one to use: left or right, center, or dual?
I believe by default libebur128 treats a mono track as a left channel mono track. You can of course explicitly set the channel to the other modes as well.
Here is my normalization example:
If I then measure the integrated loudness using FFMPEG's ebur128 filter, I get -16 LUFS.
However, if I use libebur128 with the default channel configuration of left channel mono, I will get a value that is below -19 LUFS (-3 LU less).
If I use libebur128 and explicitly set the channel to dual mono channel configuration mode instead, I get -16 LUFS.
So this is where I am confused.
Shouldn't I have gotten -16 LUFS under the default libebur128 channel configuration for mono (left channel)?
Why does setting to dual mono give me the expected result of -16 LUFS?
Are you sure that the f32le wav file is mono? I've compared ffmpeg and libebur128 and they are showing the same behavior in my test:
I have generated the mono file with
I haven't been able to get the "loudness" command to find plugins so I can test it out myself. See the issue I raised in the loudness-scanner git.
How does the loudness scan commandline handle mono files?
I looked through the code and from scanner-common.h there is a struct scan_opts. This struct contains a field: force_dual_mono
Is this TRUE or FALSE by default?
If it is TRUE by default, then the loundness scan tool will be operating in dual mono mode for a mono audio file.
I got loudness-scanner working.
It shows the same intregrated loudness value as ffmpeg for my mono file.
But when I use libebur128 directly, using the default channel mode of left channel, I am getting a result that is about 3 LU less. Only if I set the channel mode to dual mono do I get the same integrated loudness as ffmpeg and loudness-scanner.
This makes me believe loudness-scanner is working in dual mono mode.
Thanks. I built minimal-example and ran it against my mono file.
It returned the expected integrated loudness value.
So now I'm trying to figure out why my custom code that uses libebur128 requires dual mono mode to get the same result.
My custom code uses float 32-bit pcm data so I use the function ebur128_add_frames_float instead though. I'm not sure if that makes a difference.
There have been numerous discussion in the EBU ploud group about the measure of mono signals.