6

I am interested in using a UNIX-Domain Socket to control VLC playback. This functionality is outlined in the VideoLan documentation for using oldrc.

So what I need to is startup vlc with a command such as:

cvlc <path to media> -I oldrc --rc-unix /some/socket

And then I should be able to send vlc commands to /some/socket to control the playback.

Are there any general-purpose sockets floating around somewhere on my Kubuntu 12.10 system that I could use for this?

1
  • Clarifying this question since the "I should be able to send vlc commands to /some/socket" was vague: The magic combo for me was to execute "vlc /path/to/yourfile.mp4 -I oldrc --rc-unix /home/pi/vlcsocket" and then send commands to it with "echo "pause" | nc -U -q 1 /home/pi/vlcsocket". "-I rc" does not work, apparently. The socket is never created. Hence. "-I oldrc".
    – fivedogit
    Feb 9, 2021 at 15:57

1 Answer 1

4

No, there are no spare sockets just floating around, But they are easy to make, so easy that you may have done so if the directory you were creating them in existed and you had write permission. To make your example work you probably need mkdir /some; chown vlc_user.rmt_grp /some; chmod 0775 /some. and it is easier if the remote control and the player run as the same user.

3
  • 3
    Yes! You are right, vlc creates a socket if it doesn't exist. The trouble was that the module rc has been renamed to oldrc! That help page is out of date. Also, is it appropriate to use netcat to send messages to the socket after it's opened by vlc?
    – Lombard
    Jan 19, 2014 at 13:37
  • 4
    Wow. I just spent over half an hour trying to figure out why none of the examples I found worked. Then, finally, I found your comment. Then I launched VLC with vlc -I oldrc --rc-unix socket-name, and voila, it works. Using vlc -I rc --rc-unix socket-name doesn't give any errors, but VLC never opens the socket, so it doesn't work, for no apparent reason.
    – user41277
    Sep 14, 2015 at 11:15
  • holy sheet, just been struggling with this too for about 1 hour, official wiki is so out of date.... Sep 15, 2018 at 0:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .