Fix sunrise overlay vertical text and test-sunrise.sh pipeline bugs
- Overlay text was showing characters run together (e.g. '1n2n') because inside ffmpeg single-quoted filter text, \n is consumed as just 'n'. Fix: use \\\\n in bash double-quotes which stores \\n in the variable, which ffmpeg then parses as \n, which drawtext renders as a newline. Applied to both test-sunrise.sh (MID_VERT) and daily_sunrise_video.sh (SR_VERT, replacing the awk one-liner with the same bash approach). - test-sunrise.sh concat list was missing per-frame duration entries, causing 12 frames to encode as 0.48s (25fps default) and then slow down instead of compress. Fixed by writing 'duration INTERVAL' per frame so 12 frames × 10s = 120s raw → 12× compression to 10s. - Removed 2>/dev/null from audio ffmpeg call in test-sunrise.sh so capture failures are visible for diagnosis. https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
@@ -143,7 +143,7 @@ echo "Speed-adjusted: ${sped_dur}s (saved — overlay still pending)"
|
||||
SR_TIME=$(echo "$sunrise_time_local" | cut -d'-' -f1,2 | tr '-' ':')
|
||||
DT=""
|
||||
if [ "${SUNRISE_OVERLAY_ENABLED:-true}" = "true" ]; then
|
||||
SR_VERT=$(echo "$SR_TIME" | awk 'BEGIN{FS=""}{for(i=1;i<=NF;i++){printf "%s",$i; if(i<NF)printf "\\n"}}')
|
||||
SR_VERT="${SR_TIME:0:1}\\\\n${SR_TIME:1:1}\\\\n${SR_TIME:2:1}\\\\n${SR_TIME:3:1}\\\\n${SR_TIME:4:1}"
|
||||
DT="drawtext"
|
||||
[ -n "$FONT" ] && DT="${DT}=fontfile='${FONT}'" || DT="${DT}"
|
||||
DT="${DT}:text='${SR_VERT}'"
|
||||
|
||||
Reference in New Issue
Block a user