You are not logged in.

#1 2005-12-11 15:47:12

Neuro
Member
From: Poland
Registered: 2005-10-12
Posts: 352

Mplayer -channels switch auto?

Hi,

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?

Offline

#2 2005-12-13 12:50:20

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: Mplayer -channels switch auto?

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 smile

There might be something to try with Alsa but this just overcome my knowledge :oops:


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #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

Offline

#3 2005-12-14 17:52:54

Neuro
Member
From: Poland
Registered: 2005-10-12
Posts: 352

Re: Mplayer -channels switch auto?

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? wink

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.

Offline

Board footer

Powered by FluxBB