[FFmpeg-user] Preserving perceived loudness when downmixing audio from 5.1 AC3 to stereo AAC

Andy Furniss adf.lists at gmail.com
Sun Aug 4 22:11:29 CEST 2013

Francois Visagie wrote:

> I don't think this is the desired outcome, to achieve unified audio
> processing but with significant reduction in perceived volume in the
> process. Is there any further testing I can do to help investigate and
> hopefully improve this situation?

Down mixing is not ideal. Lower volume is expected.

If you don't want the result to clip then you have to normalise enough 
to allow for all input channels being full level - even though that may 
be rare in practice.

As you are dealing with ac3 you should also be aware that a studio 
produced stream will usually carry mata data specifying dynamic range 
control and by default ffmpeg applies this fully so you get the 
restricted the range output. Just turning this off with

-drc_scale 0

will however produce something that IMHO has too much range - it's not 
actually on/off it's float so you can do in between 0 and 1.

ac3 also has meta data for downmix so using -request_channels 2 should 
in theory get a downmix as the studio intended - but of course it's 
still normalised to prevent clipping and it's still compromised by the 
fact it's a downmix.

I don't know if there's a way with ffmpeg to analyse and adjust the 
whole downmixed track to boost the levels to take advantage of any headroom.

You can certainly do it with sox (working on pcm)

Slight digression - last time I looked at dts/dca codecs default downmix 
it was a clipping stereo squashing mess - nice and loud though, but 
really. don't think it's OK or anything to aim for should you happen to 
ever test.

Not much use for your need, but as for the future - the nice thing about 
Dolby Truehd and DTS MA is that they mix up, so a stereo user like me 
should get an "artistic" studio mix rather than something kludged down.

AFAIK dts ma isn't supported yet truehd is (but no drc support) - and 
this is just decode.

More information about the ffmpeg-user mailing list