32 Commits
Author SHA1 Message Date
proitlab 9ea6820a37 Preserve STATE_FILE after file-input recount; delete on start
File sources now keep STATE_FILE on graceful shutdown (EOF or SIGTERM):
the final batch snapshot is written instead of deleted, so the dashboard's
/api/current-batch still shows the recount result after the process exits.
On startup, STATE_FILE is cleared unless a live instance is detected via a
/proc cmdline scan (rtsp/http source in argv or config). Live sources keep
the old resume-at-start / delete-on-finish behavior.

SPEC: V19, T21, B2. AGENTS: STATE_FILE lifecycle section.
2026-08-12 15:05:48 +07:00
proitlab 90038da298 Force file sources to decode from frame 0; add first-frame diagnostics
OpenCV FFMPEG build buffer (CAP_PROP_BUFFERSIZE=1) on file sources was
landing mid-file, so the first decoded frame could show an ~11s-later
camera clock than the source's true frame 0. Gate BUFFERSIZE to live
sources only and seek file sources to CAP_PROP_POS_FRAMES=0. Log
pos_frames/pos_msec/frame_count/fps once on first successful read.

SPEC: B1, V18, T20. AGENTS: capture setup notes.
2026-08-10 12:00:18 +07:00
proitlab ea370b0ffd File sources record from frame 0; feed every frame (fix 10s offset + detection gaps) 2026-08-10 10:56:33 +07:00
proitlab 1d1199fa04 Add pause-on-first-frame for file sources (.continue resume) 2026-08-10 10:16:07 +07:00
proitlab 30515086d3 Add configurable recording quality (RECORD_CRF, RECORD_PRESET) 2026-08-07 23:12:40 +07:00
proitlab 31476d2fa7 Use batch_X_YYYYMMDD_HHMMSS.mp4 filename for exported recordings 2026-08-05 00:26:01 +07:00
proitlab 37f98f243c Save video under batch counting date; fix retention timezone 2026-08-04 23:58:35 +07:00
proitlab a94c3dff87 Add --source CLI flag to override video source 2026-08-04 23:37:07 +07:00
proitlab eefff48953 Update Today 2026-08-03 16:26:01 +07:00
proitlab 896a07b5fa Dont copy pending mp4 2026-07-31 11:53:24 +07:00
proitlab 84e2e65563 Autocreate directory 2026-07-31 11:47:49 +07:00
proitlab e67109ea88 Recompile 2026-07-29 17:01:43 +07:00
proitlab 4ff0fdd0aa Reset delete live stream jpg as well (Reset buffer) 2026-07-29 16:44:18 +07:00
proitlab d44cb58416 Reset delete live stream jpg as well 2026-07-29 16:22:58 +07:00
proitlab 428f2a1140 Reset Mechanism 2026-07-29 16:12:16 +07:00
proitlab 5eb122f422 Fix recording 2026-07-29 07:57:39 +07:00
proitlab a30643ddc7 Add recording to Shared Memory 2026-07-29 01:00:40 +07:00
proitlab bb7d08abff Ensure livestream folder is exists 2026-07-27 10:17:59 +07:00
proitlab 3ebdc215e6 Some more log clean up 2026-07-07 17:19:10 +07:00
proitlab 1c783fd923 Counter everytime ayam crossing and emove Frame log 2026-07-07 16:33:40 +07:00
proitlab 0317a44001 include cps in batch ended 2026-07-07 16:06:27 +07:00
proitlab a5c146ec98 Log for Batch closed 2026-07-07 15:59:18 +07:00
proitlab 511d892d3c Add motion detection before object detection 2026-07-06 22:55:36 +07:00
proitlab bed242d26c Exit when model file not found 2026-07-06 18:04:51 +07:00
proitlab 178797fbbe Reset counter at CUTOFF_TIME and can be configure in config.env 2026-07-06 11:33:00 +07:00
proitlab e6dc27398f Bug for new batches after 5 minutes 2026-07-06 10:50:23 +07:00
proitlab ccb1c89b12 First argument as config.env is mandatory 2026-07-06 10:39:46 +07:00
proitlab 9ca1f2914e Latest Leveling with python Fix! 2026-07-06 03:50:58 +07:00
proitlab 5483837769 Revert "Level up with python version"
This reverts commit 9aec3fbd78.
2026-07-06 03:17:44 +07:00
proitlab 9aec3fbd78 Level up with python version 2026-07-06 02:51:03 +07:00
proitlab fc172117cc Fix and tested 2026-07-01 19:29:24 +07:00
proitlab 37fe4eee3a First Commit 2026-07-01 13:38:05 +07:00