Basildane wrote:The stream dies. We restart the stream. I fail to see the problem with this strategy.
That way leads to "Zoneminder stopped working. I bought a new computer/reinstalled my entire operating system. Zoneminder now works."
What I was driving at is this -- it looks like the original intention was that a SHORT glitch, something temporary,should be handled by "ignore it, give a red frame, claim it worked and hope it comes back". Which seems perfectly rational. It is a recoverable error, recover from it.
What seems to be happening is an actual, proper fatal error is being treated as temporary, swept under the carpet by that highlighted code, hence your valid complaint of "it's gone red and got stuck". This is bad.
Your fix (which I agree works for very large values of "work") may well cause unintended, excessive, side effects. Because now any ACTUAL temporary glitches will also cause a teardown of the capture process, if I've understood you right... which has a bigger cost in terms of lost frames of video etc.
If it's working for you, great, but I do expect the problem (the real bug) to be somewhere else.
Edit: When it's working, if you do "ps uax | grep ffmpeg" -- do you see ffmpeg process(es) running on your machine? What about when it goes "red" (obviously, you'd need to answer that without your fix above, otherwise you will hide the problem). Is ffmpeg still running, or has it exited and died? Just a thought, maybe ZM hasn't noticed that ffmpeg has vanished, which wouldn't be in my top 10 list of "temporary errors" to try and hide.
Or, does ZM just use the ffmpeg libraries, not the ffmpeg binary, so you won't see it running anyway -- I've not tried using FFMPEG as a source in 1.25 ...