Skip to content

Extracting DTS on a Mac

Jordan Roseman did a great job documenting how to extract (“unmix”) individual channels from a DTS surround sound recording in his book Audio Mashup Construction Kit. Get yourself a copy if you don’t have it already — it’s definitely the bible for audio hackers.

What’s not covered in the book, however, is how to extract DTS audio if you are on a Mac. After much trial and error, I’ve come up with a reliable method to do this. Read on for my step-by-step instructions.

What you’ll need:

  • Any DVD with DTS encoded audio
  • MacTheRipper — free DVD ripper for Mac OS X
  • Audacity 1.3 beta — free audio editor
  • Application(s) to convert a DTS file into a multi-channel WAV. If you aren’t afraid of the command-line, then I suggest the following:
    • MacPorts — collection of Unix-based applications ported to OS X
    • libdts — DTS decoding library; contains dtsdec example application

    If you have a command-line phobia, then I suggest:

    • VLC — Media player; contains libdts decoding library

Install Audacity

Visit the Audacity web site to download the 1.3 beta. Grab the 1.3 beta — not the older 1.2 version.

Install MacTheRipper

The old version is still available for free and works fine for what we are doing. Grab it from the MacTheRipper web site.

Install MacPorts

I’m not going to cover this as the process is very well documented on the project’s web site.

Install libdts

Once MacPorts is installed, open a Terminal session and issue the following command:

sudo port install libdts

You will be prompted for the administrator password. Go ahead and enter it. The port application will then attempt to download the numerous source files required to compile libdts. When all is said and done, an example command line application called dtsdec will be installed. You can verify this by simply typing “dtsdec -h” at the command prompt. If it all worked properly, you should see a short screen of application help.

libdts-0.0.2 - by Gildas Bazin 
  based on the a52dec code from Michel Lespinasse  and Aaron Holtzman
usage: dtsdec [-h] [-o ] [-s [
]] [-t
] [-c] [-r] [-a] \
                [-g ] 
        -h      display help and available audio output modes
        -s      use program stream demultiplexer, track 0-7 or 0x80-0x87
        -t      use transport stream demultiplexer, pid 0x10-0x1ffe
        -T      use transport stream PES demultiplexer
        -c      use c implementation, disables all accelerations
        -r      disable dynamic range compression
        -a      disable level adjustment based on output mode
        -g      add specified gain in decibels, -96.0 to +96.0
        -o      audio output mode
                        wav
                        wavdolby
                        wav6
                        wavall
                        aif
                        aifdolby
                        peak
                        peakdolby
                        null
                        null4
                        null6
                        float

Install VLC

If you don’t want to use the command-line, you can skip the MacPorts and libdts install and just use the VLC media player. Visit the VLC web site to grab the latest version.

Rip the DTS Stream

Insert a DVD containing 5.1 DTS audio and fire up MacTheRipper. You can do this from the command prompt by typing “open -a mactheripper”. Once the application has launched, follow these steps:

  • Click the “Mode” button.
  • Select “Title – Chapter Extraction”
  • Click D (“demux”) and then click Streams. A new drawer will slide out of the application window revealing check box selectors for audio, video, and subtitle streams.
  • Select the appropriate Title along with an Start Chapter and End Chapter. Figuring out which title and chapters to select may seem a little confusing at first. Typically, if I’m working with a DVD-Audio disc, I look for Titles with the longest length that have DTS streams available. Keep your eye on the right hand drawer to figure out which chapters have DTS streams.
  • Once you have selected an appropriate Title and Start/End chapter range, deselect all video and subtitle streams in the right hand drawer. Finally, deselect all audio streams except the DTS stream.
  • drawer.png

  • Click GO!

MacTheRipper will then rip the selected DTS audio streams and place them in an appropriately named directly inside your home directory. For example, “BJORK_HOMOGENIC Title 2 (Ch1 – Ch10)” contains the DTS stream for Title 2, Chapters 1 through 10 of Bjork’s Homogenic DVD.

