Template status

Hey Guys,

Cant find an answer for this.. not sure there is a way to do it.

Is there a way to monitor a template node that is displaying a MJPEG feed to make sure its active?

The MJPEG feed is a .cgi from a VLC transcode

What does active mean ? Its sitting there waiting for data OK ? Or data is arriving ? Or ...
You can put whatever code you like in your template and use it to either create an output or node status

Hi!
I have a MJPEG stream running in a template which is being transcoded from command line VLC which creates a .cgi stream on port 8888

I would like to monitor when that isnt displaying and refresh it... I cant think of a way to do it hence why i thought id throw it out there :slight_smile:

so presumably there is code in there to grab the data when it arrives ? use that to also start/reset a separate timer loop - if it times out (nothing arrives) then change the node.status

So would a status node work for this?

err sorry thinking about it this is a ui node so no... - but it can just send regular output. (as if it was a button etc)

Not sure what you mean.. could you elaborate a bit :smiley:

You can use a http request node, enter the vlc url, if it returns 200 you know it is alive.

I monitor the process with a script that returns if its running so its sorta the same!

I was hoping it could be monitored from each dashboard client

#!/bin/bash
ps ax |grep vlc |wc --lines