When using either the websocket based /stream API or MQTT mode doods2 is not able to recover from network or other issues with the stream that it is consuming. It seems like when these issues happen doods2 either crashes or gets stuck in an infinite loop in fresh_frame.py.
It seems like this can be fixed by changing the conditional in streamer.py to detect an issue with the FreshestFrame.read() (ie: it returning no data) and then just re-creating the VideoCapture and FreshestFrame in order to re-establish the stream. I would happy to submit a PR to implement this idea if it seems like a good idea.
When using either the websocket based
/stream
API or MQTT mode doods2 is not able to recover from network or other issues with the stream that it is consuming. It seems like when these issues happen doods2 either crashes or gets stuck in an infinite loop infresh_frame.py
.It seems like this can be fixed by changing the conditional in
streamer.py
to detect an issue with theFreshestFrame.read()
(ie: it returning no data) and then just re-creating theVideoCapture
andFreshestFrame
in order to re-establish the stream. I would happy to submit a PR to implement this idea if it seems like a good idea.