From 93935876de9c854e08fb6ce87b12f703148c614a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 24 Apr 2026 12:27:52 +0000 Subject: [PATCH] sunrise: scale audio fades to 8.5% of target duration Replaces the fixed 0.3s fade with SUNRISE_TARGET_SECS * 0.085, so a 10s clip now fades 0.85s in and out. The fade scales automatically if the target duration is tuned later. --- daily_sunrise_video.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daily_sunrise_video.sh b/daily_sunrise_video.sh index d21f4f9..69b7983 100755 --- a/daily_sunrise_video.sh +++ b/daily_sunrise_video.sh @@ -288,8 +288,8 @@ if $TEST_MODE; then else final_video="$output_dir/$CAM_NAME-$current_date-daily-sunrise.mp4" fi -fade_dur=0.3 -fade_out=$(echo "scale=2; $SUNRISE_TARGET_SECS - $fade_dur" | bc) +fade_dur=$(echo "scale=3; $SUNRISE_TARGET_SECS * 0.085" | bc) +fade_out=$(echo "scale=3; $SUNRISE_TARGET_SECS - $fade_dur" | bc) # ── Step 3a: mix audio (video copied, not re-encoded) ──────────────────────── work_video="$sped_video"