[FFmpeg-devel] [RFC] Audio normalization

Jan Ehrhardt phpdev at ehrhardt.nl
Fri Feb 22 19:04:58 CET 2013


Clément Bœsch in gmane.comp.video.ffmpeg.devel (Fri, 22 Feb 2013
17:09:26 +0100):
>The "exits immediately" is what I observe with the other tools under
>certain conditions; it's the issue which seems related to the audio
>framing I was mentioning.

My ffplay.exe exits even when I try to play a normal mp4. Must have
something to do with video drivers, although 'ffplay input.mp3' shows a
(hardly readable) graph with the volumes.

>The following seems to work for me:
>  ./ffmpeg -i in.mp3 -af ebur128=metadata=1,volume=metadata=lavfi.r128.I -y out.wav

I must have a stubborn mp3 file, because it will not work. End of the
first ffmpeg operation:

size=   49500kB time=00:04:24.02 bitrate=1535.9kbits/s
video:0kB audio:49500kB subtitle:0 global headers:0kB muxing overhead
0.000158%
[Parsed_ebur128_0 @ 032f0660] 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

This is a really low volume mp3, our worst case. If I use the output of
the first round as input for the second try, it ends with almost exactly
the same stats (.02 seconds shorter and a slightly different bitrate):

size=   49500kB time=00:04:24.00 bitrate=1536.0kbits/s
video:0kB audio:49500kB subtitle:0 global headers:0kB muxing overhead
0.000158%
[Parsed_ebur128_0 @ 04280b40] 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

Inputfile http://x32.elijst.nl/nl105902.opt.mp3

Jan



More information about the ffmpeg-devel mailing list