After upgrading my media server to Jaunty recently I noticed that I could no longer play FLAC files from within iTunes under OS X. I couldn’t figure out why this was happening, but to solve it I configured mt-daapd to handle the transcoding with a script rather than with ffmpeg.

There are a few small issues that don’t make this reconfiguration as straight forward as you would hope. First of all, the required script (mt-daapd-ssc.sh) is not installed along with mt-daapd, so I had to pull it from the svn repository and drop it into /usr/bin. Also, mt-daapd-ssc.sh uses wavstreamer to encode the decoded FLAC file, so if that isn’t available on your system, you’ll need to install that too. I believe it is built along with the rest of mt-daapd when building from source.

Next up, mt-daapd.conf needs to be modified to change how the transcoding is handled, the following lines need to be uncommented:

ssc_prog = /usr/bin/mt-daapd-ssc.sh
ssc_codectypes = ogg,flac,alac

The following line needs the ssc-ffmpeg.so part removed:

plugins = rsp.so,ssc-ffmpeg.so

At this stage, I thought that this was all that was required, but I still couldn’t get it working. Upon searching the Ubuntu Forums, someone else had already been through this and pointed out that one component of this set-up (I’m unsure which) requires an older version of FLAC, so a symlink had to be created.

sudo ln -s /usr/lib/libFLAC.so.8.2.0 /usr/lib/libFLAC.so.7

After restarting mt-daapd, iTunes was again playing FLAC files!