Add highlight marking and AI API
This commit is contained in:
@@ -21,6 +21,7 @@ dated video folders into a simple daily view that is easy to search and play.
|
||||
- Shows encoding progress, completed files, skipped files, and errors.
|
||||
- Never overwrites an existing transcoded file.
|
||||
- Keeps all original AVI recordings unchanged.
|
||||
- Saves named highlight periods for later review or automated processing.
|
||||
|
||||
## Start The Player
|
||||
|
||||
@@ -78,6 +79,30 @@ using the player while encoding runs. Files that already have an MP4 copy are
|
||||
reported as skipped. A temporary file is used during each conversion, so an
|
||||
interrupted conversion cannot damage an existing file.
|
||||
|
||||
## Highlights And AI Automation
|
||||
|
||||
To create a highlight in the player, play the recording, press **Mark start**,
|
||||
move to the end of the interesting part, press **Mark end**, enter a name, and
|
||||
press **Add highlight**. Highlights are saved in `media-mp4/highlights.json`.
|
||||
|
||||
The highlight API is intentionally simple. An AI or script can list highlights:
|
||||
|
||||
```sh
|
||||
curl http://127.0.0.1:8765/api/highlights
|
||||
```
|
||||
|
||||
It can append a highlight with a date, seconds from midnight, and a label:
|
||||
|
||||
```sh
|
||||
curl -X POST http://127.0.0.1:8765/api/highlights \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"date":"20260827","start":34000,"end":34120,"label":"Person at entrance"}'
|
||||
```
|
||||
|
||||
The API stores the entry without changing any video. Times are seconds from
|
||||
midnight, so `34000` means `09:26:40`. This makes it straightforward for an
|
||||
AI to append detections, labels, or review segments programmatically.
|
||||
|
||||
## Custom Folders And Ports
|
||||
|
||||
To use a different output folder or port:
|
||||
|
||||
Reference in New Issue
Block a user