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: How to conver 6 channel audio to stereo? (Read 19595 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to conver 6 channel audio to stereo?

Hello.
I am new here.
But I have a problem, a concert on DVD is encoded as 6 channel audio, but I would like to rip it to 2 channel stereo.
for now I have ripped a WAV 6 channel file.
How can I convert it to Stereo without losing any music from other channels?
A simple converter? A special software?
Or maybe I should manually mix it in audacity?

How to conver 6 channel audio to stereo?

Reply #1
Are you sure there is no stereo track on the DVD?    I don't think I've run across a DVD that doesn't have at least one stereo track, but it's not required because all DVD players & Home theater receivers are required to mix-down properly.

Audacity might be your best bet. 

Mix Left = Left Front, Left Surround, and Center at -3dB.

Mix Right Channel = Right Front, Right Surround, and Center at -3dB.   

The LFE "point one channel" is left out of the downmix mix.  The 5 surround channels contain the "normal" bass, and the LFE only includes extra sound for "booms & explosions".

I found the above information on page 95 of this Dolby document.


You may have to normalize the stereo mix to make sure it doesn't go over 0dB, or to bring the levels up if they are too low.  (In Audacity, you can use the Amplify effect.)

Note that a Dolby AC3 file contains mixdown metadata, so some DVDs may mixdown with something other than the -3dB standard.  The Dolby decoder in a DVD player or receiver can read that metadata for a custom mixdown, but otherwise I don't know how to read it.  (I'm not sure if a DTS downmix is the same as Dolby.)

How to conver 6 channel audio to stereo?

Reply #2
Are you sure there is no stereo track on the DVD?    I don't think I've run across a DVD that doesn't have at least one stereo track, but it's not required because all DVD players & Home theater receivers are required to mix-down properly.

Audacity might be your best bet. 

Mix Left = Left Front, Left Surround, and Center at -3dB.

Mix Right Channel = Right Front, Right Surround, and Center at -3dB.   

The LFE "point one channel" is left out of the downmix mix.  The 5 surround channels contain the "normal" bass, and the LFE only includes extra sound for "booms & explosions".

I found the above information on page 95 of this Dolby document.


You may have to normalize the stereo mix to make sure it doesn't go over 0dB, or to bring the levels up if they are too low.  (In Audacity, you can use the Amplify effect.)

Note that a Dolby AC3 file contains mixdown metadata, so some DVDs may mixdown with something other than the -3dB standard.  The Dolby decoder in a DVD player or receiver can read that metadata for a custom mixdown, but otherwise I don't know how to read it.  (I'm not sure if a DTS downmix is the same as Dolby.)



The main concert is in DTS, 6 channel and 2 channel, but the bonus concert has only one audio option in 6 channel. But audacity shows the six channels as: Left, Righe, Mono, Mono, Mono, Mono. I can recognize the center track, because it is fifferent than others and bass track as it is really low sounds on this, but I can't recognize which is left and which is right out of the remaining two tracks, or which are front and which are back.

I would rather preffer soem program that have an algorithm to mix it, as I may have similar situatiosn in the future and I would like them to be done repetively, instead of manually, also I don't have much expirience with audacity, the only thing I used it for is to play track backwards, or to show spectrogram...

How to conver 6 channel audio to stereo?

Reply #3
http://stackoverflow.com/questions/3537155...939403#23939403


Code: [Select]
sox.exe -V input-file-5.1.wav output-file-stereo.wav remix 1v0.3694,3v0.2612,4v0.3694 2v0.3694,3v0.2612,5v0.3694


Just tested, the installation on windows (incl. mp3 read/write support) and the command itself work very well.

The first remix chunk - 1v0.3694,3v0.2612,4v0.3694 - defines the left channel mix (channel_in_source_file-v-volume + channel_in_source_file-v-volume...), the second defines the right channel. Simple, trivial to repeat and play with the params should your input file have a different channel order. Plus you can use the other countless features of sox http://sox.sourceforge.net/

How to conver 6 channel audio to stereo?

Reply #4
http://stackoverflow.com/questions/3537155...939403#23939403


Code: [Select]
sox.exe -V input-file-5.1.wav output-file-stereo.wav remix 1v0.3694,3v0.2612,4v0.3694 2v0.3694,3v0.2612,5v0.3694


Just tested, the installation on windows (incl. mp3 read/write support) and the command itself work very well.

The first remix chunk - 1v0.3694,3v0.2612,4v0.3694 - defines the left channel mix (channel_in_source_file-v-volume + channel_in_source_file-v-volume...), the second defines the right channel. Simple, trivial to repeat and play with the params should your input file have a different channel order. Plus you can use the other countless features of sox http://sox.sourceforge.net/


So it will mix left, center and left S together the same with right, but that about the Bass track?
And by the way, the wav has the following channels encoded:
1. Left or Right
2. Right or Left
3. Center
4. Bass
5. Left S or Right S
6. Right S or Left S

So, the command line mixes bass only on Left and ommits the last S channel.

How to conver 6 channel audio to stereo?

Reply #5
So it will mix left, center and left S together the same with right, but that about the Bass track?


AFAIK by standard LFE is not supposed to enter the downmix. But nothing prevents your from doing so - just add it to the remix specifier.

Quote
So, the command line mixes bass only on Left and ommits the last S channel.


OK, then change the input channel numbers in the remix specifier (the number before v0.xxx) to fit your needs. You are in control of what sox does :-)

How to conver 6 channel audio to stereo?

Reply #6
So it will mix left, center and left S together the same with right, but that about the Bass track?


AFAIK by standard LFE is not supposed to enter the downmix. But nothing prevents your from doing so - just add it to the remix specifier.

Quote
So, the command line mixes bass only on Left and ommits the last S channel.


OK, then change the input channel numbers in the remix specifier (the number before v0.xxx) to fit your needs. You are in control of what sox does :-)


I am not as confident to be in charge of such processing, I would preffer something that would do it automatically...

OK, I inslated sox, but when I try to run it a window appears and disappeares and nothing happens.

How to conver 6 channel audio to stereo?

Reply #7
I am not as condident to be in charge of such processing, I would preffer something that would do it automatically...

Then use eac3to with the -downStereo switch.

How to conver 6 channel audio to stereo?

Reply #8
But it is trivial, just change the channel number. Let's say your wav has order as you listed:

1. Left
2. Right
3. Center
4. Bass
5. Left S
6. Right S

Then instead of

1v0.3694,3v0.2612,4v0.3694 2v0.3694,3v0.2612,5v0.3694 (1 - left, 3 - center, 4 - left surround, 2 - right, 3 - center, 5 - right surround)

use

1v0.3694,3v0.2612,5v0.3694 2v0.3694,3v0.2612,6v0.3694 (1 - left, 3 - center, 5 - left surround, 2 - right, 3 - center, 6 - right surround)

The coefficients give contribution of the input channel into the output one. Their sum for each chunk should be 1 (0,3694 + 0,2612 + 0,3694 = 1)

That's it, no rocket science.


How to conver 6 channel audio to stereo?

Reply #10
But it is trivial, just change the channel number. Let's say your wav has order as you listed:

1. Left
2. Right
3. Center
4. Bass
5. Left S
6. Right S

Then instead of

1v0.3694,3v0.2612,4v0.3694 2v0.3694,3v0.2612,5v0.3694 (1 - left, 3 - center, 4 - left surround, 2 - right, 3 - center, 5 - right surround)

use

1v0.3694,3v0.2612,5v0.3694 2v0.3694,3v0.2612,6v0.3694 (1 - left, 3 - center, 5 - left surround, 2 - right, 3 - center, 6 - right surround)

The coefficients give contribution of the input channel into the output one. Their sum for each chunk should be 1 (0,3694 + 0,2612 + 0,3694 = 1)

That's it, no rocket science.



OK, so I know how to include those all tracks, but how to include bass track and with which coefficient?

And why do we use 0,707 for Center channel?

How to conver 6 channel audio to stereo?

Reply #11
OK, I inslated sox, but when I try to run it a window appears and disappeares and nothing happens.


It is a command line program. Open the command windows (cmd), go to the directory where sox.exe is installed to (cd .., cd somewhere), and run the command with the parameters. For testing have the wav in the same directory so that you do not have to bother with file paths. You can play with it as much as you wish, it will not break anything :-) At worst you can ruin your input wav, just copy it there again.


How to conver 6 channel audio to stereo?

Reply #13
And why do we use 0,707 for Center channel?


From what I understand it is because such downmix formula is specified by the dolby standard. You can change however you want, that is the beauty of sox compared to something hard-coded in the binary.

E.g. I always make the center channel louder on my 5.1 system which makes the dialogs in english easier to understand for me as a non-native. But again, it is up to you.

How to conver 6 channel audio to stereo?

Reply #14
And why do we use 0,707 for Center channel?


From what I understand it is because such downmix formula is specified by the dolby standard. You can change however you want, that is the beauty of sox compared to something hard-coded in the binary.

E.g. I always make the center channel louder on my 5.1 system which makes the dialogs in english easier to understand for me as a non-native. But again, it is up to you.


So, is I think correctly the formula would be:
L = FL + 0,707*C + BL + B
It would give 3,707 overflow, so divide everything by 3,707 and compose a line in sox you gave written and the same for right?

How to conver 6 channel audio to stereo?

Reply #15
Sounds ok to me if you want to use full LFE channel. IMO it is not correct by the standard, but in fact I do not have 5.1 as mentioned above, just 5.0, and I mix LFE to front channels also at 50% to each side too.

Just try and see if you like the result, you can always rerun the command. The up arrow (previous commands) is your friend in the terminal.

 

