Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Downmixing 5.1 to Stereo (Read 29947 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Downmixing 5.1 to Stereo

-

Downmixing 5.1 to Stereo

Reply #1
What level of understanding are you looking for, the quantum mechanics wave equation one or the dump water into a pipe one? You understand that the separate drains of your house all ultimately connect into one sewer pipe, don't you?

If you feed two separate signals to one channel -- say for example you use Y connectors to feed a CD player and a tape deck, both playing different music, into one amplifier input -- the signal are thereby mixed. What comes out the speakers is the sum/difference of the signals at each instant.  This is pretty much what millions and millions of mixers are used for in studios everywhere, although mixers generally have a variety of ways to control just how the mixing takes place.

If there are six signals going to two channels, the mixing strategy seems very simple: Rf +Rr and Lf + Lr. The subwoofer and center channels would be fed equally to both right and left. In some digital audio formats the six channels are multiplexed together in one file. Those must first be decoded into six streams. That step is also necessary if it is to be played on a 5.1 system.

In other formats the lower bass is stored as part of the main mix. It must be separated by high-pass/low-pass filters in order to produce separate streams for separate speakers. This same thing happens inside most speaker systems, whenever there are separate drivers for different parts of the audio frequency range. In such a format, the low bass, already being mixed into R and L, would need nothing done to it when used in a two channel system rather than a 5.1 system.

Downmixing 5.1 to Stereo

Reply #2
I wonder which gains are applied to the channels of a typical 5.1 to stereo downmix so that it sounds like "it has to sound".

One approach is to do it like described above:
Left channel: Front Left + Surround Left + Center + LFE
Right channel: Front Right + Surround Right + Center + LFE
That makes the two centered channels (Center and LFE) go into both left and right channels while each of the two side channels go into their respective stereo channel. At the end the stereo material is normalized so that it doesn't clip.

But what about applying different gains to the different channels? Like decreasing the LFE's volume by 3 dB or lowering the amount of the center channel going into the left and right stereo channels.

What do popular programs like commercial software DVD players (e.g. PowerDVD, WinDVD) do when they downmix 5.1 to stereo? I also read that AC3 tracks may have some information embedded into them that state how much gain has to be applied to the surround and center channels for a correct downmix. Is that true and does that also apply to DTS?

I ask all this because I want "the one perfect method" of downmixing 5.1 to stereo. If that doesn't exist there has to be at least some common ground how most professionals would do it. And how exactly does the fb2k DSP plugin ("Convert 5.1 to stereo") do it? I noticed a difference between downmixing with fb2k and doing it manually in Audition (where I applied no channel specific gains). Interestingly, the fb2k downmix sounded clearer to me.

Downmixing 5.1 to Stereo

Reply #3
In case of a digital dolby surround signal the informations about the "downmix levels" are part of the stream and not fixed. This is usually interpreted by the decoder. You simply need to tell your decoder how many speakers you have and it mixes the multichannel content down according to the side informations within the DD stream.

For stereo signals the center signal is usually attenuated by 3 dB and fed to both channels to keep. Depending on the mastering it may or may not be appropriate to rout the LFE channel to both speakers as well (I'm not sure if this is also specified within the DD stream). Some software decoders allow you to choose between two different 2-channel-downmix modes: Stereo and Dolby Surround:

Stereo:
- Left = front_left + rear_gain * rear_left + center_gain * center
- Right = front_right + rear_gain * rear_right + center_gain * center

Dolby Surround (Pro Logic Downmix)
- tmp_mono_rear = 0.7 * (rear_left + rear_right)
- Left = front_left + rear_gain * tmp_mono_rear + center_gain * center
- Right = front_right - rear_gain * tmp_mono_rear + center_gain * center

where rear_gain is usually around 0.5-1.0 and center_gain is almost always 0.7 (-3 dB) if I recall correctly. Notice the polarity inversion of the tmp_mono_rear when routing to the 'Right' channel. So, the rear channels are first mixed together and then fed to Left and Right with a phase difference of 180°. This way a Pro Logic Decoder can try to recover the (mono!) rear channel.

Somehow Dolby Pro Logic 2 manages to squeeze 2 rear channels into a stereo signal. In this case I'm not sure how you should downmix the signal for such a decoder -- probably like this:
- Left = front_left + rear_gain * rear_left + center_gain * center
- Right = front_right - rear_gain * rear_right + center_gain * center


HTH,
Sebastian

Downmixing 5.1 to Stereo

Reply #4
Thanks for the explanations. There's something that still confuses me, though.

I have made a graphical comparison of three methods of downmixing a 5.1 DTS music track. The DTS file has been converted to a 5.1 WAV file with foobar2000 0.9.2 using 32 bit output (which is important in this case). Then I have downmixed the 5.1 channels to stereo. The three methods are (output is always 32 bit):
- foobar2000 with the 'Convert 5.1 to stereo' DSP plugin
- foobar2000 with the 'Channel Mixer' DSP plugin ('Stereo/Default' profile)
- Adobe Audition 2.0 with no specific channel gains applied (which means rear gain, center gain and LFE gain all equal 1)

At the end all three stereo tracks are normalized to 0 dB. While the track created by foobar2000 with the 'Convert 5.1 to stereo' DSP plugin and Audition are clearly lowered in volume during the normalization process, the track created by foobar2000 with the 'Channel Mixer' DSP plugin does not noticeably change. The latter also produces the lowest perceived volume while foobar2000's default downmixing plugin produces the loudest perceived sound.

The image below shows the difference between the three outputs.

[Click here to see the image]

So you clearly see that the three methods all produce a different result. I'd like to know why this is. Maybe the authors of both foobar2000 plugins can shed some light on this.

Downmixing 5.1 to Stereo

Reply #5
I have created two images that show a detail comparison of a small section of the DTS 5.1 downmix. The first image shows the downmix with the LFE channel retained while the second one shows it with the LFE channel discarded.

Red: foobar2000 with 'Convert 5.1 to stereo' plugin
Green: foobar2000 with 'Channel Mixer' plugin
Blue: Audition

Please note that the red line is the same in both pictures because there's no control over the LFE channel in the 'Convert 5.1 to stereo' plugin. So I actually don't know if the LFE channel is used there or not.

LFE retained: [Click here to see the image]
LFE discarded: [Click here to see the image]

What boggles my mind is that at least the outputs of the 'Channel Mixer' plugin and Audition should be identical. Both use the same WAV file as input and the same parameters. So, where does the difference come from?