View Single Post
Old 7th January 2004, 22:50   #8  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
DTS and DTS-HD FAQ

1. What is DTS?

DTS is a multi-channel home theater lossy encoded audio format developed by Digital Theater Systems. DTS as we know it on DVDs and LaserDiscs is not lossless, but is encoded at very high bitrates, typically 768-1536kbps.

[Like we can see in wikipedia there are new DTS formats for HD and 3D surround used in BluRay]

2. Is it possible to rip / play back DTS tracks from standard DVD discs and why would I want to do this?

[Now ffmpeg can decode DTS-HD and encode DTS standard, players like MPC-HC or VLC can decode or passtrough DTS-HD and can be muxed in MKV without problems.
Forget any other software mentioned here.
To rip DVD's or also BD's you can use MakeMKV, after you can use eac3to or ffmpeg to convert the DTS's like you want.]

Yes, a few ripping tools such as VOBrator, VobEdit, Smartripper, and DVD2AVI can demux DTS streams. DVDecrypter can be used to rip the VOB files with the DTS track from the DVD. Most people are using DVD2AVI to demux the DTS track. Note that it is not recommended to use vStrip to demux DTS due to the fact that vStrip often produces corrupt DTS streams by modifying the header.

For playback of DTS streams, the traditional method was to use the DTS audio decoder included with WinDVD. Gabest has written a filter that allows you to access the WinDVD decoder from many directshow players. You can download the DTS playback filters made available by Gabest (VobSub author) from Doom9’s download section.

However, thanks to the work of Gildas Bazin, there is now a GPL licensed DTS decoder library available - dtsdec / libdts. DTSDec has been implemented into a commandline decoder, and into Media Player Classic, foobar2000, and VideoLan's VLC. Although libdts is still in the early stages of development, either of these projects should be an excellent choice for free DTS playback.

Several tools can be used to mux DTS into popular containers. Later builds of AVImux GUI are capable of muxing DTS tracks into an AVI. DTS can also be muxed into Matroska files using MKVtoolnix.

There is (a guide available) on creating AVI or OGM with DTS inside courtesy of Wilbert.

Some users consider DTS audio to have a much fuller and richer sound compared to Dolby Digital. The only downside to using DTS files in our rips would be the file size. DTS files are typically around 768kpbs and up to 1536kbps, compare this to a Dolby Digital file which are commonly 384kbps or 448kbps. So as you can see by the bitrate difference, DTS files can be very large. However, a few very good uses come to mind for using the DTS tracks besides muxing them into a container in their raw format. In theory, transcoding a DTS file to an Ogg Vorbis or MP3 file could provide a better quality destination because of the source being so clean.


3. How can I transcode a DTS file?

Azidts can be used to transcode DTS with BeSweet (Note that you'll need WinDVD Platinum installed) or with one of the BeSweet GUIs (eg. OagMachine). The (Hypercube Transcoder) supports DTS transcoding as well. One could also use DTSdec (assuming a large amount of HD space) to decode to wav and then encode to any desired format.

Recent versions of foobar2000 support DTS playback and transcoding to any of fb2k's many output formats. Thanks to Kurtnoise there is an easy guide on transcoding DTS with fb2k to a variety of formats.

[eac3to or ffmpeg can do the job without problems also with DTS-HD]

4. Is it possible to encode DTS with BeSweet?

Yes, but you'll also need Surcode CD/DVD Pro, which encodes DTS. Please see (Q32 of the Besweet FAQ).

[ffmpeg can encode to dts standard for free.]

5. Is it possible to pass DTS CD Audio (music) over SPDIF?

The only player that currently supports this is VLC.

Another solution that has proven to work is to use the 2 pin digital output of your CD/DVD-ROM and connect it directly to the digital input of your receiver/amp. This method will bypass your sound card all together, sound cards might alter the stream and render the audio useless so the bypass is preferable. Keep in mind that your sound card should be capable of passing compliant Redbook audio. DTS 5.1 Audio CDs might not work using the SPDIF digital out port if your sound card up-samples the stream to 48kHz (SoundBlasters upsample). Unfortunately it seems most complaint WDM drivers are not capable of this for the moment but if your running Win9x then the VxD drivers should work. However, the M-Audio 24/96 or Delta Dio are reported to play the DTS audio over SPDIF perfectly.

6. I have encoded a 5.1 DTS WAV with SurCode DTS-CD. how do i playback it on my pc ?

VideoLan's VLC player supports playback of DTS-Wavs and DTS-CDs as of version 0.7.1.

If you have WinDVD platinum, install hypercube's DTSWAV filter, then you can use any directshow player (eg. windows media-player). Note that to use the DTSWAV filter, you must rename the files from *.wav to *.dtswav. If you have PowerDVD or any other DTS player, you first need to use BeSplit/BeSliced in order to extract the 5.1DTS stream out of the DTS-WAV.

[DTS-WAV files only make sense to burn a CD, is always better extract the DTS file with BeSplit with less size and better player support.]

7. What about playing DTS over spdif under linux?

Due to recent developments with libdts and alsa, this should now be fully working. First, follow the alsa installation steps described in Q19 of the AC3 FAQ, and make sure your spdif output is activated.

You'll also need a player with dts support. Both VLC and mplayer can be compiled for this if you have libdts installed. Then simply add a '-ac hwdts' to your mplayer commandline, or activate the spdif output option in the sound options of VLC.

8. What is the difference between DTS bitrates 1536, 1510 and 1509?

There are two kind of bitrates for DTS.
(quotations from TS 102 114 - V1.2.1 - DTS Coherent Acoustics; Core and Extensions)

First one is the nominal or "Targeted BitRate" and can be know with the field header "RATE":
"RATE specifies the targeted transmission data rate for the current frame of audio (see table 5.7)"
Valid values: 32..640,768,960..1472,1536,1920..3840

But, "Due to the limitations of the transmission medium the actual bit rate may be slightly different from the targeted bit rate, as listed in table 5.8"
Then there are a second one, the real or "Actual BitRate" that can be less (1510, 1509, ...) than the nominal (1536).

When you encode a .dts file the frames are padded with 0's from the "Actual BitRate" to the "Targeted BitRate".
If you encode to a .cpt (compact) file the frames aren't padded and the file size is less than the .dts (the audio stream is the same).
BTW, you can rename safely the .cpt to .dts without problems.

To know the "Actual BitRate" we need know other field header values:
"NBLKS Number of PCM Sample Blocks", typically 512.
"SFREQ Core Audio Sampling Frequency", typically 48000
"FSIZE Primary Frame Byte Size", not always the same (encoder choice), I see values like 2013 and 2012, then:

Actual Bitrate = 2013 x 8 x 48000 / 512 = 1509.75 Kb/s (rounded to 1510)
Actual Bitrate = 2012 x 8 x 48000 / 512 = 1509 Kb/s

A DTS with "Targeted BitRate" 1536 can have an "Actual BitRate" of 1510 or 1509.
Same differences can be aply to "Targeted BitRate" 768.

9. For what eac3to, when extract a DTS, show: "Patching bitdepth to 24 bits..."?

The DTS stream is not changed at all, only a metadata in the header is changed because some decoders can use that data (wrongly) to decode the stream to 16 bits instead 24 or better.

The problem is a wrong understanding of the metadata, it is not the bitdepth of the DTS (the lossy encodes don't have bitdepth, only lossless like DTS-MA), it is the "Source PCM Resolution" used to encode that DTS, but no matter the source resolution was 16 or any we never can recover the same precission with a lossy encoder.

The lossy decoders always work internally with float samples and downsample to 16 bits int it is not recommended at all, if we decode a lossy format is to recode to other format (for compatibility) or to edit, and then must preserve the better bitdepth than support the next encoder or editor.

eac3to by default always decode lossy formats to 24 bit int but using the undocumented parameter -full we can obtain until 64 bits float (with -libav decoder, not libdcadec).

Last edited by tebasuna51; 30th September 2021 at 13:01. Reason: update
KpeX is offline