Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
20th April 2014, 21:27 | #1 | Link |
Guest
Posts: n/a
|
4.1/5.1/7.1 Channel Configuration/Order
Is this order correct when merging six channels?
fl=WavSource("L.wav") fr=WavSource("R.wav") c=WavSource("C.wav") lfe=WavSource("LFE.wav") sl=WavSource("SL.wav") sr=WavSource("SR.wav") MergeChannels(fl,fr,c,lfe,sl,sr) I also need to know how to use MergeChannels() for 7.1. Moreover, when I decode Dolby TrueHD 7.1 to wavs, I don't which channel configuration to select in the DTS-HD MA encoding suite. There are two options: 1. 7.1 – L,R,C,LFE,Lss,Rss,Lsr,Rsr; 2. 7.1 – L,R,C,LFE,Ls,Rs,Lsr,Rsr. 1. 2. How does one know which to select? Last edited by Richard1485; 6th June 2017 at 01:41. |
21st April 2014, 03:34 | #3 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
For DTS 7.1 first option is correct. http://forum.doom9.org/showthread.ph...85#post1443085
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite |
21st April 2014, 10:11 | #5 | Link | ||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Correct.
Quote:
bl,br means BackLeft, BackRight Quote:
BTW I don't know for what you recode TrueHD (free decoder) to DTS-MA (commercial decoder), with big size for the same quality.
__________________
BeHappy, AviSynth audio transcoder. |
||
21st April 2014, 10:26 | #6 | Link | |
Guest
Posts: n/a
|
Thanks, tebasuna.
Quote:
As always, thanks for your help. |
|
21st April 2014, 10:37 | #7 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
|
Quote:
Is this because your TrueHD stream does not contain an Dolby Digital core?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
6th June 2017, 01:49 | #9 | Link |
Guest
Posts: n/a
|
How does one merge five channels and end up with a 3/1.1 channel configuration?
MergeChannels( fl, fr, cc, lfe, bc) seems to results in 5.0, because eac3to splits the result like this... Code:
Writing WAVs... Creating file "SR.wav"... Creating file "R.wav"... Creating file "C.wav"... Creating file "L.wav"... Creating file "SL.wav"... Code:
Writing WAVs... Creating file "C.wav"... Creating file "LFE.wav"... Creating file "BC.wav"... Creating file "R.wav"... Creating file "L.wav"... |
6th June 2017, 08:14 | #10 | Link | |
Unavailable
Join Date: Mar 2009
Location: offline
Posts: 1,480
|
Quote:
Code:
Speaker Position Decimal Value ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯ FRONT_LEFT 1 FRONT_RIGHT 2 FRONT_CENTER 4 LOW_FREQUENCY 8 BACK_LEFT 16 BACK_RIGHT 32 FRONT_LEFT_OF_CENTER 64 FRONT_RIGHT_OF_CENTER 128 BACK_CENTER 256 SIDE_LEFT 512 SIDE_RIGHT 1024 TOP_CENTER 2048 TOP_FRONT_LEFT 4096 TOP_FRONT_CENTER 8192 TOP_FRONT_RIGHT 16384 TOP_BACK_LEFT 32768 TOP_BACK_CENTER 65536 TOP_BACK_RIGHT 131072 RESERVED 262144 |
|
6th June 2017, 10:10 | #11 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
# open your 5.1
a = ConvertAudioToFloat() flr = Getchannel(a, 1, 2, 3, 4) sl = Getchannel(a, 5) sr = Getchannel(a, 6) sur = MixAudio(sr, br, 1.0, 1.0).SoftClipperFromAudX(0.0) mergechannels(flr,sur) #convert to desired bitdepth and put channel mask to 271, like Midzuki say, with BeHappy.
__________________
BeHappy, AviSynth audio transcoder. |
6th June 2017, 13:14 | #12 | Link |
Guest
Posts: n/a
|
Ah, so the channel mask is obtained by adding the decimal values of all the speakers together. Thanks! Previously, I have used MergeChannels() only with 2.0, 5.1, and 7.1 and have never had to set a channel mask.
@tebasuna51 Thank you very much! Does the conversion to float affect only the channels that are to be mixed? I am using mono wavs. Is the following correct? Code:
fl=WavSource("l.wav") fr=WavSource("r.wav") c=WavSource("c.wav") lfe=WavSource("lfe.wav") sl=WavSource("sl.wav").ConvertAudioToFloat() sr=WavSource("sr.wav").ConvertAudioToFloat() sur=MixAudio(sl, sr, 1.0, 1.0).SoftClipperFromAudX(0.0).ConvertAudioTo24bit() MergeChannels(fl,fr,c,lfe,sur) EDIT (again): The channel configuration is right only when I export as WAV from BeHappy. When I export as FLAC or WV WavPack, it's wrong. Does Writing RIFF_EXT header to encoder's StdIn not mean that the channel configuration is being passed to the encoder? Last edited by Richard1485; 6th June 2017 at 17:47. |
6th June 2017, 22:52 | #13 | Link | |||||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
Quote:
--ignore-chunk-sizes for instance for flac. Quote:
Quote:
To flac the wav header is not sended, only raw PCM data without Channel Mask info. You can replace e_Flac.ext in Behappy\extensions by the attached one to send before the RIFF_EXT header. But you obtain a System.IO.IOException with a message like this: ERROR: WAVEFORMATEXTENSIBLE chunk with unsupported channel mask=0x010F The same if you try send the FL-FR-FC-LF-BC.wav to flac encoder: flac FL-FR-FC-LF-BC.wav Only accept channel mask than match: https://xiph.org/flac/format.html Quote:
https://sourceforge.net/p/flac/feature-requests/96/ eac3to, accesing to libFLAC.dll, seems know how override the error and put the correct channel mask, but I don't know how make that with the command line encoder flac.exe. Then output the wav or w64 or RF64 file, and encode to flac with eac3to.
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 6th June 2017 at 23:04. |
|||||
6th June 2017, 23:26 | #14 | Link | ||
Guest
Posts: n/a
|
They are! :-)
Quote:
Quote:
EDIT: I've just figured out that SoundOut() doesn't get the channel mask right either. By the way, would you use SoftClipperFromAudX(0.0) when converting 5.1 to mono? So far, I've been using RaWavSource(,1).ConvertToMono().Normalize(), but perhaps there is a better way. Last edited by Richard1485; 7th June 2017 at 00:43. |
||
7th June 2017, 12:52 | #15 | Link | ||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
This is a old feature request to AviSynth than was rejected because is dificult to do. There are two "patch" to manage the problem: 1) After v2.58 we can set: Global OPT_UseWaveExtensible=True That must be the default, and not a option, in 21 Century. Not needed in BeHappy or MeGUI because the special AvisynthWrapper.dll 2) After v2.60 we can set: Global OPT_dwChannelMask={int} But who know the ChannelMask is the decoder and a old plugin like SoundOut() don't output WaveExtensible header. Quote:
Forgeting LFE channel, than can't be used to downmix, we can have a peak at 500% and force reduce the overall volume to 1/5. Now a normal (50%) dialog in FC is reduced to 10%. Maybe we can do something than: fl=WavSource("l.wav").ConvertAudioToFloat() fr=WavSource("r.wav").ConvertAudioToFloat() c=WavSource("c.wav").ConvertAudioToFloat() sl=WavSource("sl.wav").ConvertAudioToFloat() sr=WavSource("sr.wav").ConvertAudioToFloat() left=MixAudio(fl,sl, 1.0, 1.0).SoftClipperFromAudX(0.0) right=MixAudio(fr,sr, 1.0, 1.0).SoftClipperFromAudX(0.0) c = MixAudio(left,c, 0.8, 1.0) MixAudio(c, right, 1.0, 0.8).Normalize() ConvertAudioTo24bit() Or other balance instead 0.8, 1.0, 0.8 EDIT: Before I used a wrong MixAudio(left,c, right, 1.0, 0.8, 1.0).Normalize() wrong because MixAudio only support 2 clips. Sorry.
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 9th June 2017 at 21:12. Reason: Mistake explained. |
||
8th June 2017, 00:43 | #16 | Link |
Guest
Posts: n/a
|
Tebasuna, many thanks for providing me with a more refined way to downmix to mono! I'll give it a try as soon as possible.
I'm sorry, but I don't understand. Is this balance meant to differ from the script above? :-) I appreciate your information about channel masks in AviSynth/SoundOut. It seems safer/easier to set them in BeHappy. |
8th June 2017, 10:05 | #17 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
The problem of the downmix is let the dialog volume (FC most the times) too low to listen.
If we mix the 5 channel together and after Normalize() we can obtain a dialog volume at 20% than original. For that I propose mix the left and right channels before with a limited volume (SoftClipperFromAudX) and after mix only 3 channel. That can let the FC channel at 33% than original. Even if you want priorize the FC you can do the last mix un-balanced (left,c,right, 0.8, 1.0, 0.8), FC at 38%. But is dificult to know the proper value than can change with each audio. You can try between balanced (left,c,right, 1.0, 1.0, 1.0), than let FC at 33%, until more un-balanced (left,c,right, 0.5, 1.0, 0.5) than let FC at 50%.
__________________
BeHappy, AviSynth audio transcoder. |
9th June 2017, 16:56 | #19 | Link | |
Guest
Posts: n/a
|
^^ Unfortunately, I receiver an error when using the script.
Quote:
Code:
MixAudio(left,c,right, 0.8, 1.0, 0.8).Normalize() |
|
9th June 2017, 20:43 | #20 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Isn't MixAudio() limited to two inputs?
You could make a function out of it like the script below. 5.1ch downmix, LFE not included by default and normalising is enabled, so it might be slow to open. Then all you'd need is Downmix() in a script with ConvertAudioTo16bit(), or whatever output you want, or something like the following to adjust settings if need be: Downmix(CentreGain=1.1, SurroundGain=0.7, Normalise=False).ConvertAudioTo16bit() Quote:
You can use ffmpeg as an audio encoder with foobar2000, and ffmpeg will accept any channel mask when converting to flac, although the official flac encoder will do the same if you add --channel-map=none to the command line. The channel mask info is saved to a WAVEFORMATEXTENSIBLE tag, so I guess it'd be up to the player to decide if it will read it and output the correct channels for non standard layouts, but I assume it works the same way when encoding with libFLAC etc. Last edited by hello_hello; 10th June 2017 at 17:18. |
|
Tags |
configuration, dts-hd ma, merge channels, truehd |
Thread Tools | Search this Thread |
Display Modes | |
|
|