Last couple of weeks I’ve been busy on controlling VLC through a socket. After some time I finally figured out how to connect to VLC this way.
VideoLan is a program to mainly play video. Using it’s build in library of codecs it’s a very handy program. Especially in Linux where dependencies can be a real pain. VLC can be installed using repository of Debian, Ubuntu or the .dmg for Mac. Or the creator’s website: www.videolan.org .
Step1 creating daemon
To connect to VLC over a socket, VLC has to run in a daemon. To get this done use the following command: “vlc -d –syslog -I dummy –extraintf rc –rc-host localhost:3000 –rc-fake-tty”.
Step2 connecting
We’re able to connect to VLC using telnet: “telnet localhost 3000”.
Step3 commands
To control VLC playback use the following commands:
‘Add’ – add a file to the play list, and starts auto playing when there is only one file in the list
‘Clear’ – clears the play list
Use command ‘help’ to list all functionalities.
