DVR-Scan icon indicating copy to clipboard operation
DVR-Scan copied to clipboard

Use New Parameter For Event Merging: `--min-event-dist`

Open Breakthrough opened this issue 1 year ago • 1 comments

This PR changes how event merging works, fixing #72 and #192:

  • Event merging is no longer controlled by the time-before-event (-tb) and time-post-event (-tp) options
    • These continue to influence how the output video clips are handled
  • A new parameter is added called minimum event distance (option: --min-event-dist), which controls how long after a motion event starts we continue appending frames with motion.
  • The output event list is always the first frame with motion to the last frame with motion, padded by the time before/post options

Breakthrough avatar Feb 05 '25 03:02 Breakthrough

I think the most realistic way to approach this is to rewrite the scan logic of MotionScanner in a ground up way that supports this from the start. We have good tests now so this shouldn't be too much of an issue, but we need to add new ones for the new behaviour. This is a good time to probably add fake videos and subtractors to facilitate easier and quicker unit tests, and allow testing for weird edge cases with far less effort.

Unfortunately this may need to be bumped to v1.8 however.

Breakthrough avatar Feb 18 '25 02:02 Breakthrough