View Full Version : Prob converting DTSMA 6.1 channel
JimmyBarnes
19th October 2015, 03:22
Trying to convert DTSMA soundtrack from Star Wars III: Revenge of the Sith.
eac3to 3.29 converts it to an AC3 which is 160 min whereas the video length is only 140 min.
Audacity 2.1.1 with ffmpeg 2.2.2 loads the DTSMA OK and indicates 140 min length but when I try to export as AC3 640 kbps it gives error:
"FFmpeg: ERROR - Can't open audio codec 0x15003"
Reinstalling ffmpeg 2.2.2 does not fix the problem.
How to fix this?
TIA
tebasuna51
19th October 2015, 10:38
Please put the eac3to log.
AC3 don't support 6.1 channels, seems the automathic downmix don't work (maybe a initial credit only 5.1) and for that 140m -> 160m.
Using Audacity to open the DTS-MA you get 6.1 or 5.1?
If 6.1 you need downmix to 5.1.
JimmyBarnes
19th October 2015, 11:15
Please put the eac3to log.
eac3to v3.29
command line: C:\BDrip\EAC3to\eac3to SW3.dtsma SW3_640norm.AC3 -640 -normalize
------------------------------------------------------------------------------
DTS Master Audio, 6.1 channels, 24 bits, 48kHz
(core: DTS-ES, 6.1 channels, 1509kbps, 48kHz)
dts, 48000, 6.1
AC3 encoding doesn't support back channels. Will mix them into the surround.
Remapping channels...
Decoding with ArcSoft DTS Decoder...
Mixing surround channels...
Writing WAV...
Creating file "SW3_640norm.AC3.pass1.wav"...
The original audio track has a constant bit depth of 24 bits.
The processed audio track has a constant bit depth of 24 bits.
Caution: The WAV file is bigger than 4GB. <WARNING>
Some WAV readers might not be able to handle this file correctly. <WARNING>
Starting 2nd pass...
Reading WAV...
Remapping channels...
Encoding AC3 <640kbps> with libAften...
Applying -0.09dB gain...
Creating file "SW3_640norm.AC3"...
The processed audio track has a constant bit depth of 64 bits.
eac3to processing took 18 minutes, 55 seconds.
Done.
AC3 don't support 6.1 channels, seems the automathic downmix don't work (maybe a initial credit only 5.1) and for that 140m -> 160m.
Wondered about the 7 channels - uncommon.
Using Audacity to open the DTS-MA you get 6.1 or 5.1?
6.1
If 6.1 you need downmix to 5.1.
How?
nevcairiel
19th October 2015, 11:49
Try simply adding "-down6" to the command line, that should downmix to 6 channels (ie. 5.1)
tebasuna51
19th October 2015, 12:59
eac3to v3.29
command line: C:\BDrip\EAC3to\eac3to SW3.dtsma SW3_640norm.AC3 -640 -normalize
------------------------------------------------------------------------------
DTS Master Audio, 6.1 channels, 24 bits, 48kHz
...
Mixing surround channels...
...
Applying -0.09dB gain...
Seems than detect 6.1 but there are something wrong.
Try without -normalize (not needed here) and with -down6 like nevcairiel say.
Audacity 6.1 -> 5.1
How?
1) Apply -3dB to track 5 (Back Center)
2) Mix track 5 to track 6 (Side Left).
3) Mix track 5 to track 7 (Side Right)
4) Normalize tracks 6 and 7 if needed (If Max peak >0dB, put 0dB)
5) Delete track 5
JimmyBarnes
19th October 2015, 15:17
Try simply adding "-down6" to the command line, that should downmix to 6 channels (ie. 5.1)
Still produced 160 min AC3, 20 min longer than video. Same result without -normalize.
eac3to v3.29
command line: C:\BDrip\EAC3to\eac3to SW3.dtsma SW3_5.1_640norm.AC3 -down6 -640 -normalize
------------------------------------------------------------------------------
DTS Master Audio, 6.1 channels, 24 bits, 48kHz
(core: DTS-ES, 6.1 channels, 1509kbps, 48kHz)
dts, 48000, 6.1
Remapping channels...
Decoding with ArcSoft DTS Decoder...
Mixing surround channels...
Writing WAV...
Creating file "SW3_5.1_640norm.AC3.pass1.wav"...
The original audio track has a constant bit depth of 24 bits.
The processed audio track has a constant bit depth of 24 bits.
Caution: The WAV file is bigger than 4GB. <WARNING>
Some WAV readers might not be able to handle this file correctly. <WARNING>
Starting 2nd pass...
Reading WAV...
Remapping channels...
Encoding AC3 <640kbps> with libAften...
Applying -0.09dB gain...
Creating file "SW3_5.1_640norm.AC3"...
The processed audio track has a constant bit depth of 64 bits.
eac3to processing took 19 minutes, 29 seconds.
Done.
JimmyBarnes
19th October 2015, 15:25
As a workaround, I opened SW3_640norm.AC3 (see above) in Audacity and applied Effect, Change Speed to make it the same length as video.
This gives AC3 which matches video, even though I realise it has been undesirably encoded twice.
I notice the tracks in SW3_640norm.AC3 bear little resemblance to those of the original DTSMA..
Snowknight26
19th October 2015, 17:29
Try using libdcadec instead of Arcsoft's decoder.
SeeMoreDigital
19th October 2015, 20:13
How about de-muxing the DTS core from the DTS-HD MA stream and either play that or use it to create a Dolby Digital stream?
JimmyBarnes
19th October 2015, 21:07
Try using libdcadec instead of Arcsoft's decoder.
AC3 doesn't support 6.1 channels, this is the real problem
JimmyBarnes
19th October 2015, 21:10
How about de-muxing the DTS core from the DTS-HD MA stream and either play that or use it to create a Dolby Digital stream?
I tried:
F:\SW3\audio>eac3to SW3.dtsma SW3.dts -core
DTS Master Audio, 6.1 channels, 24 bits, 48kHz
(core: DTS-ES, 6.1 channels, 1509kbps, 48kHz)
i.e the core is still 6.1 channels
SeeMoreDigital
19th October 2015, 22:09
i.e the core is still 6.1 channels
Indeed it is. But it might be easier to encode to AC3.
Is there any particular reason why you need AC3?
Snowknight26
19th October 2015, 23:26
AC3 doesn't support 6.1 channels, this is the real problem
So what's the issue then?
Decode to WAV, downmix to 5.1, encode to AC3.
JimmyBarnes
20th October 2015, 00:39
So what's the issue then?
Decode to WAV, downmix to 5.1, encode to AC3.
The solution you proposed was simply changing the codec, not the above..
JimmyBarnes
20th October 2015, 00:44
Anyway this looks like the best solution:
1. Import original DTSMA into Audacity
2. Mix sparse channels 4 & 5, reduce total channels to 6
3. Export as AC3 640 kbps
It is the correct 120 min length and sounds OK.
http://i684.photobucket.com/albums/vv208/PBuser7/SW3_Aud.jpg
Thanks for everyone who tried to help.
tebasuna51
20th October 2015, 09:45
Anyway this looks like the best solution:
1. Import original DTSMA into Audacity
2. Mix sparse channels 4 & 5, reduce total channels to 6
...
Your downmix is wrong, you mix the Back Center channel to LFE channel.
I say:
1) Apply -3dB to track 5 (Back Center)
2) Mix track 5 to track 6 (Side Left).
3) Mix track 5 to track 7 (Side Right)
or 2) and 3) like that:
JimmyBarnes
20th October 2015, 09:58
Your downmix is wrong, you mix the Back Center channel to LFE channel.
I say:
1) Apply -3dB to track 5 (Back Center)
2) Mix track 5 to track 6 (Side Left).
3) Mix track 5 to track 7 (Side Right)
or 2) and 3) like that:
How do you arrive at this scheme?
Ghitulescu
20th October 2015, 10:11
Trying to convert DTSMA soundtrack from Star Wars III: Revenge of the Sith.
If you have stated the full problem (like sex, converting needs two to play - a source and a destination), you'd have had the answer in the second reply, already :) :)
So, after 16 replies, you found that you have to change something if you want to convert to Dolby Digital (AC-3).
Dolby Digital accepts a max of 6 channels, commonly noted 5.1.
More than 6 channels must use the extenstions to DD, like DD Ex, DD Plus (E-AC-3, mainly used in HD-DVDs) or DD Surround Ex. According to Wiki, DD Ex was developed by Lucas for StarWars.
Your choices are - back to AC-3 in 5.1 with downmixing the extra surround channels (rear) in the regular surround ones (sides), or going up to 7.1 (via a muted channel or split channel) to LPCM/FLAC or any other compressed codec supporting 7.1.
The problem is not only the conversion, but the compatibility to players. This is why eac3to may reject some files or provides an erroneous result.
JimmyBarnes
20th October 2015, 11:19
If you have stated the full problem (like sex, converting needs two to play - a source and a destination), you'd have had the answer in the second reply, already :) :)
I posted the eac3to log which shows source & destination, in thread post #3
Your choices are - back to AC-3 in 5.1 with downmixing the extra surround channels (rear) in the regular surround ones (sides)
With 6.1, how does one identify "the extra surround channels (rear) in the regular surround ones (sides)" - which channel numbers are they?
TIA
Ghitulescu
20th October 2015, 13:59
With 6.1, how does one identify "the extra surround channels (rear) in the regular surround ones (sides)" - which channel numbers are they?
You can't have more than 6 channels in AC-3. To use dolby you need to pick up an extension, like Plus, Ex and the like. Some of them are not permitted by any combination (software/player), so you also must be sure of the target (player).
I would keep the DTSHD (all modern players can cope with) but that's me. Or you can get only the core (5.1) - this can be directly translated into DD 5.1, no channel remapping.
channel assignments are here -> https://en.wikipedia.org/wiki/Surround_sound
tebasuna51
20th October 2015, 14:39
How do you arrive at this scheme?
1) Select 6 output channels
2) Click over conexión 6 -> 6 (to delete)
3) Click over input 6 and output 5 (mix BC-SL to SL)
4) Click over input 7 and output 6 (SL -> SL)
5) Click over input 5 and output 6 (mix BC-SR to SR)
JimmyBarnes
20th October 2015, 14:41
Or you can get only the core (5.1) - this can be directly translated into DD 5.1, no channel remapping.
As indicated before, I tried:
eac3to SW3.dtsma SW3.dts -core
but it gave:
DTS Master Audio, 6.1 channels, 24 bits, 48kHz
(core: DTS-ES, 6.1 channels, 1509kbps, 48kHz)
and Audacity confirmed that the DTS was 6.1, not 5.1
Ghitulescu
20th October 2015, 15:54
I am not expert in eac3to and curious channel mappings, I assume you should use remapping function of eac3to if the direct extraction does not work. As I said, I keep the original.
tebasuna51
20th October 2015, 21:57
As indicated before, I tried:
eac3to SW3.dtsma SW3.dts -core
but it gave:
DTS Master Audio, 6.1 channels, 24 bits, 48kHz
(core: DTS-ES, 6.1 channels, 1509kbps, 48kHz)
and Audacity confirmed that the DTS was 6.1, not 5.1
Can you upload a sample of this dtsma?, for instance with:
eac3to SW3.dtsma Sample.dts -20mb
JimmyBarnes
21st October 2015, 00:52
1) Select 6 output channels
2) Click over conexión 6 -> 6 (to delete)
3) Click over input 6 and output 5 (mix BC-SL to SL)
4) Click over input 7 and output 6 (SL -> SL)
5) Click over input 5 and output 6 (mix BC-SR to SR)
Thanks but what I meant was, How do you determine what channels to mix?
What are the rules governing downmixing which make your scheme correct and mine wrong?
TIA
JimmyBarnes
21st October 2015, 04:32
Can you upload a sample of this dtsma?, for instance with:
eac3to SW3.dtsma Sample.dts -20mb
I created sample DTSMA, uploaded to MediaFire:
https://www.mediafire.com/?jtis55sjhxssu3g
Ghitulescu
21st October 2015, 09:34
What are the rules governing downmixing which make your scheme correct and mine wrong?
For the simple reason that there is a rule on how to distribute the sounds amongst channels. If one combines them back (downmixes) then he had to combine the corresponding sounds, not to pick up arbitrary channels, for other reasons.
tebasuna51
21st October 2015, 10:47
Thanks but what I meant was, How do you determine what channels to mix?
What are the rules governing downmixing which make your scheme correct and mine wrong?
Here you have all DTSMA channel layouts: http://forum.doom9.org/showthread.php?p=1714833#post1714833
And here a channel test sample for all the layouts: https://www.sendspace.com/file/pd2o0f
Your sample is the I: 6.1-L,R,C,LFE,Ls,Rs,Cs discrete (I61_disc.dtshd file)
When a proper decoder (ArcSoft, dcadec, ffmpeg) convert this dtshd to PCM samples the channels order must be the same than in WAV specs:
Track 1: Front Left (L in dts)
Track 2: Front Right (R in dts)
Track 3: Front Center (C in dts)
Track 4: Low Frequency (LFE in dts)
Track 5: Back Center (Cs in dts)
Track 6: Side Left (Ls in dts)
Track 7: Side Right (Rs in dts)
Like the channel layout for PCM 5.1 is:
Track 1: Front Left (FL)
Track 2: Front Right (FR)
Track 3: Front Center (FC)
Track 4: Low Frequency (LF)
Track 5: Side Left (SL)
Track 6: Side Right (SR)
The 4 first tracks are the same but the last 2 must be:
Track 5: SL + 0.707*BC
Track 6: SR + 0.707*BC
The BC channel contribution is added to Side channels with half acustic power (-3dB in volume) in each.
With your scheme you have:
Track 4: LF + BC
than have no sense.
I created sample DTSMA, uploaded to MediaFire
I can't reproduce your problem (AC3 with more length than DTSHD) with this sample. Sorry I can't help with that.
JimmyBarnes
21st October 2015, 13:15
Here you have all DTSMA channel layouts: http://forum.doom9.org/showthread.php?p=1714833#post1714833
Thanks, this tells me what I want to know.
cheers
SeeMoreDigital
21st October 2015, 15:36
I created sample DTSMA, uploaded to MediaFire:
https://www.mediafire.com/?jtis55sjhxssu3gWell...
I've just dragged and dropped the (dts-hd ma+dts-es) sample file into UsEac3to v1.1.7 (with eac3to v3.29) and it managed to create a 640Kbps 5.1Ch AC3 stream without any issues at all :)
Sparktank
21st October 2015, 15:51
I thought his original log shows that it downmixed to 5.1 without errors.
Just some minor normalization (-0.9dB). or something.
I think it's mostly an Audacity issue after using eac3to.
Audacity can use external libraries for FFMPEG, but won't update internally (because it's too much work for them).
I tried to contact them several times about updating their FFMPEG to current stable releases (if not Zeranoe releases).
Trying to keep the 6.1 discreet is kind of useless.
The previous solutions are best: downmix to 5.1 or upmix to 7.1 (double-back from center-back).
JimmyBarnes
21st October 2015, 20:54
Well...
I've just dragged and dropped the (dts-hd ma+dts-es) sample file into UsEac3to v1.1.7 (with eac3to v3.29) and it managed to create a 640Kbps 5.1Ch AC3 stream without any issues at all :)
Length of the DTSMA and AC3 are the same for the sample?
eac3to 3.29 (command-line) did the full conversion, but the AC3 was 14.3 % longer than the DTSMA.
tebasuna51
21st October 2015, 21:23
Length of the DTSMA and AC3 are the same for the sample?
Yes, your dts sample is 40.459 sec. and ac3 40.480 sec. (1265 frames, with 1264 frames is only 40.448).
Do you have the same problem with this sample?
JimmyBarnes
21st October 2015, 23:58
Yes, your dts sample is 40.459 sec. and ac3 40.480 sec. (1265 frames, with 1264 frames is only 40.448).
Do you have the same problem with this sample?
Yes, using eac3to CL, the resultant AC3 is 46.272 s, 14.37 % longer than the source DTSMA.
So, what is it that UsEac3to v1.1.7 does, it's supposed to be just a GUI for eac3to, isn't it?
tebasuna51
22nd October 2015, 09:30
Yes, using eac3to CL, the resultant AC3 is 46.272 s, 14.37 % longer than the source DTSMA.
So, what is it that UsEac3to v1.1.7 does, it's supposed to be just a GUI for eac3to, isn't it?
I use also UsEac3to but like you say is only a GUI than create a command line like your:
eac3to v3.29
command line: C:\BDrip\EAC3to\eac3to SW3.dtsma SW3_640norm.AC3 -640 -normalize
I tested all variants using -normalize/-down6/-dcadec ... and always work fine.
Maybe is your ArcSoft version, try using -dcadec.
With ArcSoft 1.1.0.0 work fine also.
JimmyBarnes
23rd October 2015, 02:58
Maybe is your ArcSoft version, try using -dcadec. With ArcSoft 1.1.0.0 work fine also.
Worked OK using libDcaDec.
I tried implementing ArcSoft 1.1.0.1 downloaded here:
http://www.dvbsupport.net/download/index.php?act=view&id=277
It says: "Just put dtsdecoderdll.dll and the related .CRT folder (otherwise it will not run if the related Visual C++ Redistributable package is not installed on the system) into base folder of the programs."
I did that, however eac3to couldn't get it to work and used libDcaDec instead => AC3 of correct length
Was using tehparadox unspecified ArcSoft DTS decoder version before (which eac3to used but gave bad 6.1> 5.1 AC3), will try this one:
https://www.sendspace.com/file/ief0t0 => ArcSoft DTS decoder 1.1.0.0
YES finally, a good conversion to AC3, so looks like bad ArcSoft DTS decoder was the problem..
tebasuna51
23rd October 2015, 10:22
Actually ArcSoft is only necesary to decode DTS-Express, in all my test libDcaDec decode bitidentical outputs than wav sources (ArcSoft 1.1.0.0 seems have, in few cases, a rounding error and the output differ than sources in the last significant bit).
JimmyBarnes
24th October 2015, 04:46
Actually ArcSoft is only necesary to decode DTS-Express, in all my test libDcaDec decode bitidentical outputs than wav sources (ArcSoft 1.1.0.0 seems have, in few cases, a rounding error and the output differ than sources in the last significant bit).
That's interesting, I always thought ArcSoft was supposed to be the best tho I have not done any testing.
tormento
9th October 2025, 18:27
Your downmix is wrong, you mix the Back Center channel to LFE channel.
Sorry to resurrect a very old thread but what is the correct way to upmix 6.1 to 7.1 with ffmpeg?
tebasuna51
10th October 2025, 10:28
If your 6.1 is a dts matrixed (BC analog mixed in SL-SR) the recommended way is let it as 5.1
If your 6.1 is discrete (independent BC channel) the recommended way is downmix to 5.1 to obtain the same 2D surround, with less bitrate needed, using:
ffmpeg -hide_banner -i INPUT_61 -vn -filter_complex^
"asplit [f][s]; [f] pan=3.1|c0=c0|c1=c1|c2=c2|c3=c3 [r]; [s] pan=stereo|c0=0.35*c4+0.5*c5|c1=0.35*c4+0.5*c6, compand=attacks=0:decays=0:points=-90/-84|-8/-2|-6/-1|-0/-0.1, aformat=channel_layouts=stereo [d]; [r][d] amerge [a]"^
-map "[a]" OUTPUT_51
Where OUTPUT_51 can be AAC, OPUS or EAC3
If you need 2D surround 7.1 (I don't know for what) you can use:
ffmpeg -hide_banner -i INPUT_61 -vn -af pan=7.1|c0=c0|c1=c1|c2=c2|c3=c3|c4=0.707*c4|c5=0.707*c4|c6=c5|c7=c6 OUTPUT_71.wav
And recode your 7.1 2D
tormento
10th October 2025, 10:32
If your 6.1 is a dts matrixed (BC analog mixed in SL-SR) the recommended way is let it as 5.1
If your 6.1 is discrete (independent BC channel) the recommended way is downmix to 5.1 to obtain the same 2D surround, with less bitrate needed, using
Thanks for your reply. How can I understand which type is my file?
The DTS properties are:
Format : DTS ES XCh XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
File size : 3.20 GiB
Overall bit rate mode : Variable
Audio
Format : DTS ES XCh XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Bit rate mode : Variable
Channel(s) : 7 channels
Channel layout : C L R Ls Rs LFE Cb
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless
tebasuna51
10th October 2025, 10:46
It is discrete.
Not matrixed like this:
Audio
Format : DTS ES
Format/Info : Digital Theater Systems
Commercial name : DTS-ES Matrix
Channel(s) : 7 channels
Channel layout : C L R Ls Rs Cb LFE
tormento
10th October 2025, 10:55
It is discrete.
When not discrete, using -ac 6 is enough for a proper conversion to 5.1 or there is a better way?
Thanks.
tebasuna51
10th October 2025, 21:15
It is not necesary, for matrixed 6.1 the output is already 5.1.
tormento
12th October 2025, 17:22
It is not necesary, for matrixed 6.1 the output is already 5.1.
Sorry, I am missing that.
If 6.1 how can it be 5.1?
How do the audio programs treat it?
tebasuna51
13th October 2025, 09:58
Only if you send it to a hardware player 6.1 (or 7.1) with Dolby certified decoder it is decoded like 6.1.
Free software decode it like 5.1 because the output audio is the same with the Back Center channel like a phantom channel produced by Surround Left and Right chnnels.
6.1 and 7.1 formats are unnecesary to obtain Surround 2D, 5.1 is more than enough.
With a discrete 6.1 or 7.1, and if you have a old style 6.1/7.1 hardware player, you can at least recover the original volume channels.
With a matrixed 6.1 you can't recover exactly the original channels and the sound is the same with a Back center speaker or phantom.
Like I say many times old style home theaters 6.1 or 7.1 only have sense to sell more speakers. The surround speakers (4) are only needed for a tiny percentage of time to produce more volume than the frontal ones (3) so most of the time is wasted.
tormento
19th October 2025, 17:29
Only if you send it to a hardware player 6.1 (or 7.1) with Dolby certified decoder it is decoded like 6.1.
Wait, we were talking about DTS 6.1. I am a bit puzzled now :scared:
So, there is no way to obtain the missing information by software? Even commercial one…
tebasuna51
20th October 2025, 09:09
So, there is no way to obtain the missing information by software?
For what? If you have a hardware player 6.1/7.1 does it for you.
If you have a player 5.1 you obtain already the phantom BC channel with the same quality than the dts 6.1 matrixed.
Convert a dts 6.1 matrixed to a 6.1 discrete only need more bitrate with the same quality (upmix 2 channels to 3 channels).
If you insist on doing that conversion you can extract the two surround channels and convert them into three with The "center cut" algorithm (http://www.virtualdub.org/blog/pivot/entry.php?id=102). There are many free soft to de that for instance http://www.moitah.net/download/latest/Center_Cut_GUI.zip
tormento
22nd March 2026, 12:23
Does
ffmpeg -hide_banner -i INPUT_61 -vn -filter_complex^
"asplit [f][s]; [f] pan=3.1|c0=c0|c1=c1|c2=c2|c3=c3 [r]; [s] pan=stereo|c0=0.35*c4+0.5*c5|c1=0.35*c4+0.5*c6, compand=attacks=0:decays=0:points=-90/-84|-8/-2|-6/-1|-0/-0.1, aformat=channel_layouts=stereo [d]; [r][d] amerge [a]"^
-map "[a]" OUTPUT_51
respect 16/24 bits or it outputs always as 16 bits?
Convert a dts 6.1 matrixed to a 6.1 discrete only need more bitrate with the same quality (upmix 2 channels to 3 channels).
To convert a 6.1 matrix to its standard equivalent (such as to convert to flac), what is the ffmpeg command line to use?
tebasuna51
23rd March 2026, 08:08
respect 16/24 bits or it outputs always as 61 bits?
Yes if INPUT_61 is lossless, if is a lossy encode the decoders output always 32 float.
To convert a 6.1 matrix to its standard equivalent (such as to convert to flac), what is the ffmpeg command line to use?
For a 6.1 matrix you don't need downmix, the output is already standard 5.1 (like I say before).
To convert to flac a lossy 6.1 matrix (for what?) you only need convert output float 32 to int 24.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.