All constants are in config

This commit is contained in:
2026-05-20 14:00:11 +02:00
parent 6a0259c6cf
commit b4daa28354
7 changed files with 96 additions and 23 deletions

View File

@@ -73,6 +73,20 @@ python -m river_annotation_tool.annotation_script --clip left_20230615T120000
All settings live in `config/config.yaml`. Copy `config/config.example.yaml` to get started.
```yaml
filenames:
video_in_zip: left.mp4 # video filename inside each ZIP archive
video_tmp_suffix: .mp4 # suffix for the extraction temp file
zip_extension: .zip # extension used when resolving clip names
mask: mask.png # saved water mask
metadata: metadata.json # saved survey answers
frame: frame.png # middle frame snapshot
overlay: overlay.png # frame with mask blended in green
mask_vis: mask_vis.png # greyscale mask PNG (--extras only)
gif_original_hires: video_original_hires.gif
gif_original_lowres: video_original_lowres.gif
gif_overlay_hires: video_overlay_hires.gif
gif_overlay_lowres: video_overlay_lowres.gif
display_max: 720 # longest side in pixels for display
fps_fallback: 25 # FPS to use if the video header is missing
max_frames: 100 # max frames to extract per clip
@@ -139,6 +153,8 @@ video_overlay_hires.gif # Overlay GIF at display resolution
video_overlay_lowres.gif # Overlay GIF at 50% of display resolution
```
All output filenames can be overridden via the `filenames:` section in `config/config.yaml`.
### Survey answers (`metadata.json`)
Keys and values are determined by the `questions` section in `config/config.yaml`. With the default config:
@@ -159,7 +175,7 @@ Keys and values are determined by the `questions` section in `config/config.yaml
### Clip format
Each clip is a ZIP archive containing a `left.mp4` video. The filename encodes the recording timestamp (e.g. `left_20230615T120000.zip`).
Each clip is a ZIP archive containing a video file (default `left.mp4`, configurable via `filenames.video_in_zip`). The filename encodes the recording timestamp (e.g. `left_20230615T120000.zip`).
### Frame loading