Discussion:
[MPlayer-users] help with channel manipulation
Jaume Ferrete
2015-09-14 20:10:40 UTC
Permalink
Hello,

I would like to use mplayer to play mono audio files through selected audio
output channels.

I.e. on a stereo output device, play a .wav file ONLY through left channel,
while right channel remains silent; or the other way around.

Ultimately I would like to do this with a 4 channel device (i.e. focusrite
usb audio interface), selecting which particular channel to output every
time i play a file.

I've tried to understand channel manipulation from docs, and assumed that I
could do something like:

mplayer file.wav -af channels=1:1:0:1

...understanding it as 1 output channel, 1 movement, left channel to right
channel; and thus getting audio output only from right channel. I am
attempting to do this with a mono audio file.

the result goes like:

--
(...)
[channels] Invalid routing in pair nr. 0. [libaf] Reinitialization did not
work, audio filter 'channels' returned error code -2 Error at audio filter
chain pre-init! Exiting... (Fatal error)
--

Could somebody help me understand, please?

Thank you very much
Jaume Ferrete
2015-09-14 20:16:16 UTC
Permalink
After writing this email I came up with a solution that I do not truly
understand...

to play file only on left channel I can do:

mplayer file.wav -af channels=2:2:0:0:0:0

...and only on right channel:

mplayer testone.wav -af channels=2:2:0:1:0:1

It is as if the output canNOT be 1 channel? And why two movements
necessarily?

Thanks for helping me understand.
Post by Jaume Ferrete
Hello,
I would like to use mplayer to play mono audio files through selected
audio output channels.
I.e. on a stereo output device, play a .wav file ONLY through left
channel, while right channel remains silent; or the other way around.
Ultimately I would like to do this with a 4 channel device (i.e. focusrite
usb audio interface), selecting which particular channel to output every
time i play a file.
I've tried to understand channel manipulation from docs, and assumed that
mplayer file.wav -af channels=1:1:0:1
...understanding it as 1 output channel, 1 movement, left channel to right
channel; and thus getting audio output only from right channel. I am
attempting to do this with a mono audio file.
--
(...)
[channels] Invalid routing in pair nr. 0. [libaf] Reinitialization did not
work, audio filter 'channels' returned error code -2 Error at audio filter
chain pre-init! Exiting... (Fatal error)
--
Could somebody help me understand, please?
Thank you very much
Loading...