Control VLC via N4M script

Rob Ramirez's icon

Another fun little node tool for y'all, this time the almighty VLC media player is the object of our obsession. We leverage the apps built-in web server, and of course an npm library (vlc-client ) wrapped up in a simple n4m script and testing patch.

Lots of functionality already exposed in script and patch, but of course more could easily be added, so check out the vlc-client documentation to see if there's anything missing you need, and feel free to issue a pull-request if you make something useful.

happy patching!

generalh's icon

Hello Rob,
Thank you for that bridge. (I hear James Brown asking for a bridge to the funky drummer)

As i'm curious guy, i ran several vlc instance on OSX using the script available at vlc.org and i was wordering if there could be a solution to talk to these different instances of vlc. For now i only achieved to talk to the first one opened.

But again this is really cool!

Merci
Hubert

pdelges's icon

Using different IP ports for the VLC instances could be a solution. You can launch vlc with the --http-port option.
On Max' side, you can create different VLC.Client with the right ports.

Rob Ramirez's icon

yup that would be my suggestion as well. you could modify the node-script "connect" handler to take a port argument, something like this:

connect: (portarg) => {
    vlc = new VLC.Client({
        ip: "localhost",        
        port: portarg,
        password: "vlc"
    });