From e56663209efd91f4b8d13a1e799b896acc7a2e72 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 22 Apr 2026 14:45:36 +0000 Subject: [PATCH] Prepend to all output filenames consistently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Audio: AUDIO_DIR//YYYY-MM-DD/-HH-MM-SS.m4a Movies — cam name now always leads the filename: daily_sunrise_video.sh: east-2026-04-22-daily-sunrise.mp4 east-2026-04-22-daily-sunrise-sped.mp4 (intermediate) east-2026-04-22-daily-sunrise-test.mp4 (demo) 4-seasons.sh: east-2026-04-21_Mvt2-Day2of31-final.mp4 (was: 2026-04-21_east_Mvt2-...) montage-mvt.sh: east-2026-03-20_Spring_Mvt1-Sped.mp4 east-2026-03-20_Spring_Mvt1-Montage.mp4 year-end-join.sh: east-2026.mp4 (already had cam at front) sunrise2mm.py updated to look for the new east-YYYY-MM-DD-daily-sunrise.mp4 filename. Retention find patterns (wildcards) already match both formats. https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ --- 4-seasons.sh | 2 +- ambient-record.sh | 2 +- daily_sunrise_video.sh | 6 +++--- montage-mvt.sh | 4 ++-- sunrise2mm.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/4-seasons.sh b/4-seasons.sh index 23bf3da..f308b29 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}_${CAM_NAME}_Mvt${MVT_NUM}-Day${DAY_OF_MVT}of${DAYS_IN_MVT}-final.mp4" +final_file="$output_dir/${CAM_NAME}-${yesterday}_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" \ diff --git a/ambient-record.sh b/ambient-record.sh index eb60f5f..6e296b6 100755 --- a/ambient-record.sh +++ b/ambient-record.sh @@ -50,7 +50,7 @@ while true; do mkdir -p "$dir" timestamp=$(date +%H-%M-%S) - outfile="$dir/${timestamp}.m4a" + outfile="$dir/${CAM}-${timestamp}.m4a" echo "[$(date '+%Y-%m-%d %H:%M:%S')] Recording → $outfile (${CHUNK}s)" diff --git a/daily_sunrise_video.sh b/daily_sunrise_video.sh index 9782bfc..c3076fa 100755 --- a/daily_sunrise_video.sh +++ b/daily_sunrise_video.sh @@ -178,7 +178,7 @@ if $TEST_MODE; then sped_video=$(mktemp --suffix=-sped.mp4) echo "Step 2/3: speed-adjust (test)..." else - sped_video="$output_dir/$current_date-daily-sunrise-sped.mp4" + sped_video="$output_dir/$CAM_NAME-$current_date-daily-sunrise-sped.mp4" echo "Step 2/3: speed-adjust → $sped_video" fi if ! ffmpeg -loglevel warning \ @@ -275,9 +275,9 @@ fi if $TEST_MODE; then demo_dir="${DEMO_DIR:-$MOVIES_DIR/demoio}/$CAM_NAME" mkdir -p "$demo_dir" - final_video="$demo_dir/$current_date-daily-sunrise-test.mp4" + final_video="$demo_dir/$CAM_NAME-$current_date-daily-sunrise-test.mp4" else - final_video="$output_dir/$current_date-daily-sunrise.mp4" + final_video="$output_dir/$CAM_NAME-$current_date-daily-sunrise.mp4" fi fade_out=$(echo "scale=1; $SUNRISE_TARGET_SECS - 0.5" | bc) diff --git a/montage-mvt.sh b/montage-mvt.sh index 3d6812d..2d79fc7 100755 --- a/montage-mvt.sh +++ b/montage-mvt.sh @@ -147,7 +147,7 @@ concat_dur=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$temp_c speed_factor=$(echo "scale=6; $concat_dur / $effective_duration" | bc) echo "Step 2/3: speed $speed_factor (raw=${concat_dur}s → target=${effective_duration}s)" -sped_file="$output_dir/${MVT_START}_${SEASON}_Mvt${MVT_NUM}-Sped.mp4" +sped_file="$output_dir/${CAM_NAME}-${MVT_START}_${SEASON}_Mvt${MVT_NUM}-Sped.mp4" if ! ffmpeg -loglevel warning \ -i "$temp_concat" \ -vf "setpts=PTS/$speed_factor" \ @@ -193,7 +193,7 @@ DT="${DT}:fontcolor=0xCCCCCC:fontsize=h/36:x=(w-text_w)/2:y=h*0.113" DT="${DT}:box=1:boxcolor=black@0.55:boxborderw=5" DT="${DT}:alpha='${ALPHA}':enable='${ENABLE}'" -output_file="$output_dir/${MVT_START}_${SEASON}_Mvt${MVT_NUM}-Montage.mp4" +output_file="$output_dir/${CAM_NAME}-${MVT_START}_${SEASON}_Mvt${MVT_NUM}-Montage.mp4" # If music/overlay fails, the sped video is promoted to the output path so # year-end-join can still include this movement (as a silent, no-overlay clip). diff --git a/sunrise2mm.py b/sunrise2mm.py index 34d50ea..e999d56 100755 --- a/sunrise2mm.py +++ b/sunrise2mm.py @@ -49,7 +49,7 @@ today_month_str = datetime.now().strftime('%Y-%m') movies_dir = config.get('MOVIES_DIR', '') sunrise_cam = config.get('SUNRISE_CAM', 'east') output_dir = os.path.join(movies_dir, sunrise_cam, today_month_str, 'sunrise-only') -video_file = os.path.join(output_dir, f'{today_date_str}-daily-sunrise.mp4') +video_file = os.path.join(output_dir, f'{sunrise_cam}-{today_date_str}-daily-sunrise.mp4') print(f"Looking for video file: {video_file}")