c# command line controls

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
innerspace
Blank Cone
Blank Cone
Posts: 28
Joined: 10 Aug 2008 22:47
VLC version: 0.8.6
Operating System: Windows / OsX
Location: Thailand & England

c# command line controls

Postby innerspace » 28 Nov 2008 17:57

I have been trying to get command line controls forking in the VLanControl .Net wrapper for a long time now.
If there is documentation on it its hard to find, every post just seems to link to "VLC command line interface" without any clear guidelines on how to implement it in c#. The search being broken on multi word queries doesnt help!

Anyway I'm sure that this is straight forward but nothing that I put into the options has any effect.
Im trying to control the logo overlay and audio output device through the options.
If I set the preferences in VLC itself I can achieve what I want, but I need to do it programatically.

Ive tried all sorts of things to get it working but heres a chunk of my code as it stands now.
My program uses libvlc 0.8.6(f - if i remember rightly)

Code: Select all

nexttoplay = libraryPath + nexttoplay; string[] options = new string[] { "vlc", "--no-loop", "--drop-late-frames", "--sub-filter=logo", "--directx-audio-device=" + audiodevice }; frmtv.videoPlayer.Stop(); frmtv.videoPlayer.ClearPlayList(); frmtv.videoPlayer.AddToPlayList(nexttoplay, "Firstplay", options); frmtv.videoPlayer.Play();
What am I missing or doing wrong here?
Thanks in advance to anyone kind enough to help out.

innerspace
Blank Cone
Blank Cone
Posts: 28
Joined: 10 Aug 2008 22:47
VLC version: 0.8.6
Operating System: Windows / OsX
Location: Thailand & England

Re: c# command line controls

Postby innerspace » 02 Dec 2008 15:04

anyone know?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: c# command line controls

Postby VLC_help » 03 Dec 2008 07:49

VLC command line commands should be identical to vlc.exe and to libvlc initialization.

innerspace
Blank Cone
Blank Cone
Posts: 28
Joined: 10 Aug 2008 22:47
VLC version: 0.8.6
Operating System: Windows / OsX
Location: Thailand & England

Re: c# command line controls

Postby innerspace » 03 Dec 2008 10:02

Is there a specific time or place that the options should be called?

Because calling them in the options string[] of addtoplaylist() does nothing.
Ive tried all 3 start characters (:,-,--) with no success.

I had 0.9.2 installed for testing purposes while my program is still running on 0.8.6 so I downgraded today.
Ive noticed that 0.8.6i needs to restart VLC to apply changes to audio settings, 0.9.2 only needs a stop and start.

Ive just thought of adding them to the parameters list when VLC is loaded, will try that and see if it helps.

Anyone else got any ideas or experience with option variables in .Net VLanContol?

innerspace
Blank Cone
Blank Cone
Posts: 28
Joined: 10 Aug 2008 22:47
VLC version: 0.8.6
Operating System: Windows / OsX
Location: Thailand & England

Re: c# command line controls

Postby innerspace » 03 Dec 2008 10:25

finally got my application to choose the output module but only halfway there.

VLC1.SetConfigVariable("directx-audio-device", audiodevice);

Using this line selects the output device but it does so for all vlc instances.
I have 2 VLC players in different instances of the same class and I need to seperate the audio to different channels.

ConfigVariable doesnt seem to change the preferences setting in VLC itself, so it is setting a local config, what I need is to have different settings for each player instance. Hence I was trying to set it in the playlist options but to no avail.

I could really do with getting this sorted soon so any suggestions will be much appreciated.

innerspace
Blank Cone
Blank Cone
Posts: 28
Joined: 10 Aug 2008 22:47
VLC version: 0.8.6
Operating System: Windows / OsX
Location: Thailand & England

Re: c# command line controls

Postby innerspace » 05 Dec 2008 10:20

Still having issues with setting the audio to a specific instance of VLanUserControl - really running out of ideas now.

Although I can now get audio devices selected (for all instances) through my code Im unable to implement it for the logo video filter

Code: Select all

VLC1.SetConfigVariable("sub-filter", librarypath + "Logos\\btv.png"); VLC1.SetConfigVariable("logo-file", librarypath + "Logos\\btv.png"); VLC1.SetConfigVariable("logo-x", "0"); VLC1.SetConfigVariable("logo-y", "0"); VLC1.SetConfigVariable("logo-transparency", "255"); VLC1.SetConfigVariable("logo-position", "6"); VLC1.SetConfigVariable("logo-file", librarypath + "Logos\\btv.png");
Nothing in the above seems to work, or adding them to the options[] array for AddToPlaylist()

It works fine setting it in VLC preferences but not in code. Whats wrong?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: c# command line controls

Postby VLC_help » 05 Dec 2008 19:07

Enable logger, it should tell you more about what are wrong with your options.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 33 guests