[FFmpeg-devel] [PATCH 2/2] lavfi/volume: support volume normalization through metadata.
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel