1

I want to create java program that can pause / play the vlc video being played.

I made a java program where a client connects to a server and can then send #p messages, which will move the cursor to where the user said the play/pause button was and click,

but I'm looking for a better way so it would work if the VLC window isn't up or so you can move the VLC window and not have to get new coordinates from the user.

How can I do this?

user1021085
  • 729
  • 3
  • 10
  • 28
  • [This](http://stackoverflow.com/questions/3768397/how-to-control-vlc-by-java) might help. Maybe see [VLCJ](http://code.google.com/p/vlcj/). – c24w Jan 25 '12 at 20:20
  • @c24w As I understood, that creates a new window that you load vlc into? I'd prefer something else. I don't want my own java window, but to be able to pause/play the existing one. – user1021085 Jan 25 '12 at 20:24
  • Sorry, my mistake! So you're really looking to connect to VLC with TCP sockets and/or send command line commands? – c24w Jan 25 '12 at 20:41
  • Yea, I want to send an argument, say pause or play, to the VLC instance and ... well.. pause / play it. – user1021085 Jan 25 '12 at 20:43
  • @c24w So, do you know how I could do it? – user1021085 Jan 25 '12 at 21:19
  • @user1021085 Hello, sorry I don't know specifically, but, from the reading around I did earlier, it looks like it will be possible. Try Googling on those terms, i.e. connecting to VLC with TCP sockets and/or VLC commandline documentation. – c24w Jan 25 '12 at 23:08

1 Answers1

2

I found the answer.

I went into Tools -> Preferences -> Select Show All -> Interface -> Main interface -> RC Typed in 127.0.0.1:a_port

then in java just open a stream with that ip and port and send your commands. For example "pause" will play (or pause it if it's already playing)

user1021085
  • 729
  • 3
  • 10
  • 28
  • You think is possible try without java application? I open the the socket 127.0.0.1:a_port. How can I connect to this and send the vlc command? – GVillani82 Dec 06 '12 at 18:37