Per-camera capture interval; ambient recorder; fix 4-seasons one-frame bug

Per-camera capture interval:
  CAPTURE_INTERVAL_<cam> in sky-cam.conf overrides the global value for
  a specific camera.  capture.sh and 4-seasons.sh both respect it.
  Example: south at 30s saves storage; north at 5s gives smoother motion.

4-seasons.sh one-frame bug fix:
  Same root cause as the sunrise scripts — concat list had no 'duration'
  entries, collapsing all JPEG frames to timestamp 0.  Fixed by writing
  'duration INTERVAL' per frame.  Added fps=25 to the speed-adjust step
  so the VFR source resamples to a standard frame rate.

ambient-record.sh (new):
  Continuous AAC recorder for natural sounds (birds, rain, wind).
  Saves AMBIENT_CHUNK_SECS chunks to AMBIENT_DIR/<cam>/YYYY-MM-DD/HH-MM-SS.m4a.
  Reconnects automatically on stream failure.  Rolling retention via
  AMBIENT_RETENTION_DAYS.  Enabled by setting AMBIENT_ENABLED=true and
  listing cameras in AMBIENT_CAMS in sky-cam.conf, then re-running install.sh.

https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
Claude
2026-04-21 21:08:10 +00:00
parent cdaca67d31
commit dbdd59677f
5 changed files with 145 additions and 6 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ if [ -z "$RTSP_URL" ]; then
exit 1
fi
INTERVAL="${CAPTURE_INTERVAL:-10}"
interval_var="CAPTURE_INTERVAL_${CAM}"
INTERVAL="${!interval_var:-${CAPTURE_INTERVAL:-10}}"
echo "Starting capture: cam=$CAM interval=${INTERVAL}s"
while true; do