[FFmpeg-devel] [PATCH 2/2] lavfi/volume: support volume normalization through metadata.

Nicolas George nicolas.george at normalesup.org
Sun Feb 24 13:00:03 CET 2013

Le quartidi 4 ventôse, an CCXXI, Clement Boesch a écrit :
> ---
>  libavfilter/af_volume.c          | 39 ++++++++++++++++++++++++++++++++-------
>  libavfilter/af_volume.h          |  1 +
>  libavfilter/x86/af_volume_init.c |  2 +-
>  3 files changed, 34 insertions(+), 8 deletions(-)

IMHO, a more elegant approach would be to use Stefano's proposal for dynamic
expression re-evaluation. The simplest way of doing that would be to inject
the relevant metadata variable into the expression variables. A more generic
solution would be to allow accessing all metadata info directly from the
expression, but that requires more work.

Also, volume normalization needs to be very slow, otherwise the resulting
audio will sound very flat. None of the variables injected by ebur128 seems
to fit that requirement. The best bet seems to be lavfi.r128.M smoothed over
a period of several seconds.

Also, is someone working on a dynamic range compression filter? For volume
normalization, it may be a better tool than a simple volume filter.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130224/db4c3072/attachment.asc>

More information about the ffmpeg-devel mailing list