can't change to mono-channel by command line

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
jacky912
Blank Cone
Blank Cone
Posts: 11
Joined: 10 Jul 2009 02:48

can't change to mono-channel by command line

Postby jacky912 » 10 Jul 2009 03:03

Dear all,
I am using VB.net and having problem when I try to set the audio to left or right before play.

Here is the simple code that I was using.

Code: Select all

Dim lStrOption As String lStrOption = "--sout-mono-channel={0}" VLCPlayer.playlist.items.Clear VLCPlayer.playlist.Add lCurrentSongLocation, , lStrOption
I also try change the channel after the playlist.play. But it doesn't work as work (error occurred)

Code: Select all

VLCPlayer.playlist.Add lCurrentSongLocation VLCPlayer.playlist.Play VLCPlayer.audio.channel = 3

jacky912
Blank Cone
Blank Cone
Posts: 11
Joined: 10 Jul 2009 02:48

Re: can't change to mono-channel by command line

Postby jacky912 » 14 Jul 2009 19:16

Is my question not clear enough?
Or it is hard to understand?

Please let me know. I can adjust.
Look forward to hearing from anyone who can help.

jacky912
Blank Cone
Blank Cone
Posts: 11
Joined: 10 Jul 2009 02:48

Re: can't change to mono-channel by command line

Postby jacky912 » 07 Jan 2010 16:17

After few months, I still couldn't get it works.

Code: Select all

Dim lOption() As String = {":no-video-title-show", ":sout-mono-channel=0"} vlc.playlist.add("C:\abc.mpg", " ", lOption)
I just want to switch a Karaoke VCD file from both channel to left channel before the video started.
Please kindly teach me what is wrong.
Thanks :)

cerebellum
Blank Cone
Blank Cone
Posts: 13
Joined: 08 Jan 2010 08:10

Re: can't change to mono-channel by command line

Postby cerebellum » 08 Jan 2010 08:40

I am having the same problem here.
I searched the forum and found viewtopic.php?f=16&t=27710&start=0, but can't seem to work either.

I even want to have the ability to switch the channel during the video play.
Please advice. Thnx.

jacky912
Blank Cone
Blank Cone
Posts: 11
Joined: 10 Jul 2009 02:48

Re: can't change to mono-channel by command line

Postby jacky912 » 10 Jan 2010 03:39

I am having the same problem here.
I searched the forum and found viewtopic.php?f=16&t=27710&start=0, but can't seem to work either.

I even want to have the ability to switch the channel during the video play.
Please advice. Thnx.
If the video file was played.
You can use the following code to switch through the left or right.

Code: Select all

If .audio.channel = 3 Then .audio.channel = 4 Else .audio.channel = 3 End If

cerebellum
Blank Cone
Blank Cone
Posts: 13
Joined: 08 Jan 2010 08:10

Re: can't change to mono-channel by command line

Postby cerebellum » 11 Jan 2010 04:42

I don't think it works that way.
I don't see .audio in the control object.

I'm using .NET

jacky912
Blank Cone
Blank Cone
Posts: 11
Joined: 10 Jul 2009 02:48

Re: can't change to mono-channel by command line

Postby jacky912 » 11 Jan 2010 07:47

I don't think it works that way.
I don't see .audio in the control object.

I'm using .NET
Ok, here is the step, hope it works for you:
1. Make sure the ActiveX control is existed on the Form (In my project, I named the VLC control to VLCPlayer)
2. the ".audio" is assumed, you have "With VLCPlayer" & "End With"

cerebellum
Blank Cone
Blank Cone
Posts: 13
Joined: 08 Jan 2010 08:10

Re: can't change to mono-channel by command line

Postby cerebellum » 11 Jan 2010 08:58

Exception occurs when executing vlc.audio.channel = 3

COMException was unhandled
Error HRESULT E_FAIL has been returned from a call to a COM component.

cerebellum
Blank Cone
Blank Cone
Posts: 13
Joined: 08 Jan 2010 08:10

Re: can't change to mono-channel by command line

Postby cerebellum » 11 Jan 2010 09:02

Hey.. it works..

Code: Select all

Dim lOption() As String = {":sout-mono-channel=0"} vlc.playlist.add(url,"A", lOption) vlc.playlist.play() vlc.audio.channel = 3
does prompt for exception when executing vlc.audio.channel = 3

but if i put the code:

Code: Select all

Private Sub ChangeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangeToolStripMenuItem.Click If vlc.audio.channel = 3 Then vlc.audio.channel = 4 Else vlc.audio.channel = 3 End If End Sub
it works...
what if i want to set the channel default to 3 when the video starts?

jacky912
Blank Cone
Blank Cone
Posts: 11
Joined: 10 Jul 2009 02:48

Re: can't change to mono-channel by command line

Postby jacky912 » 27 Jan 2010 04:26


it works...
what if i want to set the channel default to 3 when the video starts?
That's what I want to know as well...

cerebellum
Blank Cone
Blank Cone
Posts: 13
Joined: 08 Jan 2010 08:10

Re: can't change to mono-channel by command line

Postby cerebellum » 20 Feb 2010 06:01

Okay.. it works if only i put a timer with interval greater than 100 ms
viewtopic.php?f=16&t=70637


Return to “Web and scripting”

Who is online

Users browsing this forum: Google [Bot] and 4 guests