VLC remote control via TCP

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Challex
New Cone
New Cone
Posts: 3
Joined: 17 Mar 2013 19:54

VLC remote control via TCP

Postby Challex » 17 Mar 2013 20:11

Hi,
i'm trying to remote control my vlc player over a tcp socket.
I enabled the Remote-Control-Interface (oldrc) and set the binding to localhost:2000 (with disabled console).
http://imgur.com/1grGMwr,xGOLa3x#0
http://imgur.com/1grGMwr,xGOLa3x#1

Now i wrote a small java application which establishs a connection to the bound port and sends a simple "pause\r\n" to vlc.

Code: Select all

s = new Socket("127.0.0.1",2000); oos = new ObjectOutputStream(s.getOutputStream()); oos.writeObject("pause\r\n"); oos.flush();


The application itself is a little bit bigger, because i build a GUI around.

Here is the Problem:
The establishment of the connections works fine, but the player itself does nothing. It's completely ignoring the command.
Nowhere i get any kind of errors or exceptions.
I also tried other commands, but there was no response too.

I use VLC 2.0.4 and a song played while testing the pause command.

Hope you can help me.

huck
New Cone
New Cone
Posts: 9
Joined: 14 Mar 2013 17:00

Re: VLC remote control via TCP

Postby huck » 20 Mar 2013 02:47

Have you looked at what vlc is sending you over the socket? I havent looked much at oldrc, but the new interfaces request a password before doing anything

Challex
New Cone
New Cone
Posts: 3
Joined: 17 Mar 2013 19:54

Re: VLC remote control via TCP

Postby Challex » 20 Mar 2013 14:56

When i opened the InputStream the thread blocks =/

Code: Select all

inputStream = new ObjectInputStream(socket.getInputStream());

huck
New Cone
New Cone
Posts: 9
Joined: 14 Mar 2013 17:00

Re: VLC remote control via TCP

Postby huck » 20 Mar 2013 15:04

can you do non blocking IO? i think the prompt is "Password:" with no CR if its like the newest version.

Challex
New Cone
New Cone
Posts: 3
Joined: 17 Mar 2013 19:54

Re: VLC remote control via TCP

Postby Challex » 20 Mar 2013 17:36

aahhh i got it :D

my problem was the ObjectOutputStream (also the ObjectInputStream). I changed it to BufferedWriter/Reader and now it works.
But thanks for your efforts.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 107 guests