Opened 3 years ago

Last modified 12 months ago

#10209 reopened defect

EBUR128 and LOUDNORM filters compute LRA differently

Reported by: hsn Owned by:
Priority: normal Component: undetermined
Version: 7.1 Keywords: LRA, ebur128
Cc: Zulianino Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

ffmpeg -i song192k.mp4 -af ebur128,loudnorm=print_format=summary -f null -

Outputs:

[Parsed_ebur128_0 @ 000001f413d21a40] Summary:
  Integrated loudness:
    I:         -14.0 LUFS
    Threshold: -24.1 LUFS
  Loudness range:
    LRA:         3.6 LU
    Threshold: -33.9 LUFS
    LRA low:   -15.6 LUFS
    LRA high:  -12.0 LUFS
[Parsed_loudnorm_1 @ 000001f413fc4e40]
Input Integrated:    -14.2 LUFS
Input True Peak:      +0.1 dBTP
Input LRA:             5.9 LU
Input Threshold:     -24.3 LUFS

One LRA is 5.9 and second is 3.6. Song analysed by https://youlean.co/file-loudness-meter/ returns:

	Momentary Max = -9.81 LUFS
	Short Term Max = -11.50 LUFS
	Integrated = -14.00 LUFS

LRA definition is here: https://tech.ebu.ch/docs/tech/tech3342v2_0.pdf

Change History (12)

comment:1 by Balling, 3 years ago

What is song192k.mp4? eac3? Then you need to set -drc_scale 0.

comment:2 by hsn, 3 years ago

I uploaded source song but its just normal:

Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 139 kb/s (default)

comment:3 by Elon Musk, 3 years ago

Resolution: invalid
Status: newclosed

Invalid command. You need to run separate filters, as ebur128 by default use input sample rate and does not upsample to 192kHz.

Also no sample to reproduce.

comment:4 by Elon Musk, 3 years ago

Also you have not posted expected/correct LRA at all.

comment:5 by Balling, 3 years ago

I uploaded source song but its just normal:

Where is the file?

comment:6 by hsn, 3 years ago

File uploaded to https://streams.videolan.org/upload/

I don't believe its specific to file, here it computes different LRA for any file.

upsample to 192k doesn't change LRA.

ffmpeg -i song192k.mp4 -af aresample=192k,ebur128,loudnorm=print_format=summary -f null -

Software from Nugen audio we use in radio reports LRA 3.5, ILA -14.0 so it seems like EBUR128 filter is correct.

comment:7 by Elon Musk, 3 years ago

How long in seconds are files?

Too short files are known to give invalid results.

comment:8 by hsn, 3 years ago

45 seconds. TV intro.

comment:10 by Balling, 3 years ago

Intersting, but simply first decoding aac to wav (be it 24 bit or 16 bit, or whatever) allows one to produce

Input True Peak: +0.0 dBTP

and not (I also get that when I decode using aac):

Input True Peak: +0.1 dBTP

That happens because

ffmpeg -c:a aac_fixed -i palestine-song192k.mp4 -c:a pcm_s24le -af ebur128,loudnorm=print_format=summary -f null -

(aac_fixed) is not the default, LOLZ.

There is also an issue that AAC is not gapless in the end, but that should not matter much. But will check gapless stuff. Gapless stuff does not affect this, nice!

Last edited 3 years ago by Balling (previous) (diff)

comment:11 by Zulianino, 12 months ago

i have same issue.

using ebur128 i have a measured integrated of -24.0 and LRA of 8.5

ffmpeg -i 20250724_094226_1fefa141_TEST_MIXSC2353_5FR_pre_ffmpeg.mxf -hide_banner -af ebur128 -f null -

  Integrated loudness:
    I:         -24.0 LUFS
    Threshold: -34.5 LUFS

  Loudness range:
    LRA:         8.5 LU
    Threshold: -44.0 LUFS
    LRA low:   -30.0 LUFS
    LRA high:  -21.5 LUFS

  Sample peak:
    Peak:      -10.8 dBFS

while using loudnorm I have integrated of -24.59 and LRA of 9.7

ffmpeg -i 20250724_094226_1fefa141_TEST_MIXSC2353_5FR_pre_ffmpeg.mxf -af loudnorm=print_format=json -f null -

{
	"input_i" : "-24.59",
	"input_tp" : "-10.82",
	"input_lra" : "9.70",
	"input_thresh" : "-35.23",
	"output_i" : "-24.85",
	"output_tp" : "-10.75",
	"output_lra" : "6.30",
	"output_thresh" : "-35.26",
	"normalization_type" : "dynamic",
	"target_offset" : "0.85"
}

using broadcast software to analyze the files, results are equal to ebur128 filter

is someone able to check this?

Last edited 12 months ago by Zulianino (previous) (diff)

comment:12 by Zulianino, 12 months ago

Cc: Zulianino added
Resolution: invalid
Status: closedreopened
Version: 5.1.27.1
Note: See TracTickets for help on using tickets.