Transcode DTS to WAV

Open a Terminal and navigate to aforementioned directory. For example, “cd /Users/mhite/BJORK_HOMOGENIC\ Title\ 2\ \(Ch1\ -\ Ch10\)/” navigates into the directory containing the ripped DTS stream.

Issue an “ls” command to find the name of the extracted DTS stream. It will end with a “.DTS” extension. For example, “BJORK_HOMOGENIC Title 2 (Ch1 – Ch10)-EN 6Ch -1.DTS.”

Transcode the DTS audio stream into a multichannel WAV file. To do this, use the dtsdec application that we previously installed using MacPorts. The command you will type should look something like this (replacing the DTS filename, of course):

dtsdec -o wav6 BJORK_HOMOGENIC\ Title\ 2\ \(Ch1\ -\ Ch10\)-EN\ 6Ch\ \ -1.DTS > BJORK_HOMOGENIC\ Title\ 2\ \(Ch1\ -\ Ch10\)-EN\ 6Ch\ \ -1.DTS.wav

dtsdec.png

Alternatively, you can use Streaming/Export Wizard in VLC to transcode the DTS file into a multi-channel WAV. Load the DTS file into the VLC playlist and launch the Streaming/Export wizard from the File Menu.

exportwizard.png

On the first screen of the export wizard, choose the “Transcode/Save to file” radio button. Click Next.

wizard1.png

Highlight the file to convert in the “Existing playlist item” list or select the file using the “Select a stream” option. Click Next.

wizard_select_file.png

On the next screen, you will want to select the “Transcode audio” checkbox. For the Codec, choose either “Uncompressed, integer” or “Uncompressed, floating-point.” Choosing floating-point results in much larger filesizes. In my own tests, I’ve used “Uncompressed, integer” with a bitrate of 192 and it sounds fine. Click Next.

transcode.png

You will then be prompted to choose an encapsulation format. Notice there really is no other choice than WAV as all other options are grayed out. Select Next.

encap.png

On the “Additional transcode options” screen, select the output filename for the multichannel WAV.

outputfilename.png

Finally, you will be presented with a summary page. Click Finish.

summary.png

The result of all this effort is a multichannel WAV file that we can now open in an audio editor.

Open in Audacity

Once dtsdec (or alternatively, VLC) is done converting the file, open the resulting WAV in Audacity. You can do this through the command prompt by typing the following (replacing the filename, of course):

open -a audacity BJORK_HOMOGENIC\ Title\ 2\ \(Ch1\ -\ Ch10\)-EN\ 6Ch\ \ -1.DTS.wav

openaudacity.png

importwav.png

Audacity should launch and a multichannel WAV file containing each discrete channel of the DTS recording should appear. If you want to save each of the channels into an individial WAV file, you can use the “File -> Export Multiple” command in Audacity.

exportmultiple.png

You can solo each one individually by clicking on a track’s “Solo” button. I always solo the center channel (the third track) and look for isolated vocals. Note that if you attempt to play the multichannel recording without having selected Solo on a single track, it will clip and sound bad.

Summary

Yes, it’s a lot of work to extract channels from DTS streams. You might even go so far as to say it is a total pain in the ass. However, for the obsessed remix and mashup artist there are some real treasures to be found. Let us know what you find!

Related Tools

There’s more than one way to skin a cat. You mind the following tools helpful in your exploration of surround sound audio on the Mac.


Revisions

4/2/08 – Added a “Related Tools” section.
3/31/08 – Added information on using VLC to convert DTS to multi-channel WAV.

