MPlayer 5.1 AC3 DTS in Ubuntu 10.04

I wanted to play some mkv/avi files containing 5.1 AC3/DTS sound with mplayer through an SPDIF optical out on my Ubuntu box.

With default settings, at first I was getting:

Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF)
[format] Sample format big-endian AC3 not yet supported
Error at audio filter chain pre-init!

I have the default configuration, so PulseAudio is running. I have just chosen “Alsa” as default audio device in smplayer (yes SMPlayer, a GREAT GUI for mplayer, Qt rocks get over it 😉 ).

I have tried deactivating pulseaudio temporarily to call on the alsa device directly with:

pasuspender — smplayer test.avi

but it still did not work. This suspends PulseAudio, frees all audio hardware and launches the provided command…. could come in handy another day 🙂

After some googling and testing, I finally figured out you need the following things for it to work:

  • Select the correct Hardware Alsa device ! (for me it was 0.1 for the SPDIF output). If you use mplayer CLI, that is: -ao alsa:device=hw=0.1
  • Disable “Enable the audio equalizer”. Activating this always gives the error.
  • Enable “AC3/DTS pass-through S/PDIF”. This one is obvious…
  • Disable “Use software volume control”. Activating this always gives the error.

You should get something like this:


Now you can play your favorite DVD/BR/files with full SPDIF AC3/DTS surround power, that will get decoded on your kick-ass Surround amplifier at the other end of your SPDIF cable 🙂 All this on your favorite OS. Yeah!!!

Volume configuration

If you can’t hear anything, you need to mess with your PulseAudio settings first, and if not satisfactory then your Alsa settings.

For Pulse you need to select the “Digital Stereo Duplex (IEC958)” hardware profile.

For alsamixer, I have mostly:

  • “S/PDIF Default PCM” on Mute.
  • “Channel mode” at 6, although I am not sure it is needed.
  • “S/PDIF” on Unmute (lol)
  • Everything else on Mute, except for “PCM” and “Master” of course 🙂
This entry was posted in Linux and tagged , , , , , , , , , , , , . Bookmark the permalink.

2 Responses to MPlayer 5.1 AC3 DTS in Ubuntu 10.04

  1. Lee Burch says:

    Awesome, I have been trying off and on for months to get this working. Worked exactly like you said for me.

  2. JP says:

    Guess what, it’s December the 4th… 2013. I’ve never found a solution! A few options disabled and here we are : it works!

    Thanks a lot!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s