[FFmpeg-devel] [RFC] Audio normalization

Jan Ehrhardt phpdev at ehrhardt.nl
Sat Feb 23 05:18:19 CET 2013


Jan Ehrhardt in gmane.comp.video.ffmpeg.devel (Fri, 22 Feb 2013 16:45:56
+0100):
>Clément Bœsch in gmane.comp.video.ffmpeg.devel (Fri, 22 Feb 2013
>00:22:38 +0100):
>>How to test it:
>>
>>    ./ffplay -f lavfi -i
>>	'amovie=in.mp3,ebur128=video=1:metadata=1[r128-before][a];
>>	[a]volume=metadata=lavfi.r128.I,ebur128=video=1[r128-after][out1];
>>	[r128-before] pad=iw*2 [padded]; [padded][r128-after] overlay=w'
>
>This one exits immediately in my cross-compiled ffplay.exe, bit that may
>be a problem with the cross-compiling.

I got ffplay.exe to work, which confirmed my first findings that the
volume did not change. Same volume before/left and after/right.

>-filter_complex
>	"[0:v]setpts=PTS-STARTPTS[v0]; \
>	[0:a]asetpts=PTS-STARTPTS,ebur128=metadata=1[a0]; \
>	[a0]volume=metadata=lavfi.r128.I,ebur128[a1]" \
>	-map [v0] -map [a1]

Bur after applying the 'lavfi/ebur128: fix format negociation for
output' patch (with an offset of 28 lines) this one ended with a
surprise:

[Parsed_ebur128_4 @ 0000000003fbb740] Summary:

  Integrated loudness:
    I:          10.0 LUFS
    Threshold: 377.0 LUFS

  Loudness range:
    LRA:         0.0 LU
    Threshold: 367.0 LUFS
    LRA low:    10.0 LUFS
    LRA high:   10.0 LUFS
[Parsed_ebur128_2 @ 000000000033d2e0] Summary:

  Integrated loudness:
    I:         -41.6 LUFS
    Threshold: -51.7 LUFS

  Loudness range:
    LRA:         6.0 LU
    Threshold: -61.7 LUFS
    LRA low:   -45.0 LUFS
    LRA high:  -39.0 LUFS

FFplay had the same behaviour: very noisy and the graph on the right
side became completely filled, up to 10 LUFS. I know now my
filter_omplex works and changes the volume. But not yet to the desired
loudness. Closing in...

Jan



More information about the ffmpeg-devel mailing list