I'm trying to convert 5.1 AC3/DTS/FLAC movie soundtracks to stereo AAC (in order to play them on an Xbox 360). I'll be outputting to a receiver which does Dolby Prologic II decoding and is hooked up to a 5.1 setup so I'd like to create a DPLII downmix in the AAC file.
This is on Linux, and I'm thinking my best bet is mplayer to do the decoding / downmixing and then neroAacEnc to encode to AAC. mplayer doesn't seem to have any built in downmxing presets, but it does support a "pan" audio filter which lets you specify how each channel gets mixed. Am I right in thinking what I need to do to create a DPLII downmix is use the following mix of channels:
# Dolby Pro Logic II Left Right Center Rear Left Rear Right
# Left Total 1.000 0.000 0.707 -0.8165 -0.5774
# Right Total 0.000 1.000 0.707 0.5774 0.8165
I'm using the following channel mappings for various codecs - are these correct (I've just got them through some Googling
# AAC, DTS: FC , FL , FR , SL , SR , LFE
# AC3: FL, FC, FR, SL, SR, LFE
# FLAC: FL, FR, FC, LFE, SL, SR
I'm trying it using that, and I get audio which sounds garbled in high-volume bits (as if there was clipping). Does that mean I need to normalize the audio too before passing it to neroAacEnc?
My mplayer command is:
mplayer input.dts -vc null -vo null -ao pcm:fast:file=output.wav -af pan:2:0.707:0.707:1:0:0:1:-0.8165:0.5774:-0.5774:0.8165:0:0
And I'm then using neroAacEnc:
neroAacEnc -ignorelength -lc -q 0.5 -if input.wav -of output.m4a
Am I right in thinking that the AAC file output should sound fine when played on normal stereo speakers, as well as getting some surround effects in a surround setup through a DPLII-compatible receiver?