Add MONTAGE_MUSIC_LOOPS per-movement music loop multiplier
Short adagio movements (Summer Mvt 2 at 107s, Winter Mvt 2 at 132s, etc.) compress each day to only 3-5 seconds of screen time at 1×. Looping the music N times multiplies the per-day target duration proportionally so the footage is less aggressively sped up and more watchable. - sky-cam.conf: add MONTAGE_MUSIC_LOOPS and per-movement overrides (Summer Mvt2=3×, Winter Mvt2=3×, Autumn Mvt2=2×, Summer Mvt3=2×, Spring Mvt2=2×) - 4-seasons.sh: multiply target_per_clip by loops - montage-mvt.sh: compute effective_duration, use -stream_loop for audio, fix fade_out_start, -t, and post-build duration check - make-finals.sh: multiply target by loops https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
+6
-4
@@ -50,10 +50,12 @@ fi
|
||||
music_duration=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$music_file")
|
||||
echo "Music: $(basename "$music_file") ($music_duration s)"
|
||||
|
||||
# Each daily clip covers music_duration / DAYS_IN_MVT seconds so that
|
||||
# concatenating all clips for the movement sums to the exact music duration.
|
||||
target_per_clip=$(echo "scale=6; $music_duration / $DAYS_IN_MVT" | bc)
|
||||
echo "Target clip duration: $target_per_clip s ($DAYS_IN_MVT days in movement)"
|
||||
# Each daily clip covers (music_duration * loops) / DAYS_IN_MVT seconds.
|
||||
# Short movements use loops > 1 so each day gets more screen time.
|
||||
loops_var="MONTAGE_MUSIC_LOOPS_${SEASON}_${MVT_NUM}"
|
||||
loops="${!loops_var:-${MONTAGE_MUSIC_LOOPS:-1}}"
|
||||
target_per_clip=$(echo "scale=6; $music_duration * $loops / $DAYS_IN_MVT" | bc)
|
||||
echo "Target clip duration: $target_per_clip s ($DAYS_IN_MVT days in movement, ${loops}x music)"
|
||||
|
||||
# ── Locate yesterday's images ─────────────────────────────────────────────────
|
||||
image_dir="$base_dir/$CAM_NAME/$yesterday"
|
||||
|
||||
Reference in New Issue
Block a user