snowzach / doods2

API for detecting objects in images and video streams using Tensorflow
MIT License
221 stars 28 forks source link

Improve reliability of streaming #75

Closed fusetak closed 1 year ago

fusetak commented 1 year ago

In order to allow doods2 to recover from errors in the stream when using the websocket based stream API or MQTT mode, detect when the VideoCapture is not returning data and then re-create it in order to try to fix the stream. Since we are waiting infinitely for the VideoCapture to return data, the fact that it returned no data means it has likely encountered some sort of unrecoverable error that can only be fixed by re-creating it.

This should fix https://github.com/snowzach/doods2/issues/74

Testing