Closed jseidl closed 2 years ago
Plate-Minder should already be doing this now. If FFMPEG exits with a non-zero exit code, the stream is restarted after a five second delay. Did you see any logging similar to: "source failed"? It may be that there's an issue with your stream, but FFMPEG never exited.
Hmmm weird. I'm using Plateminder-Web for debugging and I'm getting the stream occasionally crapping and not restarting by itself. I'd assume this is a scenario where ffmpeg exits with a non-zero EC and restarts but 🤷 still have to manually click on Start Source
to get it going again
Weird indeed. If you're not seeing "source failed" anywhere in your logs, it would seem that FFMPEG is exiting with a "0" exit code.
I can add an "alwaysRestart" config option that's off by default. Turning it on would have it restart regardless of exit code, which sounds like it would solve your problem. Downside would be that streams won't stay stopped when you manually stop them.
Thoughts?
I can add an "alwaysRestart" config option that's off by default. Turning it on would have it restart regardless of exit code, which sounds like it would solve your problem.
Yeap, sounds like it!
Downside would be that streams won't stay stopped when you manually stop them.
That's OK, could be solved by having a toggle on plateminder-web
next to the start/stop controls that would update the config and reload like the other config controls. Would that work? Not sure what other cases one would want to stop the source, maybe programmatically?
Added an 'alwaysRestart' option for sources. You'll need to re-pull sclaflin/plate-minder:latest and sclaflin/plate-minder-web:latest.
Let me know how it goes!
Pulled, will let it you know! Thanks!
Just to update, this seems to be working well so far! Thanks!
Hi, one feature that would be extremely helpful would be auto-restart for sources when they crash/fail.
My MJPEG source sometimes flick around and I have to manually restart the source. It would be awesome if it could be auto-restarted on failures. Maybe an option
auto_restart: True
paired withmax_retries: N
?Sample errors I get:
LMK if you need more info regarding this.