31 Comments

  1. I must try this.I often use audacity for podcasting.Sounds very workable,this process.

    Posted on 05-Mar-08 at 6:09 pm | Permalink
  2. It works great. I have been able to create a number of interesting acapellas using this technique.

    Posted on 10-Mar-08 at 10:31 am | Permalink
  3. marc

    Very nice tutorial. But I found an easier way: use VLC’s Streaming Exporting Wizard to create a 6channel .wav.
    Tried this with an 44.khz dts audiofile; I think should work with a DVD as well.

    Posted on 31-Mar-08 at 2:09 am | Permalink
  4. Marc, thanks for the tip. I’ve updated the article with information on how to do the conversion using VLC. I realize there are a lot of folks who have a command-line phobia so using VLC will certainly save them a lot of grief.

    Posted on 31-Mar-08 at 10:14 pm | Permalink
  5. BTW, Marc, I also tested the export wizard straight from DTS-CD. That actually didn’t work — I get this error:

    ffmpeg: av_open_input_stream failed
    ps: cannot peek
    main: no suitable demux module for `file/:///Volumes/Audio CD/11 Audio Track.aiff’

    It appears you need to have ripped the audio first before using the Export wizard in VLC. (At least as best as I can tell!)

    I didn’t try it with a DTS-DVD, so I can’t speak for that yet.

    In the meantime, my suggestion is to use MacTheRipper to pull the DTS stream off DVDs. And of course if it is a DTS CD you can rip it to WAV using iTunes or whatever (and then follow the “Transcode DTS to WAV” instructions above).

    Posted on 01-Apr-08 at 10:43 am | Permalink
  6. Steve

    I’ve followed your instructions over and over again… And I can’t get it to work… I have a over 400MB DTS file but when I transcode it come out as a zero k wmv file….

    What am I doing wrong????

    Posted on 04-Apr-08 at 4:46 pm | Permalink
  7. Steve — which method are you using: the dtsdec method or the VLC transcode method? I’m not sure how you could be ending up with a .WMV file rather than a .WAV file unless you were accidently selecting to transcode a video stream instead of an audio stream in the VLC wizard.

    Posted on 06-Apr-08 at 9:22 am | Permalink
  8. Also, you might want to try a known good DTS file in your tests. Use this one:

    http://www.sr.se/laddahem/MultiKanal/Dts/SURROUNDTEST_011212.zip

    You can find other test DTS files on this page:

    http://www.sr.se/cgi-bin/mall/index.asp?ProgramID=2446

    Posted on 06-Apr-08 at 9:24 am | Permalink
  9. Steve

    Hello Matt

    Thank you… I was using VLC and the tiny files were “wav” not “wmv” files…
    Both the links that you gave me download as a “wav” file, not a DTS stream so I can’t try the test… Mac the ripper gives me a .DTS stream file… That’s what I need right?

    Posted on 09-Apr-08 at 4:12 pm | Permalink
  10. You are right, sorry — those test files are WAVs that contain DTS encoded audio. They are not raw DTS rips from DVD.

    I actually just performed a transcoding test with VLC to try and replicate your problem. I took a DTS stream I had ripped from DVD (a raw stream) and transcoded it into a multichannel WAV using the Streaming/Transcoding wizard. Worked fine. I was able to open the resulting WAV in Audacity, too, in all its multichannel glory.

    Did you rip this .DTS file yourself? Or did you download it from somewhere? It would be interesting to know if you had luck with another .DTS file.

    Posted on 10-Apr-08 at 5:26 pm | Permalink
  11. Steve

    Hey Matt

    I ripped the dts stream from the disc following the instructions on this page… Which gives me about a 400MB file which seems to be about the right size, but VLC keeps spitting out a zero k file … I don’t get it, the instructions for VLC are simple!!!

    I’m running the latest VLC on an intel MBP with 10.5.2…
    I even tried older versions of VLC with no success…

    If you can think of ANYTHING else I might try I would be grateful!

    Thx
    S

    Posted on 10-Apr-08 at 11:00 pm | Permalink
  12. Steve,

    What’s the disc? Are you sure you ripped a DTS stream and not a AC3 stream?

    -M

    Posted on 10-Apr-08 at 11:16 pm | Permalink
  13. Steve

    I’ve tried a few that have AC3 & dts… I’m selecting the dts stream in “mac the ripper” like the instructions say….

    Posted on 10-Apr-08 at 11:36 pm | Permalink
  14. Try ripping a single chapter from a title. You could upload it somewhere and I will give it a whirl.

    Or give me an example disc you are trying to rip. I may have it.

    -M

    Posted on 10-Apr-08 at 11:56 pm | Permalink
  15. Steve

    Matt

    I tried doing one chapter (about 50MB)… The two CD’s I was trying to work with were Steely Dans “Everything Must Go” and Toy Matinee’s CD… If you have either of these give it a try, if not I’ll load something for you….

    Thanks Again
    S

    Posted on 11-Apr-08 at 8:53 am | Permalink
  16. Hi, Steve. Unfortunately I have neither of those titles. If you are able to upload a chapter somewhere I could check it out — a sanity check so-to-speak.

    -M

    Posted on 11-Apr-08 at 10:46 pm | Permalink
  17. Steve

    Hey Matt

    Here’s a stream for you to try…

    http://www.digitalhotshots.com/dtsfiles/

    Posted on 12-Apr-08 at 9:39 am | Permalink
  18. Hi, Steve. Wasn’t able to load the stream for transcoding in VLC. However, it worked fine using the command-line dtsdec method I mention in the tutorial.

    Wonder why VLC doesn’t recognize it? Strange.

    BTW, what’s the name of that song?

    Posted on 14-Apr-08 at 11:01 am | Permalink
  19. Steve

    I believe it was track 3, Toy Matinee “Things She Said” I’m really not too crazy about the command-line thing….

    If you can figure out how to get it working or find another app. I would appreciate it!

    Thx

    Posted on 15-Apr-08 at 12:35 am | Permalink
  20. Steve,

    So I played a bit more with this. My test before of the VLC method used a stream I had ripped using DVDDecrypter on the PC. Doesn’t seem to work with a stream I just ripped again using Mactheripper. However, like I said, the command-line tools still work.

    Not sure what the difference is between how DVDDecrypter saves the DTS stream and how MacTheRipper does. Anyone know?

    A black art is what this is…

    -M

    Posted on 15-Apr-08 at 11:19 am | Permalink
  21. Steve

    Hey Matt

    I tried a couple of versions of VLC (older) because I thought maybe it was the newest version with 10.5 that might have a problem… No Luck!

    Posted on 15-Apr-08 at 9:28 pm | Permalink
  22. Steve

    Hey Matt

    Little update…. “AudialHub” and it seems to work as far as converting the DTS file to wav, and I checked it in Audacity and the discreet tracks show… B U T when I try to burn it it crashes Toast even though the file is only one song about 50meg. And this new program is able to play the wav file not “just hiss” but it may be using VLC to play it… (?) AudialHub can burn a CD but when I use that function it give me a non dts disc with only the right channel playing…. Nice huh! I guess the point is you “may” want to check this new found program out…

    Posted on 22-Apr-08 at 10:09 am | Permalink
  23. Lee Farber

    I’m having the same problem as Steve. The resulting WAV file that comes out of VLC is zero k. I can’t figure it out! I’m following the instructions to the letter. And yes, I am command line phobic…

    Posted on 19-May-08 at 10:22 pm | Permalink
  24. So, Lee, sorry it’s a bit confusing. If you read the thread, you’ll find out that indeed the VLC method DOES NOT work for MacTheRipper streams. It works for DVDDecrypter (PC) streams, though. In any case, I haven’t gotten around to updating the main post to reflect this.

    Your best bet is to get over your command-line phobia — it’s really not that bad. :)

    Posted on 20-May-08 at 8:58 am | Permalink
  25. Mattias

    Used the instructions, ripped the DTS-stream with mac the ripper and then converted it with VLC. It works perfect! Thanks for the post!

    Maybe one thing for those that received an Zero K file:

    I also received this the first time. I then saw that the chapter I selected on mac the ripper didn’t have a DTS-stream. You have to make sure you have the right chapter whih contains a stream. I had a 400 MB-file, but it had no stream. You can check that your file is ok, by checking if VLC recognises the stream and plays it (before you convert).

    Posted on 05-Aug-08 at 1:07 pm | Permalink
  26. So…. once extracted/converted/created to a single DTS .wav of static, how do I turn it back into audio on a CD?

    If Toast….. under which format for a 700MB CD? As Audio? As data? The Cue file is of no value to Toast, it would appear…

    TiA!

    Posted on 06-Oct-08 at 9:20 am | Permalink
  27. Jim

    I converted several DTS streams to a wav. files. When opened in VCL all of them have a very fast speed and it sounds like The Chipmunks. If I convert a AC3 stream it has a normal speed. It is very cumbersome to play with the speed, pitch and tempo of the wav. file. Any reason for this or solution?

    Posted on 14-May-09 at 9:16 am | Permalink
  28. Matt Z

    Hey Matt. Great posting but ive hit an error.
    The following dependencies failed to build: libdca

    heres the infro from the config file… it seems im missing some stuff?
    AMTAR=’${SHELL} /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_libdca/work/libdca-0.0.5/autotools/missing –run tar’
    AR=”
    AUTOCONF=’${SHELL} /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_libdca/work/libdca-0.0.5/autotools/missing –run autoconf’
    AUTOHEADER=’${SHELL} /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_libdca/work/libdca-0.0.5/autotools/missing –run autoheader’
    AUTOMAKE=’${SHELL} /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_libdca/work/libdca-0.0.5/autotools/missing –run automake-1.10′

    Please help dude! mcz4 on ichat

    Posted on 22-Aug-09 at 7:52 pm | Permalink
  29. Jay

    I have a DTS Audio CD (Ray Brown Trio Summertime on Telarc). VLC plays it fine, everything else plays noise. MacTheRipper doesn’t see it as its not a DVD. Opening it in the finder shows the 11 tracks as AIFF files. I copied the AIFF file from the CD onto the Mac, changed extension to WAV, and used VLC to transcode it. When I open the transcoded file using the command line for audacity, its just noise.

    B.T.W. I was able to get iTunes playable audio files on a PC using dbPoweramp’s CD Ripper and Tranzcode. I was hoping to find a Mac-Only solution.

    Posted on 13-Sep-09 at 8:09 am | Permalink
  30. Spielmeister

    I’ve tried the command line method (dtsdec) and it worked great. However, the demuxed WAV files have clicks and other kinds of clipping distortion. I thought it was a problem of the De-inverleaver program, but after testing with more DTS files, the problem is the dtsdec demux.

    I should try (once again) with VLC.

    Posted on 18-Sep-09 at 8:46 am | Permalink
  31. JimmyJombas

    I have tried the VLC program for mac os x 10.4 version. that was linked above. it didn’t convert the dts to multichannels. just a double channel wav. n played fine in every program i threw at it. n the rest of my dts albums. hav the static (which is normal unless u use vlc to play it.) so i knew it would burn fine.

    a friend of mine got a few of these converted cd’s. most of em are either multiple tracks (single songs cut, in wav files. or one huge wav file n a cue.)

    i use paralells desktop w/ windows xp installed for some programs n a freeware version of the KUbuntu 9.04 Linux as well. so i got all my bases checked for the min. software to run whatever is needed.

    i use img burn to burn the files that can’t be used by my mac programs. Toast is almost worthless in this situation. it’s basically a very out dated script of Nero w/ the Blue-Ray disc burning cap. added to it. i remember i’ve always hav to use img burn to burn a cue n whatever else file. those two programs. Nero n Toast only hav bin / cue files. if u dont hav both u cant burn em in this situation.

    just load the cue file. or write your own. they aren’t complex txt files w/ a .cue extension. i.e. my friend and i both own this cd. so only wanted to see how this worked out.

    REM GENRE Industrial
    REM DATE 1989
    REM DISCID 720B6F0A
    REM COMMENT “ExactAudioCopy v0.95b4″
    PERFORMER “Nine Inch Nails”
    TITLE “Pretty Hate Machine (DTS 5.1)”
    FILE “dts.wav” WAVE
    TRACK 01 AUDIO
    TITLE “Head Like A Hole”
    PERFORMER “Nine Inch Nails”
    FLAGS DCP
    INDEX 01 00:00:00
    TRACK 02 AUDIO
    TITLE “Terrible Lie”
    PERFORMER “Nine Inch Nails”
    FLAGS DCP
    INDEX 00 04:59:72
    INDEX 01 04:59:73
    TRACK 03 AUDIO
    TITLE “Down In It”
    PERFORMER “Nine Inch Nails”
    FLAGS DCP
    INDEX 00 09:38:74
    INDEX 01 09:39:00
    TRACK 04 AUDIO
    TITLE “Sanctified”
    PERFORMER “Nine Inch Nails”
    FLAGS DCP
    INDEX 00 13:25:26
    INDEX 01 13:25:27
    TRACK 05 AUDIO
    TITLE “Something I Can Never Have”
    PERFORMER “Nine Inch Nails”
    FLAGS DCP
    INDEX 00 19:13:46
    INDEX 01 19:13:47
    TRACK 06 AUDIO
    TITLE “Kinda I Want To”
    PERFORMER “Nine Inch Nails”
    FLAGS DCP
    INDEX 00 25:08:45
    INDEX 01 25:08:46
    TRACK 07 AUDIO
    TITLE “Sin”
    PERFORMER “Nine Inch Nails”
    FLAGS DCP
    INDEX 00 29:41:41
    INDEX 01 29:41:42
    TRACK 08 AUDIO
    TITLE “That’s What I Get”
    PERFORMER “Nine Inch Nails”
    FLAGS DCP
    INDEX 00 33:47:71
    INDEX 01 33:47:72
    TRACK 09 AUDIO
    TITLE “The Only Time”
    PERFORMER “Nine Inch Nails”
    FLAGS DCP
    INDEX 00 38:18:55
    INDEX 01 38:18:56
    TRACK 10 AUDIO
    TITLE “Ringfinger”
    PERFORMER “Nine Inch Nails”
    FLAGS DCP
    INDEX 00 43:06:25
    INDEX 01 43:06:26

    as u can see the wav extension code is above. the .bin should be in qoutes if u are doing a data backup. via a bin n cue. dont recall how the txt of that goes though.

    this is another cd w/ simplier type of coding to tell the program when to cut out on the track (00) and cut in (01)

    FILE “dts.wav” WAVE
    TRACK 01 AUDIO
    INDEX 01 00:00:00
    TRACK 02 AUDIO
    INDEX 01 22:49:08
    TRACK 03 AUDIO
    INDEX 01 29:31:08
    TRACK 04 AUDIO
    INDEX 01 35:02:20
    TRACK 05 AUDIO
    INDEX 01 38:48:15

    if u rip a cd, whether it’s a normal cd or a dts in wav form this works. plus u dont have to remember to click 0 seconds on every song when burning in a normal program. the pause option that’s default everytime u want to burn an audio cd.

    so i used nero to try n just burn the dts files as is. n it did burn. but when i used it in my dvd w/ dts, dolby digtal, etc outputs. it was in dts but played static only. like as if i was trying to listen to it w/ everything on this computer cept vlc.

    how can i convert the dts using windows to a 5.1 dts wav file. the above vlc didnt do it correctly.

    Posted on 21-Dec-09 at 8:35 pm | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*