Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very low loudness values #120

Open
Rohit-Khali opened this issue Oct 26, 2021 · 6 comments
Open

Very low loudness values #120

Rohit-Khali opened this issue Oct 26, 2021 · 6 comments

Comments

@Rohit-Khali
Copy link

Hi,

For a specific audio stream, I am getting very low values for momentary(M) and short term loudness(S). Even with FFMPEG values are very low but seems consistent.

Is this something expected?

Example:
libebur128: M(-1576.563004 LUFS) S(-1045.551367 LUFS)
FFMPEG: M:-163.5 S:-172.3
* I do compare loudness values with -HUGE_VAL and if 'true', assigns -80.
Maybe I should treat all these low values as -80 only.

aud-loudness ffmpeg.txt
aud-loudness libebur128.txt

Thanks in advance!

Rohit Khali

@jiixyj
Copy link
Owner

jiixyj commented Oct 26, 2021

This is expected behavior of the low pass filter. If the current filter state is non-zero (i.e. if you fed it some audio) it will take a bit of time for the filter state to be "all zero" again when you feed it with silence.

@jiixyj
Copy link
Owner

jiixyj commented Oct 26, 2021

I guess the different values between ffmpeg and libebur128 can be explained by some internal thresholds or different data types used for the calculations.

@Rohit-Khali
Copy link
Author

Thanks for the response. I am bit curious here. What is the the minimum possible loudness value just before -INF?
Just want to be sure that -1576.563004 LUFS is a legitimate loudness value.

@jiixyj
Copy link
Owner

jiixyj commented Oct 28, 2021

What is the the minimum possible loudness value just before -INF?

Should be around DBL_MIN I think (so not a subnormal number because those are flushed to zero).

@Rohit-Khali
Copy link
Author

Thanks, I was in impression that min loudness just before -INF will depend upon the audio sample size/type.
Something like 20*log10(1/(2^31-1))=-186.638597308.

@jiixyj
Copy link
Owner

jiixyj commented Oct 28, 2021

It all depends on the implementation of the filter. libebur128 uses a IIR filter, so its output, when fed silence, will approach zero like you are observing. It will only become zero when the output reaches the subnormal numbers, at which point the output is flushed to zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants