I had issues with this; screen is going red at random times. It also goes red if i restart my camera.
And it stays red. Forever (even though i didn't verify that )
At first i changed the code to just exit the capture daemon if certain errors occured; however that had side-effects. One thing i noticed was that; if i'm watching the monitor and restart the camera; the image freezes (or goes blank, cant remember). When the capture daemon has restarted, the monitor doesnt come live again. So that kinda sucked even though the recording still worked again.
I've improved my patch now, and instead of exiting the capture daemon it silently re-opens the stream instead. By silently i mean that it logs some errors, and then closes and reopens the stream. The good part is that the capture daemon never restart.
While this is going on the red-screen is generated as it should.
What the patch does is:
- Timeout when opening stream after 10 seconds
Sometimes when restarting the camera ffmpeg hung itself in some state, when calling avformat_open_input, which seemed to last forever. - Reopen stream if av_read_frame returns EOF
Sometimes ffmpeg starts returning an EOF error when calling av_read_frame. Once this happens it seems no more images will ever be captured. - Reopen stream if av_read_frame returns -110
Means something like Connection failed; cant remember. Anyway. Once this happens it seems no more images will ever be captured.
Please try out the patch if you have stability issues when using ffmpeg sources.
I've applied the patch to the 1.27.0 version.
However it seems the affected files has not changed since 1.26.5, so the patch *should work* on 1.26.5 too.
Apply the patch by going to the ZoneMinder source directory and do:
Code: Select all
patch -p1 < ./ffmpeg_eof_fix.patch