Log in

View Full Version : The secret to a great stereo downmix?


Mackan
27th December 2012, 13:58
Hi,

Given a DTS or AC3 5.1 track, what could be the secret to obtain a good, well balanced, stereo downmix from it?

I know how to construct and perform a downmix via downmix matrices, and its coefficients. There are examples for pure stereo, or Dolby Pro Logic II, etc. I have done it many times, and there are many tools out there that can do this for you. For example Sox, which I use quite a lot.

However, all downmixes have in common that the dynamic range end up to be too big (I use contribution from all channels, except LFE). The dialogue is too low in volume compared to all other effects in the track.

I can of course try to adjust the downmix coefficients to achieve a better balanced mix, or to apply dynamic range compression. But in general, there seems to be no formula that fits all, and it's tedious guess work.

I was experimenting with applying Dolby's Film Standard DRC to my stereo tracks, but they sound too dull. I would like to keep the dynamic range of the original downmix, but with a higher dialogue volume. I don't know if it is possible to achieve this only with the proper downmix coefficients, or if further DRC is always required.

But any kind of extra processing on a stereo downmix also alters the audio quality. There is the dithering problem, and artifacts or distortion that comes with a compressor. For example, while Sox can apply compression, it doesn't seem to use adaptive attack and release times to compensate for the different frequency bands of the audio.

I have listened to some of the stereo mixes that come with iTunes movies, and they have a nicely balanced wave form when I look at it. It seems they accomplish what I cannot. There's also been some nice stereo mixes from HDTV shows that I have studied. One of them have a fantastic balance, and with a great warmth to it.

Given that all iTunes movies provide an additional stereo track to their 5.1 AC3 track, then what is their way of constructing this downmix? They must have some automated way, I suppose.

So in the end, what could be the secret way to achieve great sounding stereo mixes, both dynamic range wise, and quality wise? Very happy for any input on this matter. :)

hello_hello
29th December 2012, 18:56
What downmix co-efficents do you normally use? I just looked at the spec for AC3 and it seems the volume info can be included in an AC3 file to be used when decoding, but I've no idea whether it's generally present in AC3 audio streams or if the software we'd use to decode audio while downmixing pays attention to it.

If I understand the spec correctly only 3 values can be set for the centre channel volume reduction when decoding. -3dB, -4.5dB or -6dB. For the rear channels it's either -3dB or -6dB. According to the spec, when downmixing, the specified level should also be used, or if it's not set then -4.5dB should be used for the centre channel and -6dB for the rear channels. I was under the impression when converting to stereo, -3dB for the centre channel is the defacto standard. Probably the same for the rear channels, or maybe -6dB, I can't remember.

Not that I have an answer, but I'm not sure how downmixing could increase the dynamic range as such. Wouldn't the dialogue problem generally be fixed by simply increasing the centre channel level? Are you saying you've compared your downmixed audio with the original stereo track from the same movie and it's noticeably different? I can't say I've compared them much myself and I don't have the greatest sound system, but when I have I can't say I've noticed any differences (5.1ch being downmixed on playback for comparison), and to be honest this is the first thread I've come across where someone has posted regarding differences they hear. Maybe it just something to which I've not paid much attention.....

Mackan
30th December 2012, 10:49
What downmix co-efficents do you normally use? I just looked at the spec for AC3 and it seems the volume info can be included in an AC3 file to be used when decoding, but I've no idea whether it's generally present in AC3 audio streams or if the software we'd use to decode audio while downmixing pays attention to it.

If I understand the spec correctly only 3 values can be set for the centre channel volume reduction when decoding. -3dB, -4.5dB or -6dB. For the rear channels it's either -3dB or -6dB. According to the spec, when downmixing, the specified level should also be used, or if it's not set then -4.5dB should be used for the centre channel and -6dB for the rear channels. I was under the impression when converting to stereo, -3dB for the centre channel is the defacto standard. Probably the same for the rear channels, or maybe -6dB, I can't remember.


There's a lot of metadata that can be set for an AC3 file, including the downmix coefficients for stereo mode. The exact values of these coefficients are set by the audio engineer who produces the AC3 mix. Typically Dolby recommends -3dB for both center fold down and surround channels. But what actually sounds best probably varies a bit depending on the original 5.1 track. That's why there is no formula fits all. I do use -3dB since I have no time to sit and listen to possible differences for a whole movie track.


Not that I have an answer, but I'm not sure how downmixing could increase the dynamic range as such. Wouldn't the dialogue problem generally be fixed by simply increasing the centre channel level? Are you saying you've compared your downmixed audio with the original stereo track from the same movie and it's noticeably different? I can't say I've compared them much myself and I don't have the greatest sound system, but when I have I can't say I've noticed any differences (5.1ch being downmixed on playback for comparison), and to be honest this is the first thread I've come across where someone has posted regarding differences they hear. Maybe it just something to which I've not paid much attention.....

