Log in

View Full Version : Downmix 6-ch audio to stereo


manolito
10th September 2016, 00:41
I know this must have been discussed before, but I do get conflicting information about this topic...

I am in the process of convertng my movie collection from the DVD format (MPEG2 /AC3) to AVC /AAC in an MKV container. Most of my sources are TV captures with 2-ch audio, but some sources are from DVD with 6-ch audio. I do not own a surround audio setup, and I have no intention to get one ever. So I want to downmix the 6-ch audio to stereo.

Now I have three options:
1. Downmix to plain stereo
2. Downmix to DPL1
3. Downmix to DPL2
(DPL stands for Dolby ProLogic)

I do rember from many years ago that DPL2 was recommended over DPL1 for sounding much better. But I also read a couple of times that downmixing to plain stereo is the way to go if the result will not be fed to a surround amp which will "decode" the DPL downmix to multi-channel.

As I already said, I have no intention to play the converted files using a home theater system. I just want the result to sound as good as possible on a stereo audio system.

Obviously I cannot test this because I do not have any surround sound hardware. Is there any consensus in the audio community which downmix algorithm generally sounds best on a plain stereo system?


Cheers
manolito

Sparktank
10th September 2016, 00:50
For just a stereo playback without DPL capable surround sound system, I'd just stick to simple stereo.

eac3to -downStereo uses simple stereo.
For DPL in eac3to, you need to call -downDPL.
http://forum.doom9.org/showthread.php?p=1600695#post1600695

tebasuna51
10th September 2016, 12:22
Of course the plain/simple stereo downmix is recommended, like Spartank say.

From some DVD 5.1 sources you can experiment low dialog volume, in that case you can try apply DRC (Dynamic Range Compression) before downmix the 5.1 source.

Like eac3to never apply the DRC you can try with BeHappy configuring the decoder like NicAc3Source (DRC) or NicDtsSource (DRC), apply after the Downmix Stereo and Normalize.

manolito
10th September 2016, 22:48
Thanks guys...:thanks:

pandy
12th September 2016, 10:42
My 2 cents - using DPL may give sometimes weird results especially in TV where some voice processing is performed - due phase relation sometimes it works in opposite way i.e. instead more legible voice (dialogues) they are less legible.
Personally i prefer some non standard downmixing to stereo with dynaudnorm filter in ffmpeg.
"pan=stereo|FL<FL+1.414FC+0.5BL+0.5SL+0.5BC+0.25LFE+0.01BR|FR<FR+1.414FC+0.5BR+0.5SR+0.5BC+0.25LFE+0.01BL,dynaudnorm=p=1/sqrt(2):m=100:s=12"

TheSkiller
12th September 2016, 18:07
Correct me if I'm wrong but doesn't a simple (non-DPL) stereo downmix such as -downStereo simply discard (rather than mix) the surround channels? Which should be rather undesireable (like, if there is a sound only in the sourround channels but not at all in the front or center, it's gone in the stereo result).

manolito
12th September 2016, 21:01
This is the simple 6ch -> stereo downmix routine for AviSynth (thanks to Tebasuna):

Function Dmix6Stereo(clip a)
{
flr = GetChannel(a, 1, 2)
fcc = GetChannel(a, 3, 3)
lrc = MixAudio(flr, fcc, 0.3694, 0.2612)
blr = GetChannel(a, 5, 6)
return MixAudio(lrc, blr, 1.0, 0.3694)
}

The surround channels do not get discarded here, only the LFE channel does... :p


Cheers
manolito


//EDIT//
In my work flow I use Staxrip which employs BeSweet for audio processing. The azid plugin is responsible for downmixing, and I have no idea how azid handles this. The azid readme does not say anything about the downmix coefficients.

Sparktank
13th September 2016, 00:18
From thread:
eac3to v3.24 Bugs & Improvements
http://forum.doom9.org/showthread.php?t=166487


Downmix improvements
- Add a new parameter for simple stereo downmix. [OK in 3.25]

Takes you to...
http://forum.doom9.org/showthread.php?p=1600695#post1600695

for 5.0/5.1 content...
3/2 or 3/2.1
Stereo
FL' = FL + 0.7071 x FC + BL
FR' = FR + 0.7071 x FC + BR
Dpl
FL' = FL + 0.7071 x FC + 0.8660 x BL + 0.5000 x BR
FR' = FR + 0.7071 x FC - 0.5000 x BL - 0.8660 x BR

For 7.0/7.1 content...
3/2/2 or 3/2/2.1
Stereo
FL' = FL + 0.7071 x FC + BL + SL
FR' = FR + 0.7071 x FC + BR + SR
Dpl
FL' = FL + 0.7071 x FC + 0.8660 x (BL + SL) + 0.5000 x (BR + SR)
FR' = FR + 0.7071 x FC - 0.5000 x (BL + SL) - 0.8660 x (BR + SR)

tebasuna51
13th September 2016, 00:21
//EDIT//
In my work flow I use Staxrip which employs BeSweet for audio processing. The azid plugin is responsible for downmixing, and I have no idea how azid handles this. The azid readme does not say anything about the downmix coefficients.

Azid have also 3 downmix to stereo modes: stereo, dpl (default), dplii
Select the 'stereo' mode than is equivalent to Function Dmix6Stereo

My coefficients are based in old discusions about BeSweet/Azid downmix: http://forum.doom9.org/showthread.php?t=57988
I only translated them to AviSynth (with some tunes).

EDIT: You can read in that historic thread:
DSPguru announcing a new BeSweet binary
Midas announcing Azid v1.9

tebasuna51
13th September 2016, 00:46
for 5.0/5.1 content...
3/2 or 3/2.1
Stereo
FL' = FL + 0.7071 x FC + BL
FR' = FR + 0.7071 x FC + BR


This is the plain stereo mix, like FC is present in both channels we need attenuate by sqr(2)/2 = 0.7071 to obtain the same acustic power.

Remember than eac3to work in float 64 samples, if there are overflow (FL' or FR' > 1.0) eac3to apply a negative gain without clip the samples when convert to 24 int samples default output.

Like AviSynth Function Dmix6Stereo() must work also with int samples, I need use a normalized conversion to avoid overflows:

FL' = 0.3694 x FL + 0.2612 x FC + 0.3694 x BL
FR' = 0.3694 x FR + 0.2612 x FC + 0.3694 x BR

Whit:
0.3694 = 1 / 2.7071
0.2612 = 0.7071 / 2.7071

To avoid low volume is always recommended Normalize() after

pandy
20th September 2016, 10:45
Correct me if I'm wrong but doesn't a simple (non-DPL) stereo downmix such as -downStereo simply discard (rather than mix) the surround channels? Which should be rather undesireable (like, if there is a sound only in the sourround channels but not at all in the front or center, it's gone in the stereo result).

Nope - stereo downmix keep surround audio and front information - only LFE is optional but as some recording may have removed LFE from all channels i always prefer to add some LFE signal to final downmix, DPL introduce additional phase shift so later you can extract surround information (of course not separate from front as in independent channel system but still you can separate this front - side/rear information).

To conclude:
Stereo downmix has energy from all 5 channels in 2 channels without possibility to separate front from side/rear, DPL have energy from all 5 channels with additional phase offset between front and side/rear.