How to play AAC 5.1 audio through S/PDIF on Mac OSX? I've gone through a bunch of tutorials as well as video players (QuickTime, mplayer, VLC, MPlayerX, Movist) and haven't been able to figure out how to get AAC 5.1 to play correctly on my Mac mini or MBP to my receiver.

By default AC3 and DTS are the only formats that gets passed through to my receiver. Everything else seems to get down-sampled to stereo.

Here's some test files:


6ch aac test video: http://dl.dropbox.com/u/26249587/6ch_aac.mp4
6ch ac3 test video: http://dl.dropbox.com/u/26249587/6ch_ac3.avi


Windows and Linux both have ways to encode AAC 5.1 to AC3 on the fly so it gets passed through to my receiver, but I have not found a way to do it on my Macs. See:


https://superuser.com/questions/390367/how-to-play-mp4-file-with-aac-5-1-through-s-pdif/
http://www.avsforum.com/t/1394553/how-to-play-mp4-file-with-aac-5-1-through-s-pdif
http://forum.doom9.org/showthread.php?t=160955
http://forums.gentoo.org/viewtopic-t-816278-start-0.html
http://ubuntuforums.org/showthread.php?t=934833


I've confirmed there's nothing wrong with my AAC file. Playback on a Windows machine works and if I use ffmpeg to convert the audio from AAC to AC3, my Mac plays the audio correctly.

I did find this tutorial on macworld:
http://hints.macworld.com/article.php?story=20090215033647292 

But it's from 2009 and rather involved (I haven't actually tried it yet), using multiple pieces of software to get ac3 encoding on the fly. Given that it's over 4 years later, I was hoping a better solution has come about.
Apparently Plex can do this according to this forum post 


  "Posted 06 March 2013 - 02:28 PM
  I recently discovered that Plex now are able to do transcode AAC to AC3 on the fly - "under preferences for system" audio, select audio output to "digital" and of course highlight AC3 and DTS capable receiver. If you select HDMI if doesn't transcode AAC to AC3. "


I don't have the hardware to test it out though