Dacha Architecture:
-
Stream
- Get id from command line
- Read config from db.
- Receive rtsp stream.
- Write stream on disk as files with length = max([key_frame, key_frame), 10 sec) limit 100 files in circle, write time to db.
-
Camera
- Get id from command line
- Read config from db.
- Manage 1 or 2 (high, low) streams.
- Control ptz using onvif.
- Recive onvif events, write desc and time to db.
-
Analyzer
- Read config from db.
- Search db for new files decode and analyze for human or vehicle movement and write events.
-
Archiver
- Read config from db.
- Search db for new files, copy them to archive.
- Erase old records in archive.
-
Commander
- Read config from db.
- Search db for new events, decides what to do (send to client, telegram, rotate camera, switch light on, etc.)
-
Server
- Read config from db.
- Manage users, disks, cameras, analyzer, archiver, commander.
- Http api for client.
-
Client
- Settings view
- Archive view
- Live view
TODO:
Step 1: 1. Server find ip cameras by ws-discovery 2. Client show camera list, snapshot, streams Step 2: 1. Client select camera and streams 2. Server write config and create camera processes Step 3: 1. Camera write onvif events 2. Server create commander process Step 4: 1. Commander reads events and files 2. Client receives events as list