calebolson123 / BabySleepCoach

DIY Baby Sleep Tracking
https://calebolson.com
Other
207 stars 36 forks source link

Camera connection - use substream instead of mainstream #11

Closed calebolson123 closed 1 year ago

calebolson123 commented 1 year ago

This PR switches the sample connection string to use substream, instead of the mainstream. I recently discovered that this exists, and upon testing, increases stability of the live feed processing service significantly (haven't seen it go down yet).

There are some known issues regarding live-mode's stability, where after a period of time, the service will crash with errors similar to what's described here.

Using substream instead of mainstream reduces the bandwidth of the stream, increasing stability, while maintaining clear enough images for the core computer vision logic to recognize baby features over time.

An upcoming PR largely overhauling the design replaces this line, and a note about the difference between mainstream and substream ideally would be preserved in (or after) that PR so that users know about the now preferred substream channel.