[MPlayer-DOCS] [PATCH] update -channels to match observed behavior

Corey Hickey bugfood-ml at fatooh.org
Fri Sep 2 05:12:02 CEST 2005


I'm working on an advanced audio guide for the docs and trying all sorts
of things I've never messed around with before.

The manpage says -channels uses -af channels to control the number of
output channels. I seem to remember that this was the case a long time
ago but I'm not seeing that happen now.

Here are some observations. Forgive me for snipping mplayer's output;
I'm trying to keep this readable.

1.
$ mplayer stereo.mp3 -channels 4
--------------------------------------------------------------------------
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
alsa-init: 1 soundcard found, using: default
alsa: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little
Endian
AO: [alsa] 44100Hz 2ch s16le (2 bps)
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
--------------------------------------------------------------------------
As you can see, the output is still 2 channels. MPlayer isn't inserting
any blank channels.

2.
$ mplayer stereo.mp3 -channels 1
--------------------------------------------------------------------------
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
alsa-init: 1 soundcard found, using: default
alsa: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little
Endian
AO: [alsa] 44100Hz 2ch s16le (2 bps)
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
--------------------------------------------------------------------------
MPlayer isn't removing any channels either. mp3lib is decoding 2
channels, mplayer is playing two channels, and the sound I hear is
distinctly stereo. If I use -af channels=1 the sound I hear is mono (and
mplayer's output shows 1ch -> 2ch).



I don't think this should be a bug -- I like the current behavior.
-channels is for requesting the number of channels from the audio
decoder and -af channels is for manipulating (and forcing) the number of
output channels. Thus, I submit a simple patch to match the behavior I see.

-Corey
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: man-channels.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-docs/attachments/20050901/ea895994/attachment.txt>


More information about the MPlayer-DOCS mailing list