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.
This commit is contained in:
@@ -288,8 +288,8 @@ if $TEST_MODE; then
|
|||||||
else
|
else
|
||||||
final_video="$output_dir/$CAM_NAME-$current_date-daily-sunrise.mp4"
|
final_video="$output_dir/$CAM_NAME-$current_date-daily-sunrise.mp4"
|
||||||
fi
|
fi
|
||||||
fade_dur=0.3
|
fade_dur=$(echo "scale=3; $SUNRISE_TARGET_SECS * 0.085" | bc)
|
||||||
fade_out=$(echo "scale=2; $SUNRISE_TARGET_SECS - $fade_dur" | bc)
|
fade_out=$(echo "scale=3; $SUNRISE_TARGET_SECS - $fade_dur" | bc)
|
||||||
|
|
||||||
# ── Step 3a: mix audio (video copied, not re-encoded) ────────────────────────
|
# ── Step 3a: mix audio (video copied, not re-encoded) ────────────────────────
|
||||||
work_video="$sped_video"
|
work_video="$sped_video"
|
||||||
|
|||||||
Reference in New Issue
Block a user