diff options
Diffstat (limited to 'synopticMorph.sh')
| -rw-r--r-- | synopticMorph.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/synopticMorph.sh b/synopticMorph.sh index 0c22ca1..22749f4 100644 --- a/synopticMorph.sh +++ b/synopticMorph.sh @@ -23,6 +23,8 @@ LINGER="${LINGER:-8}" DWELL="${DWELL:-36}" FADE_IN="${FADE_IN:-1}" FADE_OUT="${FADE_OUT:-2}" +GLYPH_FONT="${GLYPH_FONT:-/usr/share/fonts/TTF/DejaVuSans.ttf}" +GLYPH_SIZE="${GLYPH_SIZE:-28}" require_cmd() { command -v "$1" >/dev/null 2>&1 || { echo "Required: $1" >&2; exit 127; } @@ -126,10 +128,15 @@ fout=$(awk "BEGIN{printf \"%.3f\", $out/$FPS - $FADE_OUT}") echo "Sequence: $out frames = ${dur}s at ${FPS} fps; fade-out ${FADE_OUT}s from ${fout}s" # --- 6. Encode ---------------------------------------------------------- +# Progress glyph: a cloud drifts right-to-left across the top of the frame, +# x mapped linearly to elapsed video time (0 at right edge, dur at left edge), +# so it visibly pauses during linger/dwell holds rather than skipping ahead. +GLYPH="drawtext=fontfile=$GLYPH_FONT:text='☁':fontsize=$GLYPH_SIZE:fontcolor=white@0.9:borderw=2:bordercolor=black@0.6:x=(w-tw)*(1-t/$dur):y=h*0.07" + TMP_MP4=$(mktemp "$OUT_DIR/morph.XXXXXX.mp4") ffmpeg -y -hide_banner -loglevel error -framerate "$FPS" \ -i "$SEQ_DIR/seq_%06d.png" \ - -vf "fade=t=in:st=0:d=$FADE_IN,fade=t=out:st=$fout:d=$FADE_OUT" \ + -vf "$GLYPH,fade=t=in:st=0:d=$FADE_IN,fade=t=out:st=$fout:d=$FADE_OUT" \ -c:v libx264 -pix_fmt yuv420p -movflags +faststart "$TMP_MP4" mkdir -p "$(dirname "$PUBLISH_PATH")" |
