Well uhm... I've been fighting with this for a long time, searched the net multiple times and haven't found a solution to this yet.
I use mplayer for my video playback and I have Audigy 1 with a 5.1 speaker arrangement.
For some video files containing only 2 channels, when I specify -channels 2 on the command line (or don't specify anything at all) both supplied channels are routed to all speakers by ALSA (left > left+rear_left, right>right+rear_right, left+right>center, LFE gets the bass).
But when I play an AC3 5.1 file, I need to explicitly supply the -channels 6 argument. That way, mplayer plays the supplied 6 channels directly to ALSA (wuithout rerouting) and everything is fine. But when I don't supply the -channels 6 argument to mplayer, the AC3 channels are downrouted to only 2 channels and then are rerouted by ALSA like the an usual 2 channel file above (thus loosing all the nice surround effect of the file).
However, if I try to play a 2 channel file using the -channel 6 argument, only the right and left speakers play, ALSA doesn't do any rerouting (which I'd like to have).
What I'd like to have, is a situation when mplayer knows wether to put ALSA into 6 channel mode (and not allow it to do any rerouting) or the 2 channel mode (with rerouting). Something like an -channels auto parameter, but I haven't found any.
Is there a way to do it?
I guess so
Add an alias in your ~/.bashrc file like that one (adapt it to your needs) :
alias mplayer6='mplayer -channels 6'
That way when you run 'mplayer6' you'll launch mplayer with 6 channels
There might be something to try with Alsa but this just overcome my knowledge :oops:
Seeded week #28: Arch 25 gig (stock 12, Talking 1, Anywhere 11, Apricity 1)
Desktop @3.30GHz 8 gig RAM, Arch linux-ck
laptop1 Atom 2 gig RAM, Arch linux stock i686 (5+H battery ) & 2: ARM Tegra K1 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
True, but that doesn't solve my problems.
What I want to avoid is looking at the output log to see if the file has got 2 or 6 channels. If I already do that, typing "mplayer6" instead of "mplayer -channels 6" is hardly an improvement, isn't it?
I'd like to know if there is a way of making mplayer autodetect the number of channels in the file and adjust the -channels attribute accordingly.