diff --git a/4-seasons.sh b/4-seasons.sh index 7d97ee9..510c738 100755 --- a/4-seasons.sh +++ b/4-seasons.sh @@ -106,7 +106,7 @@ echo "Raw duration: $raw_duration s" speed_factor=$(echo "scale=6; $raw_duration / $target_per_clip" | bc) echo "Step 2/2: speed factor $speed_factor..." -final_file="$output_dir/${yesterday}_Mvt${MVT_NUM}-Day${DAY_OF_MVT}of${DAYS_IN_MVT}-final.mp4" +final_file="$output_dir/${yesterday}_${CAM_NAME}_Mvt${MVT_NUM}-Day${DAY_OF_MVT}of${DAYS_IN_MVT}-final.mp4" if ! ffmpeg -loglevel warning \ -i "$temp_video" \ -vf "setpts=PTS/$speed_factor,fps=25" \ @@ -114,7 +114,7 @@ if ! ffmpeg -loglevel warning \ -t "$target_per_clip" -an \ -y "$final_file"; then rm -f "$final_file" - "$SCRIPT_DIR/notify.sh" "FAILED: $SEASON Mvt$MVT_NUM Day$DAY_OF_MVT speed-adjust ($yesterday)" \ + "$SCRIPT_DIR/notify.sh" "FAILED: [$CAM_NAME] $SEASON Mvt$MVT_NUM Day$DAY_OF_MVT speed-adjust ($yesterday)" \ "ffmpeg speed-adjust failed — re-run 4-seasons.sh $CAM_NAME while JPGs exist" || true exit 1 fi @@ -126,11 +126,11 @@ echo "Daily clip: $final_file ($adjusted s)" drift=$(echo "scale=3; $adjusted - $target_per_clip" | bc | sed 's/^-//') if awk "BEGIN{exit !($drift > 0.5)}"; then echo "WARNING: clip duration ${adjusted}s differs from target ${target_per_clip}s by ${drift}s" - "$SCRIPT_DIR/notify.sh" "WARNING: $SEASON Mvt$MVT_NUM Day$DAY_OF_MVT duration drift ($yesterday)" \ + "$SCRIPT_DIR/notify.sh" "WARNING: [$CAM_NAME] $SEASON Mvt$MVT_NUM Day$DAY_OF_MVT duration drift ($yesterday)" \ "Clip ${adjusted}s vs target ${target_per_clip}s (drift ${drift}s)" || true fi -"$SCRIPT_DIR/notify.sh" "$SEASON Mvt$MVT_NUM Day$DAY_OF_MVT/$DAYS_IN_MVT saved ($yesterday)" \ +"$SCRIPT_DIR/notify.sh" "[$CAM_NAME] $SEASON Mvt$MVT_NUM Day$DAY_OF_MVT/$DAYS_IN_MVT saved ($yesterday)" \ "$(basename "$final_file") — ${adjusted}s" || true # ── Auto-trigger montage on last day of movement ────────────────────────────── diff --git a/daily_sunrise_video.sh b/daily_sunrise_video.sh old mode 100644 new mode 100755 diff --git a/download-sunrise-sounds.py b/download-sunrise-sounds.py old mode 100644 new mode 100755 diff --git a/install.sh b/install.sh index 12f3e2f..f2088bd 100755 --- a/install.sh +++ b/install.sh @@ -29,6 +29,9 @@ fi mkdir -p "$UNIT_DIR" echo "Installing systemd units to $UNIT_DIR ..." +# ── Ensure all scripts are executable ──────────────────────────────────────── +chmod +x "$HERE"/*.sh "$HERE"/*.py 2>/dev/null || true + # ── Pre-create data directories for all cameras ─────────────────────────────── echo "Creating data directories..." for cam in "${CAMERAS[@]}"; do diff --git a/season_info.py b/season_info.py old mode 100644 new mode 100755 diff --git a/stitch-cameras.py b/stitch-cameras.py old mode 100644 new mode 100755 diff --git a/sunrise.py b/sunrise.py old mode 100644 new mode 100755