Page 1 of 1
can't change to mono-channel by command line
Posted: 10 Jul 2009 03:03
by jacky912
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
Re: can't change to mono-channel by command line
Posted: 14 Jul 2009 19:16
by jacky912
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.
Re: can't change to mono-channel by command line
Posted: 07 Jan 2010 16:17
by jacky912
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
Re: can't change to mono-channel by command line
Posted: 08 Jan 2010 08:40
by cerebellum
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.
Re: can't change to mono-channel by command line
Posted: 10 Jan 2010 03:39
by jacky912
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
Re: can't change to mono-channel by command line
Posted: 11 Jan 2010 04:42
by cerebellum
I don't think it works that way.
I don't see .audio in the control object.
I'm using .NET
Re: can't change to mono-channel by command line
Posted: 11 Jan 2010 07:47
by jacky912
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"
Re: can't change to mono-channel by command line
Posted: 11 Jan 2010 08:58
by cerebellum
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.
Re: can't change to mono-channel by command line
Posted: 11 Jan 2010 09:02
by cerebellum
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?
Re: can't change to mono-channel by command line
Posted: 27 Jan 2010 04:26
by jacky912
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...
Re: can't change to mono-channel by command line
Posted: 20 Feb 2010 06:01
by cerebellum
Okay.. it works if only i put a timer with interval greater than 100 ms
viewtopic.php?f=16&t=70637