Save video under batch counting date; fix retention timezone

This commit is contained in:
proitlab committed 2026-08-04 23:58:35 +07:00
1 parent a94c3dff87
commit 37f98f243c
9 files changed
+37 -19

No files matched your search

+14
View File
@@ -53,3 +53,17 @@ touch /dev/shm/bytetrack-counter/.reset
- `.reset` trigger file
Directory auto-created at startup.
## Video recordings
- Recordings are written to `SHM_DIR` as `batch_pending_*.mp4`, confirmed when ayam detected, and moved via `fork()` (non-blocking) to `OUTPUT_DIR/<batch counting_date>/batch_N_HHMMSS.mp4`.
- The day folder uses the **batch counting date** (today before `DAILY_CUTOFF_TIME`, tomorrow after), forwarded from `BatchStore` through the batch-closed callback — matching the SQLite `counting_date`.
- Retention cleanup compares day folders with `std::localtime` to match folder naming.
## Source override
```bash
bytetrack-counter <config.env> --source /tmp/test.mp4 # local file (single pass)
bytetrack-counter <config.env> --source rtsp://cam:554/x # live stream
bytetrack-counter <config.env> -s path # or --source=path
```