Configuration¶
The recorder reads /etc/camera-recorder.conf as a Bash configuration file.
Keep it owned by root with mode 0600; it can contain monitoring URLs and the
example go2rtc file contains camera credentials.
For tests or a non-default layout, set CONFIG_FILE in the environment to an
alternate configuration path. Production services use /etc/camera-recorder.conf
when this variable is unset.
Recorder settings¶
Each camera uses a numbered name and URL pair:
| Setting | Meaning | Default |
|---|---|---|
CAMERA_N_NAME |
Directory/name for camera N, where N is 1–4 | none |
CAMERA_N_URL |
RTSP URL consumed by ffmpeg | none |
RECORDING_ROOT |
Root directory for camera folders | /media/recordings |
RETENTION_DAYS |
Age after which clips are deleted | 14 |
MAX_RECORDING_AGE_SECONDS |
Watchdog stale-file threshold | 120 |
HEALTHCHECKS_PING_URL |
Optional Healthchecks.io URL | disabled |
The checked-in example uses local go2rtc restreams such as
rtsp://127.0.0.1:8554/living. The actual upstream camera URLs belong in
/etc/go2rtc/go2rtc.yaml, not in Git.
Output behavior¶
The recorder writes 60-second .mkv segments using source codecs. The organizer
moves files from the camera root into a YYYY-MM-DD directory after midnight.
The cleanup timer removes matching .mkv and .mp4 files older than the
retention period and then removes empty directories.
Monitoring¶
Set HEALTHCHECKS_PING_URL to enable the optional ping in the organizer and
check-recordings.sh. Leave it empty to disable external monitoring. The latter
script is not scheduled by install.sh; schedule it yourself only if you need a
separate whole-system health check.