VLC nodes. Searching I get one thing and in the library I can't find any nodes

Latest project: VLC on a remote RPI playing Music via VLC.
Well, I picked VLC as it is a pretty good generic player.

Searching g**gle there are many lists and I can even to go the sites which list/describe the nodes.

But when I look in the library and type vlc I get nothing.

I'm not missing any elephants am I?

Are the nodes you found node red nodes or just npm nodes? Only node red nodes are referenced in the flows database. If they are node red nodes then please share some links to them.

Alas I think they are NPM nodes.

But as some time in the past I am sure I saw a VLC node for Node-Red.

I was going to design a remote control but never got around to it because of a machine being difficult. Now I have the machine back online: the node isn't there any more.

VLC supports remote control via sockets but I am not good enough to understand what the syntax is to make my own flow the hard(er) way by messages sending discreet messages rather than the luxury of using a node.

This is a link - which yeah: says NPM - but also says/mentions Node-Red.

VLC

My flow is nowhere ready to be shared but I’ve succeeded to do this by running an MQTT wrapper daemon on the pi that listens to specific music related commands. I use Music for Console (sudo apt-get install moc, then start it as mocp) as audio player, as it allows to be fully controlled through commands, and the interface is just an ncurses thing connecting to the internal server doing exactly that.
From Node-RED I send commands over MQTT that are subscribed by the daemon on the remote pi. Those commands are then interpreted and used to call a subprocess task to execute those commands. Works perfect, but creating an interface I’m happy with is taking time. So now I press the correct inject button for half of the commands, and still do the “ssh -> type mocp command manually” route most of the time as I’ve yet to connect those in the wrapper.

As does VLC.
The commands you can use are a plenty.
Even from the CLI.
So SSH isn't out of the picture.

But as it has built in sockets, it would make sense to use them.
Just that's above my skill set just now.

The library you linked is indeed a node-red library, but because it is missing the “node-red” keyword it is not shown in the flows library. That is likely deliberate, as the official advise is to only add that keyword when it is ready for general usage.
As you can see it says “early stages”, as well as version 0.0.3 and last updated 4 years ago. Sounds to me that the development was stopped before a stable version could be released.

I looked at the README, and this node instead interacts with the web interface, rather than the internal sockets: https://wiki.videolan.org/Control_VLC_via_a_browser/
Meaning that if you’d like to go the same way you can do it in a set of (sub) flows with http-request calls to that page.
Plus the set of commands here: https://wiki.videolan.org/VLC_HTTP_requests/

2 Likes

@Trying_to_learn What do you want to do with VLC?

Play MP3 files.

Adjust playback. (Pause/Play/Next) etc.
including volume.

See what is playing.

I see, so you can control what is playing on the server via a browser. Good plan.


Far from optimised yet, but this is how I do the Node-RED side of the MQTT wrapped handlers. At the moment these are still inject buttons as I'm still working on the file-indexing aspect of the remote pi. When I'm happy with that part I can design the rest of the interface, and move those inject buttons out/away.

VLC's MQTT module is still in development, but you might something else/similar elsewhere: https://wiki.videolan.org/Documentation:Modules/mqtt/

If you just want to play MP3 files from some sort of collection, why not have a look at Music Player Daemon (MPD)? I've been using it for many years now.

It's available as a package on all major Linux distributions, has a plethora of clients (web-based, GUI, ncurses, console), supports many audio formats and many different forms of output targets (ALSA, streaming, ...).

And there's even a ready-to-use node for Node-RED: https://flows.nodered.org/node/node-red-contrib-mpd

2 Likes

Thanks.

I'll look into it.

Just that I use VLC as the generic player before NR. So if I could get NR to talk to VLC, it would help keep things simpler in that there would only be one player.

But it is up for consideration.

For using VLC as a desktop application with graphical UI, I agree. But running it as a music player to be controlled remotely... I don't believe that it is the right tool in this case, especially when running it headless, without GUI.

There are alternatives that are specifically designed for that use-case, MPD being one of them. :sweat_smile:

I know this is a bit old.

I got VLC working - eventually.

Now working on building a GUI for it for the sake of the exercise.

If you don't mind, could you tell me how you got it to work.

I haven't got it working.