Hi,
(prompted by reading -- and nearly understanding some of -- design/schema.md).
Some of this will appear like a "can't you just" wishlist, but the documentation suggests mailing list discussion prior to actually starting anything. This is therefore more a "have I got this right" thinking out loud discussion.
Tagging Recordings:
It seems as though a design goal is to have the ability to say "Camera Foo experienced $event at $time". Given a common use might be security/CCTV, it seems as though it would be sensible to tag timelines at ~1 second granularity, and it should be possible to add events on a non-live externally-processed source. I'm vaguely aware that my Reolink cameras have (probably terrible) motion detection that could be polled with their "getMdState" json call[1], and it's therefore possible to poll each camera to add "motion" events to each camera in real-time ~1 second intervals. After recording, on a near-live basis, perhaps those motion events could be re-examined (like
https://community.ui.com/stories/UnifiVideo-A-I-People-Detector-on-dollar99-Nvidia-Jetson-HW-/c288638b-eaf3-4bac-8465-9108cc0abc95 or motion-project) to add tags like "pedestrian" or similar - it's likely not worth running the "no motion" times through this level of processing.
This would allow the UI to display timelines that show a given camera saw e.g. motion/a pedestrian/a bird at a given time, and probably allow the garbage collection to prune the "boring" events first.
Linking Cameras' streams:
I think this is covered by schema.sql's "stream" and "camera" tables, which suggest that the main/sub streams from one camera are indeed linked, but I think it makes sense to do the (computationally expensive) tagging work referenced above on the sub stream, but apply the results of that tagging to both streams produced by that camera. Therefore, this implies (to me) that it's right to tag events like the above at the camera level, not at the stream level.
I'm mainly spewing noise to make sure I've understood the goals. I'm not a great coder by any measure (nor have I ever touched Rust!), but having looked at a few recording options I like the design goals of moonfire more than the alternatives, and it seems close to being all I would need. Ideally for home-security purposes I would see a list of the few events worthy of attention and briefly flick through them.
1: It's horrific, but even a frequent HTTP request to each camera would work for this. The notification options from these Reolinks aren't great. I guess it also makes sense to allow for events from e.g. Home Automation services too.
cheers