[FFmpeg-devel] [PATCH 2/2] lavfi/volume: support volume normalization through metadata.
Clément Bœsch
ubitux at gmail.com
Wed Feb 27 14:12:32 CET 2013
On Mon, Feb 25, 2013 at 02:14:04AM +0100, Jan Ehrhardt wrote:
> Clément Bsch in gmane.comp.video.ffmpeg.devel (Fri, 22 Feb 2013
> 00:22:40 +0100):
> >+ new_volume = -23 - loudness;
> >+ //av_log(0,0,"loudness=%f => %f => volume=%f\n", loudness, new_volume, pow(10, new_volume / 20));
> >+ if (loudness > -30)
> >+ set_fixed_volume(vol, pow(10, new_volume / 20));
>
> Aha, I found the reason why it did not work on my (worst case) sample
> file. The condition 'if (loudness > -30)' prohibited to change the
> volume, because the loudness of the input was -41.6 LUFS:
>
> [Parsed_ebur128_2 @ 0000000004183a40] 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
>
> After removing the condition the volume was raised by something like 8.5
> and produced a file that was right on track with the -23 LUFS as
> recommended by EBU r128:
>
> [Parsed_ebur128_4 @ 0000000004183f20] Summary:
> Integrated loudness:
> I: -23.0 LUFS
> Threshold: -33.1 LUFS
>
> Loudness range:
> LRA: 6.0 LU
> Threshold: -43.1 LUFS
> LRA low: -26.4 LUFS
> LRA high: -20.4 LUFS
>
> There was some noise in the background, so maybe the volume change was a
> bit overdone (and should be capped). But it looks promising.
>
Yeah well the idea of that arbitrary check was to prevent raising the
volume too high (and avoid the noise effect you have). Though, -30 was
likely a very bad value.
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130227/57e94f68/attachment.asc>
More information about the ffmpeg-devel
mailing list