Forums

AGC for media (video) player software

Started by dv_ June 19, 2013
Hello,

AGCs have been discussed here several times. However, there is one aspect I
haven't seen mentioned here so far.

There are many videos with a rather low sound level (especially VCR
captures often have a very silent audio track). Also, it is unfortunately
quite common that a video stream contains rather silent main content,
interrupted by very loud ads. A replaygain prepass over videos is often not
practical, either because the video is long, or because it is an internet
stream. So, an AGC seems to fit the bill.

Most AGCs seem to have more or less fixed attack and decay speeds, usually
controlled by a gain parameter. However, this is bad for videos, since all
of a sudden, the volume can increase drastically. So what I'd need is an
AGC with some additional feature that immediately adjusts the amplification
(or attenuation) if the dB level changes severely. Many AGCs I've found so
far unfortunately end up causing clipping artifacts because the resulting
volume exceeds 0 dB.

Are there any known specialized AGCs that could help here?

	 

_____________________________		
Posted through www.DSPRelated.com
>Hello, > >AGCs have been discussed here several times. However, there is one aspect
I
>haven't seen mentioned here so far. > >There are many videos with a rather low sound level (especially VCR >captures often have a very silent audio track). Also, it is unfortunately >quite common that a video stream contains rather silent main content, >interrupted by very loud ads. A replaygain prepass over videos is often
not
>practical, either because the video is long, or because it is an internet >stream. So, an AGC seems to fit the bill. > >Most AGCs seem to have more or less fixed attack and decay speeds,
usually
>controlled by a gain parameter. However, this is bad for videos, since
all
>of a sudden, the volume can increase drastically. So what I'd need is an >AGC with some additional feature that immediately adjusts the
amplification
>(or attenuation) if the dB level changes severely. Many AGCs I've found
so
>far unfortunately end up causing clipping artifacts because the resulting >volume exceeds 0 dB. > >Are there any known specialized AGCs that could help here? > > > >_____________________________ >Posted through www.DSPRelated.com >
As far as I know, log-domain AGCs converge faster than those working at signal levels themselves. _____________________________ Posted through www.DSPRelated.com
>As far as I know, log-domain AGCs converge faster than those working at >signal levels themselves. > >_____________________________ >Posted through www.DSPRelated.com >
But even if this is the case, isn't it possible that, given a sudden and large enough increase of the input signal, that it would not converge fast enough to avoid >0dB? I was thinking about adding some kind of extra check that looks if >0dB would happen, and if so, immediately reset it to accomodate for this increase. (I would be using a lookahead buffer.) But then again, not even mplayer's volnorm audio filter seems to be doing that (for those who are interested, it can be seen here: http://repo.or.cz/w/mplayer.git/blob/HEAD:/libaf/af_volnorm.c#l165 ), so perhaps it is enough to choose a reasonable convergence speed and consider extreme cases as outliers (0->100% from one sample to the next, for example). _____________________________ Posted through www.DSPRelated.com
On 6/19/2013 11:58 PM, dv_ wrote:
>> As far as I know, log-domain AGCs converge faster than those working at >> signal levels themselves.
> But even if this is the case, isn't it possible that, given a sudden and > large enough increase of the input signal, that it would not converge fast > enough to avoid >0dB? I was thinking about adding some kind of extra check > that looks if >0dB would happen, and if so, immediately reset it to > accomodate for this increase. (I would be using a lookahead buffer.)
Some time ago I tried something like that. Problem is: if gain is quickly adjusted to avoid clipping, it creates very unpleasant artifacts. It really sounds better to allow for some clipping of peak values rather then change gain faster then, say, 10ms. Perhaps, one could quantify distortions due to clipping and due to gain change and find perceptionally optimal AGC attack rate. Vladimir Vassilevsky DSP and Mixed Signal Designs www.abvolt.com
See page 8-7 or 8-48 here: http://archives.telex.com/archives/Merlin/ISP-100%20Manual/ISP-100%20Users%20manual%20Rev%20A.pdf