I have been compressing my DVD’s and Blurays for years to a format that plays on my various media players. After purchasing and falling in love with the Apple TV interface I decided to use it as my primary media playback device. This unfortunately led to the problem of the Apple TV being unable to playback a DTS soundtrack. Up until recently I have been running Windows in a virtual machine just to run some simple buggy applications for the conversion. This process was time consuming and very frustrating.

I decided to do a search to try a find a reasonably easy process on OSX. I found a few different methods but most out of date with broken links so I decided to compile my own howto combining information from many sources. I will try to link back where possible.

Here we go.

Step 1

Install Xcode from Apple. Signup here and register as a developer if you do not have an account.

http://developer.apple.com/programs/register/

Download Xcode when you are logged in and install the default configuration.

Step 2

Install CMake

mkdir /temp
cd /temp
curl -O http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz
tar xvzf cmake
cd cmake-2.8.2
./configure
make
sudo make install
Mirror of CMake 2.8.2 here.
Step 3
Install Aften
cd /temp
svn co http://aften.svn.sourceforge.net/svnroot/aften Aften
cd Aften
mkdir default
cd default
cmake /temp/Aften/
make
sudo make install
Step 4
Install libdca
cd /temp
svn co svn://svn.videolan.org/libdca/trunk libdca
cd libcda
sudo ./bootstrap
sudo ./configure
sudo make
sudo make install
Step 5
Install MKVToolNix
The easiest way to do this is as per the MKVToolnix site and to install MacPorts
Download MacPorts from here
Install the package and restart Terminal.
Now install MKVToolnix using
sudo port install mkvtoolnix
Mine took about 15 minutes to install the dependencies required and to install MKVToolnix.
Step 6
Install the final mkvdts2ac3 script.
You can get it from here.
I also have a local copy here.
Remove the .txt extension if you use my local copy.
Place the script in your /usr/local/bin folder.
cd to the download location of the mkvdts2ac3.sh script
chmod 755 mkvdts2ac3.sh
cp mkvdts2ac3.sh /usr/local/bin
All done.
Now you should be able to convert your mkv files with a DTS soundtrack to AC3.
In the terminal, cd to a folder where your mkv file is and run
mkvdts2ac3.sh yourfile.mkv
If you do not want to keep the DTS file use the -n flag.
Good luck.