Problem Importing 24-bit DTS
Forum rules
This forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
-
LulaMolusco
- Posts: 4
- Joined: Fri May 16, 2014 5:00 am
- Operating System: Please select
Problem Importing 24-bit DTS
Everytime i try to import a multichannel 24-bit DTS audio track from a movie it ends up showing in audacity as 6 16-bit tracks and not 24-bit.
Am I doing something wrong or is it just a limitation from audacity or the decoder?
Am I doing something wrong or is it just a limitation from audacity or the decoder?
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Problem Importing 24-bit DTS
Assuming you are using FFmpeg to import the file, it's a limitation of Audacity's support for FFmpeg.LulaMolusco wrote:Everytime i try to import a multichannel 24-bit DTS audio track from a movie it ends up showing in audacity as 6 16-bit tracks and not 24-bit.
Am I doing something wrong or is it just a limitation from audacity or the decoder?
FFmpeg does support more than 16-bit samples, but not all codecs supported by FFmpeg support more than 16-bit samples.
Audacity does not directly import audio files. Instead Audacity makes a copy of files in lossless PCM (maintaining the existing quality of lossy files) at the bit depth chosen at Default Sample Format in Quality Preferences. So the bit depth shown in the track is not the bit depth of the file but the "Default Sample Format" setting, unless a restriction like that for FFmpeg forces the bit depth to be lower. OGG has a similar restriction - OGG only supports 8-bit or 16-bit samples and Audacity minimum sample format is 16-bit, so OGG files will always be imported at 16-bit resolution irrespective of what the Default Sample Format is.
Given all the above, it was decided not to try to force all FFmpeg-supported codecs to import at 32-bit (and a case-by-case approach according to what each format could be expanded to would take a lot of lot of time). This situation may change in future because Audacity's support for FFmpeg is limited to version 0.10 (or 0.6.2 on Windows and Mac), so we are looking at solutions to that.
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
-
LulaMolusco
- Posts: 4
- Joined: Fri May 16, 2014 5:00 am
- Operating System: Please select
Re: Problem Importing 24-bit DTS
Extremely helpful post.
Thanks a lot.
Thanks a lot.
Re: Problem Importing 24-bit DTS
@ Gale
Yes, that's a good explanation.
With a sample file from samples.mplayerhq.hu
mediainfo "Master Audio 5.1 24bit.dts" shows
dts, 6 channels, 48KHz, 24 bits.
When imported into Audacity using FFmpeg import library result shows
pcm, 6 channels, 48KHz, 16 bits.
I suppose the workaround is to convert it to pcm with FFmpeg before importing it into Audacity.
Then mediainfo "tester.wav" shows
pcm, 6 channels, 48KHz, 24 bits.
And when imported into Audacity (FFmpeg library not needed) result shows
pcm, 6 channels, 48KHz, 32 bits.
But after processing the file in Audacity, how would it be exported?
Is there a command-line dts encoder that could be used as "external program" to achieve same quality as the original "Master Audio 5.1 24bit.dts" file?

Yes, that's a good explanation.
With a sample file from samples.mplayerhq.hu
Code: Select all
wget "samples.mplayerhq.hu/A-codecs/DTS/dts/Master%20Audio%205.1%2024bit.dts"dts, 6 channels, 48KHz, 24 bits.
When imported into Audacity using FFmpeg import library result shows
pcm, 6 channels, 48KHz, 16 bits.
I suppose the workaround is to convert it to pcm with FFmpeg before importing it into Audacity.
Code: Select all
ffmpeg -i "Master Audio 5.1 24bit.dts" -c:a pcm_s24le tester.wavpcm, 6 channels, 48KHz, 24 bits.
And when imported into Audacity (FFmpeg library not needed) result shows
pcm, 6 channels, 48KHz, 32 bits.
But after processing the file in Audacity, how would it be exported?
Is there a command-line dts encoder that could be used as "external program" to achieve same quality as the original "Master Audio 5.1 24bit.dts" file?
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Problem Importing 24-bit DTS
The only way I know is to use a recent build of FFmpeg (like those from Zeranoe ) then use the "dca" (DTS Coherent Acoustics) encoding. So on Windows the command would look something like:bat999 wrote:After processing the file in Audacity, how would it be exported?
Is there a command-line dts encoder that could be used as "external program" to achieve same quality as the original "Master Audio 5.1 24bit.dts" file?
Code: Select all
"C:Program Files (x86)ffmpeg-2.0-win32-staticbinffmpeg.exe" -i - -acodec dca -strict -2 "%f"Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: Problem Importing 24-bit DTS
HiGale Andrews wrote:... then use the "dca" (DTS Coherent Acoustics) encoding.
I had tried that, but when exported the result is
dts, 2 channels, 48KHz, 16 bits.
Maybe FFmpeg's dts encoder is not good enough.
@Xubuntu:~$ ffmpeg
ffmpeg version 2.2.git-3690393 Copyright (c) 2000-2014 the FFmpeg developers
built on May 14 2014 15:40:01 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
Re: Problem Importing 24-bit DTS
Doh
I needed to set Audacity ...
Preferences > Import/Export
"Use custom mix" instead of "Always mix all tracks down"
Now with FFmpeg
The final result is
dts, 6 channels, 48KHz, 16 bits.
I needed to set Audacity ...
Preferences > Import/Export
"Use custom mix" instead of "Always mix all tracks down"
Now with FFmpeg
Code: Select all
ffmpeg -i - -c:a dca -strict -2 -ar 48000 "%f"dts, 6 channels, 48KHz, 16 bits.
Re: Problem Importing 24-bit DTS
Hello again
If the file is exported from Audacity as a .wav file with
The result is
pcm, 6 channels, 48KHz, 24 bits.
So all the original parameters are now kept (including bit depth).
And it could then be converted to dts or whatever with a "suitable" encoder.

If the file is exported from Audacity as a .wav file with
Code: Select all
ffmpeg -i - -c:a pcm_s24le -ar 48000 -ac 6 "%f"pcm, 6 channels, 48KHz, 24 bits.
So all the original parameters are now kept (including bit depth).
And it could then be converted to dts or whatever with a "suitable" encoder.
Re: Problem Importing 24-bit DTS
Hmm
Audacity is able to export 24 bit PCM without FFmpeg.
File > Export Audio > Other uncompressed files > Options > Signed 24 bit PCM
Audacity is able to export 24 bit PCM without FFmpeg.
File > Export Audio > Other uncompressed files > Options > Signed 24 bit PCM
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Problem Importing 24-bit DTS
Isbat999 wrote:"Use custom mix" instead of "Always mix all tracks down"
Now with FFmpeg
The final result isCode: Select all
ffmpeg -i - -c:a dca -strict -2 -ar 48000 "%f"
dts, 6 channels, 48KHz, 16 bits.
Code: Select all
-c:aCode: Select all
-acodecTypically you set sample format for PCM by specifying this in -acodec.
According to the built-in ffmpeg help :
I have not figured out the correct syntax to use for listing or setting - it just returns-sample_fmt format
set sample format, 'list' as argument shows all the sample formats supported
Perhaps you really need to encode in DTS-HD but FFmpeg cannot do that yet according to: http://www.ffmpeg.org/general.html .Unrecognized option 'sample_format'
If you are really keen you could ask here https://lists.ffmpeg.org/mailman/listinfo/ffmpeg-user/ or on a specialist forum like Doom9 or hydrogenaudio and see if you can get a definitive answer.
Or you can try (at your own legal risk) dcaenc .
Let us know how you get on...
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual