Thus, in order to set it up correctly, you'll need to fiddle both with the GUI and some old-school text file configuration.
First, install it as (for Ubuntu/Debian):
sudo apt-get install mplayer2 smplayer
Then check you have some output like this:
lavcac3enc : runtime encode to ac3 using libavcodec
mplayer -af help | grep lavcac3enc
Now, to have it encode a 5.1 AAC audio track to AC3 on the fly, you'll need to:
configure via GUI (SMPlayer):
- disable the audio equalizer under Preferences->General->Audio
- enable AC3/DTS pass-through S/PDIF under the same section
- add this parameter:
lavcac3enc=1:640
under Advanced->Options for MPlayer->Audio filters
configure via text file by editing ~/.mplayer/config:
ao=pulse
afm=hwac3,
channels=6
af=scaletempo,lavcac3enc=1:640:3
I'm using pulse since alsa gives me nearly 2 seconds of audio delay, but if you wish you can use it by setting instead:
ao=alsa