play audio to only one speaker left/right from commandline

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
jacobs1
Blank Cone
Blank Cone
Posts: 33
Joined: 03 Oct 2011 16:11

play audio to only one speaker left/right from commandline

Postby jacobs1 » 13 Feb 2012 17:10

Is it possible to make vlc play audio to only one of the speakers left/right from commandline ?

xomby
New Cone
New Cone
Posts: 4
Joined: 17 Feb 2012 03:25

Re: play audio to only one speaker left/right from commandli

Postby xomby » 17 Feb 2012 04:18

MAYBE...

From http://www.videolan.org/doc/play-howto/en/ch04.html

--audio-channel <integer> specifies the default audio channel to use with dvds.
vlc.audio.channel : an integer between 1 and 5 that indicates which audio channel mode is used, values can be: "1=stereo", "2=reverse stereo", "3=left", "4=right", "5=dolby". Use vlc.audio.channel to check if setting of the new audio channel has succeeded. (supported in vlc version > 0.8.6)
or
--mono forces VLC to treat the stream in mono audio. (might help, doubt it)

but really probably not.
If you're on linux/windows you might be able to use a BAT file to mute left/right audio output for the whole computer...
http://forums.techguy.org/windows-xp/66 ... batch.html
This is a good place to start, it primarily deals with muting, but if you can mute, you can probably adjust left/right balance too.
"Yeah like the 'VLC staff' will surely be more motivated to work after freeloading users flame them." -Rémi Denis-Courmont

carelljones
New Cone
New Cone
Posts: 2
Joined: 17 Feb 2012 08:30

Re: play audio to only one speaker left/right from commandli

Postby carelljones » 17 Feb 2012 08:55

Audio options
--noaudio disables audio output. Note that if you are streaming (ex: to a file) this has no effect (streaming copies the audio verbatim). Use --sout-xxx instead (ex: --no-sout-audio)
--mono forces VLC to treat the stream in mono audio.
--volume <integer> sets the level of audio output (between 0 and 1024). Also only applies to local playback (like --noaudio).
--aout-rate <integer> sets the audio output frequency (Hz). By default, VLC will try to autodetect this.
--desync <integer> compensates desynchronization of audio (ms). (If audio and video streams are not synchronized, use this setting to delay the audio stream)
--audio-filter <string> adds audio filters to the processing chain. Available filters are visual (visualizer with spectrum analyzer and oscilloscope), headphone (virtual headphone patialization) and normalizer (volume normalizer)

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: play audio to only one speaker left/right from commandli

Postby Rémi Denis-Courmont » 17 Feb 2012 09:17

It should be possible with the new audio remap filter in VLC 2.0. Refer to CLI help for documentation.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

jacobs1
Blank Cone
Blank Cone
Posts: 33
Joined: 03 Oct 2011 16:11

Re: play audio to only one speaker left/right from commandli

Postby jacobs1 » 17 Feb 2012 10:21

Thank you for trying to help,
muting left/right audio for the whole computer wont help because I need to be able to run 2 processes that uses libvlc and one process will play to the right speaker and the other to the left speaker at the same time.

--audio-channel doesn't help, I am playing a udp stream input.

I also tried audio remap filter in VLC 2.0, it looked promising but didn't do the trick also, maybe I am using it wrong. how is it used properly as a vlc command ?

vlc.audio.channel looks like what I need but it doesn't work ( I tried version 1.1.10 and 2.0 ), when running the function libvlc_audio_set_channel I get result 0 and nothing changes ( I also tried libvlc_audio_get_channel and it returns -1 )

Audio Balancing seemed like a trivial feature to me I am surprised it proves to be very difficult .
Please help me out here.

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: play audio to only one speaker left/right from commandli

Postby Rémi Denis-Courmont » 17 Feb 2012 14:38

In general, you can't do that. The audio hardware does not expose two independent channels, but two synchronized channels.
Besides, there would be no sane way to synchronize the channels if they were written by separate applications.


Your architecture that is broken here, not LibVLC.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

jacobs1
Blank Cone
Blank Cone
Posts: 33
Joined: 03 Oct 2011 16:11

Re: play audio to only one speaker left/right from commandli

Postby jacobs1 » 17 Feb 2012 15:01

"there would be no sane way to synchronize the channels if they were written by separate applications"
I don't need them synchronized, I am talking about 2 processes playing 2 different video ( sometimes at the same time, not always )
the scenario is a machine connected to 2 speakers each one in a different room, and the app should be able to selectively play to any one of the channels.
"The audio hardware does not expose two independent channels"
all I need a an option that I can play audio that has 2 channels but one is silent, just like stereo only here one side (L/R) is silent.

Isn't this what libvlc_audio_set_channel supposed to do ?

Thanks again for your help.

jessestmichael
New Cone
New Cone
Posts: 2
Joined: 04 Mar 2012 23:57

Re: play audio to only one speaker left/right from commandli

Postby jessestmichael » 05 Mar 2012 00:01

Ok... if you play the song "New orleans is sinking" by the tragically hip, for example, the rhythm guitar is on the left side and the lead guitar is on the right side. If i want to learn each part separately i want to adjust it so i only hear a particular side. If you play it in (sorry to swear here) Winamp it will allow u to go left or right. I want VLC to do this as well.

Any help would be great...

Lotesdelere
Cone Master
Cone Master
Posts: 9974
Joined: 08 Sep 2006 04:39
Location: Europe

Re: play audio to only one speaker left/right from commandli

Postby Lotesdelere » 05 Mar 2012 08:25

the rhythm guitar is on the left side and the lead guitar is on the right side. If i want to learn each part separately i want to adjust it so i only hear a particular side. If you play it in (sorry to swear here) Winamp it will allow u to go left or right.
Menu Audio -> Audio channels

jessestmichael
New Cone
New Cone
Posts: 2
Joined: 04 Mar 2012 23:57

Re: play audio to only one speaker left/right from commandli

Postby jessestmichael » 07 Mar 2012 02:42

Lotesdelere

Holy Poop!!! I have been looking everywhere in the advanced controls... I feel so dumb.. and i am not really a total noob.... Thanks a million man.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 9 guests