All stereo mixes I've produced myself never look or sound the same as ones I can study from professional sources, like iTunes. If you do a straight downmix with tools used by this forum, and use their recommended coefficients, you always end up with a too big dynamic range, in my opinion.

What I can see from the professional ones, is that they seem to use light compression. It looks like they have increased the dialogue level a bit, and compressed down the loudest parts a bit. From my experience, that's also how you end up with a good stereo mix from a 5.1 source. So I think they use a compressor after their downmix. You probably won't achieve a great downmix based on downmix coefficients only, but I was curious about it, if they have found out an automated way to perform it according to some general formula, that works well.

An original 5.1 track is meant to be listen on a 5.1 system. I don't have access to one, I mostly listen to my content on stereo equipment. But I think it is a very common phenomenon that people have to 'ride the volume' when listening to action movies, i.e. sometimes the dialogue is too low compared to other effects, and you raise the volume, but then the other effects blow your ears off, and you lower the volume, etc...

For dialogue, there is additional metadata such as dialnorm that can be set for AC3 tracks. It provides a reference level in dB where your dialogue in the movie occurs at. Once you know that, it's easier to process your audio with a compressor to sound better. But finding out this dialogue level is tricky, need special software that can measure it accurately.

bilditup1
31st December 2012, 03:30
For dialogue, there is additional metadata such as dialnorm that can be set for AC3 tracks. It provides a reference level in dB where your dialogue in the movie occurs at. Once you know that, it's easier to process your audio with a compressor to sound better. But finding out this dialogue level is tricky, need special software that can measure it accurately.

There is a -keepDialnorm switch which 'disables dialog normalization removal' in eac3to that isn't recommended, so I haven't tried it. Anybody else know more?

tebasuna51
31st December 2012, 14:48
Dialog Normalization (DialNorm) is not related with the problem exposed here.

The metadata value DialNorm show the volume of dialogs in the stream (typically -27 dB) and the AC3 decoder must attenuate all volume range by a value (typically -4 dB) to reach the defined AC3 standard dialog volume: -31 dB.
Is a good idea if all the audio was AC3 Dolby Digital compliant, but all others codecs can't use this value (DTS can but normally don't use) and you finish with the problem of low volume AC3 streams.
Instead provide a normalized dialog volume many others sources (CD Audio, commercials on TV, ...) try to output the max RMS volume (see http://en.wikipedia.org/wiki/Loudness_war ) with a poor Dynamic Range.

The problem here is related with the high Dynamic Range of DTS/AC3 5.1, recommended to listen high quality sound, but problematic when you need to downmix or listen with low quality audio equipment. There are some options to solve the problem:

- Some 5.1 streams have metadata info about Dynamic Range Compression (DRC), you can instruct the decoder to apply this info at play time or recode time.

- You can apply DRC to any stream, at play time, with receivers functions like "Night mode" or AC3Filter (DirectShow filter in PC) or, at recode time, with some utilities, for instance BeLight-BeSweet-Boost or Sox-compand.

- You can use a custom matrix to downmix 5.1 to 2.0 at your convenience, for instance with BeHappy-AviSynth.

smok3
31st December 2012, 18:30
Could this downmix be automated by using ebur128? (measuring a: dialog, b: M+FX and then downmixed based on hardcoded requested ratio of dialog vs M+FX and also using hardcoded values for compressors, probably one for dialog and another (stronger?) for M+FX.

+ at the end another r128 applied to the new mix.

btw, ffmpeg just got some sort of r128 scanner included by default lately.

orion44
10th November 2021, 00:33
You can apply DRC to any stream, at play time, with receivers functions like "Night mode" or AC3Filter (DirectShow filter in PC) or, at recode time, with some utilities, for instance BeLight-BeSweet-Boost or Sox-compand.

The following is Dolby's "Film Standard" preset :

Max Boost: 6 dB (below -43dB).
Boost Range: -43 to -31dB (2:1 ratio).
Null Band Width: 5dB (-31 to -26dB).
Early Cut Range: -26 to -16dB (2:1 ratio).
Cut Range: -16 to +4dB (20:1 ratio).

How do we replicate these parameters in Sox-compand?

Emulgator
10th November 2021, 10:28
For testing I just implemented these given parameters as a compression curve in CoolEdit.
I interpreted Null Bandwidth as a 5dB range of no compression/expansion (1:1, Gain 0dB).
Since the continuation of the given parameters towards input 0dBFS means an output top level of -20dBFS,
this comes out too low in volume, but might be intended for a real Night mode.
Besides, any time constants would be nice to have.
I used my "invisible favourite" 50ms Attack 150ms Decay, RMS.

tebasuna51
10th November 2021, 11:24
...How do we replicate these parameters in Sox-compand?

I try to do this with BeHappy here https://forum.doom9.org/showthread.php?p=779165#post779165

D3X
15th November 2021, 20:55
I would get my hands on a Creative X-Fi Soundblaster which can do optical in and out (with DTS en-/decoding preferably),
you hook it into itself and et voila, you can now choose exactly how many channels you wanna record up to 7.1 in PCM / DTS / DD :)