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

Clément Bœsch ubitux at gmail.com
Fri Mar 1 18:03:58 CET 2013


On Wed, Feb 27, 2013 at 02:25:44PM +0100, Nicolas George wrote:
> Le nonidi 9 ventôse, an CCXXI, Clement Boesch a écrit :
> > I'm not sure how the expression eval would really help, but I could make
> > ebur128 inject the volume adjustment instead of making af volume compute
> > it.
> 
> We already have expression eval, that is not the issue. The issue is that
> Stefano proposed a patch to re-evaluate the expression for each frame. With
> this patch, volume normalization becomes almost trivial, it is just a matter
> of using the correct expression.
> 

Do you mean something like "volume=@{metadata_key}" or I'm still in the
fog?

> > Basically you have:
> >     M: analysis of the last 400ms
> >     S: analysis of the last 3s
> >     I: overall
> > 
> > I and S are fairly decent for "real-time" normalization.
> 
> Even 3 seconds is rather too short for volume normalization. Furthermore, if
> I understand you correctly, S(t) is the loudness for the ] t-3s; t ]
> interval.

Yes, with an overlap of 100ms. The integrated loudness value provides
interesting results here.

>           IMHO, volume normalization would require some lookahead too,
> probably with a symmetrical interval.
> 

I'm not sure that's really necessary; a symmetrical interval would mean
you try to minimize punctual blasts, which is not desired (at least in
what the authors of R128 were aiming), but I may be wrong.

I'll resend a patchset soon, where the volume filter changes is more
flexible and will allow you to experiment such symmetrical interval with
another filter (volumedetect for instance). You should be able to hack
into ebur128 as well to inject different info.

-- 
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/20130301/798ef615/attachment.asc>


More information about the ffmpeg-devel mailing list