How to conver 6 channel audio to stereo?

Reply #16
Sounds ok to me if you want to use full LFE channel. IMO it is not correct by the standard, but in fact I do not have 5.1 as mentioned above, just 5.0, and I mix LFE to front channels also at 50% to each side too.

Just try and see if you like the result, you can always rerun the command. The up arrow (previous commands) is your friend in the terminal.


I have read the Dolby document about downmixing, the BAss track is not included there.
So, try, try and try, ok.

The last thing, how to actually run the program, when I open sox.exe it appears and dicappears right after.

The command prompt in windows?

How to conver 6 channel audio to stereo?

Reply #17
So, is I think correctly the formula would be:
L = FL + 0,707*C + BL + B


LFE is also mono channel, and since you include it to both channels it should have same coefficient than center channel.

But... LFE it supposed to be boosted by +10dB in the playback chain and that will be lost.  If you wish to include that effect, you need to multiply the LFE by extra 3.1623.  But don't do that blindly, have a look how the LFE is used and what it looks in audacity.  If the amplitude of the LFE channel is comparable to other channels, it would indicate that the adjustment is already done (?) or the mix is just plain wrong.
Teemu


How to conver 6 channel audio to stereo?

Reply #19
So, is I think correctly the formula would be:
L = FL + 0,707*C + BL + B


LFE is also mono channel, and since you include it to both channels it should have same coefficient than center channel.

But... LFE it supposed to be boosted by +10dB in the playback chain and that will be lost.  If you wish to include that effect, you need to multiply the LFE by extra 3.1623.  But don't do that blindly, have a look how the LFE is used and what it looks in audacity.  If the amplitude of the LFE channel is comparable to other channels, it would indicate that the adjustment is already done (?) or the mix is just plain wrong.



This is how the channels look:

The first two are left and right, then is center, then LFE and the 5th is one of two Surround channels.

So, boost the LFE, ir leave it as is and convert?

How to conver 6 channel audio to stereo?

Reply #20
So, boost the LFE, ir leave it as is and convert?

Leave as it is, it would get insanely loud if boosted.
Teemu

How to conver 6 channel audio to stereo?

Reply #21
The command prompt in windows?


Open the windows command line (just type cmd in the command prompts). For details see e.g. http://www.computerhope.com/issues/chusedos.htm


OK, the conversion gave me stereo output file, but the amplitude is lower than the amplitudes of the FL and FR tracks in the 6 channel input file, maybe I should experiment with coefficients?

How to conver 6 channel audio to stereo?

Reply #22
At first I would start with copying your input wav into the sox dir and change (cd ...) to that that directory. That way you do not have to give any paths. But it really does not matter whether you put path to your wavs or to your exe file.

The -V command means "verbose". Sox will tell you in detail what is going on. Very useful IME.

For testing you can play your result directly, without storing into the output wav. Just put "-d" instead of the output filename:

Code: [Select]
sox.exe -V input.wav -d remix parameters....


http://sox.10957.n7.nabble.com/sox-on-wind...p3952p3953.html

Ctrl+C should break the playback.



How to conver 6 channel audio to stereo?

Reply #23
OK, the conversion gave me stereo output file, but the amplitude is lower than the amplitudes of the FL and FR tracks in the 6 channel input file, maybe I should experiment with coefficients?


Perfect, congrats.

You can normalize the volume (i.e. apply enough gain for the samples to be just before limiting) by adding the effect "norm" at the end of the effects chain.

Code: [Select]
sox ...... remix parameters... norm


Here is documentation to all the effects now available to you http://sox.sourceforge.net/sox.html#EFFECTS

How to conver 6 channel audio to stereo?

Reply #24
OK, the conversion gave me stereo output file, but the amplitude is lower than the amplitudes of the FL and FR tracks in the 6 channel input file, maybe I should experiment with coefficients?


Perfect, congrats.

You can normalize the volume (i.e. apply enough gain for the samples to be just before limiting) by adding the effect "norm" at the end of the effects chain.

Code: [Select]
sox ...... remix parameters... norm


Here is documentation to all the effects now available to you http://sox.sourceforge.net/sox.html#EFFECTS


maybe gain -n option?

EDIT:
Yes, the gain -n command works fine, now I have only change the remix formula you provided to one that would include the lfe.

It doesn't seem to wotk if I write 1v(1/(3+(1/sqrt(2)))), so, I have tu put specific numbers like 0,2698?

I used the formula:

sox.exe -V C:\Users\HP\Desktop\6ch\input.wav C:\Users\HP\Desktop\6ch\2ch\output.wav remix 1v0.26975,3v0.19075,4v0.26975,5v0.26975 2v0.26975,3v0.19075,4v0.26975,6v0.26975 gain -n

The result warns me that "output clipped 1 samples".
What actually is clipping and how can I fix it?
Gain limiter "limitergain" command?

Or the global -G before processing?