Read the statement by Michael Teeuw here.
Short script to monitor and restart your MMM-RTSPStreams
-
Here is a super short Python script that checks the status of your streams using pm2, then if it detects a stream is down, it restarts the streams. Not elegant, but it works.
import os if "stopped" in os.popen("pm2 status | grep \"stopped\"").read(): os.popen("pm2 start 1 2 3 4")I saved it as streamMonitor.py in my home directory. I run it once per minute using crontab. This is the entry I put in:
* * * * * python3 ~/streamMonitor.pyHere is the script in action:

And here is the crontab job:
s -
neat. Sadly, OMX had so much trouble getting the streams running, I had to switch to FFMPeg.
If VLC would boot correctly under node (it won’t), I’d use that, but between syntax errors in the code and node.js not allowing VLC to run correctly, I can’t get it to work.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
