[FFmpeg-user] ebur128 - integrated loudness calculation based on collected M samples

Neb Eps epsneb at gmail.com
Wed Aug 26 10:26:37 CEST 2015


I am using ebur128 filter to capture 'M' (Momentary) samples for further
'I' (Integrated loudness) processing based on start/stop timestamps.

ffmpeg -threads auto -nostats -i udp://239.255.0.1:5000 -vn -map p:13106:1
-af ebur128 -f null -

Example output :

[Parsed_ebur128_0 @ 0x317d440] t: 0.0999792  M:-120.7 S:-120.7     I: -70.0
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 0.199979   M:-120.7 S:-120.7     I: -70.0
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 0.299979   M:-120.7 S:-120.7     I: -70.0
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 0.399979   M: -24.8 S:-120.7     I: -24.8
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 0.499979   M: -24.4 S:-120.7     I: -24.6
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 0.599979   M: -24.6 S:-120.7     I: -24.6
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 0.699979   M: -24.4 S:-120.7     I: -24.5
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 0.799979   M: -24.8 S:-120.7     I: -24.6
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 0.899979   M: -25.0 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 0.999979   M: -25.1 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 1.09998    M: -24.7 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 1.19998    M: -24.7 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 1.29998    M: -24.3 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 1.39998    M: -24.5 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 1.49998    M: -24.8 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 1.59998    M: -24.8 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 1.69998    M: -25.1 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 1.79998    M: -24.9 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 1.89998    M: -24.8 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 1.99998    M: -25.0 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 2.09998    M: -24.8 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 2.19998    M: -24.6 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 2.29998    M: -24.3 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 2.39998    M: -24.0 S:-120.7     I: -24.7
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 2.49998    M: -24.0 S:-120.7     I: -24.6
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 2.59998    M: -23.9 S:-120.7     I: -24.6
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 2.69998    M: -23.9 S:-120.7     I: -24.6
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 2.79998    M: -24.1 S:-120.7     I: -24.6
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 2.89998    M: -24.4 S:-120.7     I: -24.5
LUFS     LRA:   0.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 2.99998    M: -24.9 S: -24.6     I: -24.6
LUFS     LRA:  20.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 3.09998    M: -25.3 S: -24.6     I: -24.6
LUFS     LRA:  20.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 3.19998    M: -25.5 S: -24.7     I: -24.6
LUFS     LRA:  20.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 3.29998    M: -25.3 S: -24.6     I: -24.6
LUFS     LRA:  20.0 LU
[Parsed_ebur128_0 @ 0x317d440] t: 3.39998    M: -25.4 S: -24.7     I: -24.7
LUFS     LRA:   0.1 LU
[Parsed_ebur128_0 @ 0x317d440] t: 3.49998    M: -25.2 S: -24.7     I: -24.7
LUFS     LRA:   0.1 LU
[Parsed_ebur128_0 @ 0x317d440] t: 3.59998    M: -25.3 S: -24.8     I: -24.7
LUFS     LRA:   0.2 LU
[Parsed_ebur128_0 @ 0x317d440] t: 3.69998    M: -25.7 S: -24.8     I: -24.7
LUFS     LRA:   0.2 LU
[Parsed_ebur128_0 @ 0x317d440] t: 3.79998    M: -25.7 S: -24.8     I: -24.7
LUFS     LRA:   0.2 LU
[Parsed_ebur128_0 @ 0x317d440] t: 3.89998    M: -26.3 S: -24.9     I: -24.8
LUFS     LRA:   0.2 LU
[Parsed_ebur128_0 @ 0x317d440] t: 3.99998    M: -26.4 S: -24.9     I: -24.8
LUFS     LRA:   0.3 LU
[Parsed_ebur128_0 @ 0x317d440] t: 4.09998    M: -25.9 S: -24.9     I: -24.8
LUFS     LRA:   0.3 LU
[Parsed_ebur128_0 @ 0x317d440] t: 4.19998    M: -25.7 S: -24.9     I: -24.9
LUFS     LRA:   0.3 LU

Above output is then parsed into series of timestamp,M(omentum) data:

2015-08-24 18:00:00,-22.0
2015-08-24 18:00:00,-21.4
2015-08-24 18:00:00,-21.9
2015-08-24 18:00:00,-21.3
2015-08-24 18:00:00,-21.8
2015-08-24 18:00:00,-22.1
2015-08-24 18:00:00,-20.8
2015-08-24 18:00:00,-20.9
2015-08-24 18:00:00,-21.1
2015-08-24 18:00:01,-22.6
2015-08-24 18:00:01,-23.8
2015-08-24 18:00:01,-26.2
2015-08-24 18:00:01,-28.5
2015-08-24 18:00:01,-28.9
2015-08-24 18:00:01,-25.9
2015-08-24 18:00:01,-24.2
2015-08-24 18:00:01,-22.2
2015-08-24 18:00:01,-21.3
2015-08-24 18:00:01,-22.2
2015-08-24 18:00:02,-21.5
2015-08-24 18:00:02,-21.3
2015-08-24 18:00:02,-20.6
2015-08-24 18:00:02,-20.3
2015-08-24 18:00:02,-21.1
2015-08-24 18:00:02,-21.0
2015-08-24 18:00:02,-20.6
2015-08-24 18:00:02,-21.0
2015-08-24 18:00:02,-21.8
2015-08-24 18:00:03,-24.0
2015-08-24 18:00:03,-24.7
2015-08-24 18:00:03,-22.6
2015-08-24 18:00:03,-21.9
2015-08-24 18:00:03,-21.5
2015-08-24 18:00:03,-20.8
2015-08-24 18:00:03,-21.8
2015-08-24 18:00:03,-20.9
2015-08-24 18:00:03,-20.2
2015-08-24 18:00:03,-19.7
.
.
.
2015-08-24 18:10:00,-23.6



Please ignore the fact that data ('I' value) in both examples are different
- samplese were taken in different time so values are different.

I have been trying to cruch f_ebu128.c

https://www.ffmpeg.org/doxygen/2.7/f__ebur128_8c_source.html

to find a way how to compute I from M values but with no success so far.


I am having difficulties with implementation 'overlap between consecutive
gating blocks of 75%"
mantion in EBU – TECH 3341

https://tech.ebu.ch/docs/tech/tech3341.pdf

-----

2.3 The measurement gate.

1. using an absolute 'silence' gating threshold at -70 LUFS for the
computation of the absolute-gated loudness level;

2. using a relative gating threshold, 10 LU below the absolute-gated
loudness level;

3. The measurement input to which the gating threshold is applied is the
loudness of the 400 ms blocks with a constant overlap between consecutive
gating blocks of 75%.

-----

So the question is how to calculate "I" based on collected "M" values?

Thanks
Eps


More information about the ffmpeg-user mailing list