Page 1 of 1
Drive RC interface via code?
Posted: 18 Jul 2005 21:15
by Jinja
Hi,
I have a .NET application from which I would like to play and control video using VLC.
Could anyone give me a clue as to how I would best do this?
I would like to be able to launch the player from my app with the RC interface, and then send commands to this interface from the same code.
How best would I do this, or is there an easier way?
Many thanks,
David
Redirect standard in?
Posted: 19 Jul 2005 11:24
by Jinja
Hi,
Let me redo my original post from a different angle:
On XP Home:
Can I run "vlc.exe --intf rc" in a dos box, and redirect the standardIn of this dos box from within my vb.net application?
If so, I could then use StreamWriter to write commands to vlc.....
Can this be done?
I'm trying it and it doesn't seem to work....
Related to this, from a DOS box, if I type "vlc.exe --help > out.text", I should be redirecting Standard Out to the text file, but this doesn't work either.
Could someone tell me why this is? Any help appreciated......
Posted: 19 Jul 2005 15:30
by zorglub
Hello,
I don't know much about this under windows, but your problem might be related to stuff about TTY emulation.
I would suggest using the ability of the RC interface to bind on a network socket and using network (over localhost) communication to communicate with RC.
Re: Redirect standard in?
Posted: 19 Aug 2005 23:50
by Guest
Hi,
Can I run "vlc.exe --intf rc" in a dos box, and redirect the standardIn of this dos box from within my vb.net application?
If so, I could then use StreamWriter to write commands to vlc.....
Can this be done?
I did something similar from Java on Solaris. In order to make it actually work as expected I had to use the (not very well documented) --rc-fake-tty option. It also doesn't hurt to make sure you are consuming the stdout and stderr from VLC or you could end up with a deadlocked process.
Related to this, from a DOS box, if I type "vlc.exe --help > out.text", I should be redirecting Standard Out to the text file, but this doesn't work either.
Could someone tell me why this is? Any help appreciated......
I noticed this on Windows, and frankly find it really annoying. I wanted to capture some text from the output of vlc -vvv and not only is file redirection bypassed, but the console window that opens doesn't cooperate with text selection.
you can use sockets
Posted: 20 Aug 2005 03:29
by jarekf
I once had similar questions, then I got several very good advices and I was able to make it to work with socket interface (instead of RC). See
viewtopic.php?t=6065
I wish it was possible to control more options remotely. It is good now but still some options (e.g. Extended Gui) are not available via remote socket control.
Jarek
Cool
Posted: 20 Aug 2005 12:18
by Jinja
Thanks Jarek, I didn't come across that thread, and didn't know about those switches either. Will play with it ASAP.