51 lines
1018 B
Bash
Executable File
51 lines
1018 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
POVOPT=" -q9 +a -W1280 -H1024 +WT2 -d -v "
|
|
SOURCE="vision.pov"
|
|
TMPF="/dev/shm/gravfield.png"
|
|
|
|
# ---------------------------------------
|
|
|
|
une_passe ()
|
|
{
|
|
clock=$1
|
|
|
|
povray -i${SOURCE} -K${clock} $POVOPT -O${TMPF} 2> pov.stderr
|
|
|
|
timestamp=$(date -u +'%F %H:%M' | tr '01' 'Ol')
|
|
texte=$(printf "pass %04d" $clock | tr '01' 'Ol')
|
|
outfile=$(printf "WS/troid/%05d.png" $clock)
|
|
echo $timestamp $texte $outfile
|
|
|
|
convert ${TMPF} \
|
|
-pointsize 16 \
|
|
-font Courier-Bold \
|
|
-fill Orange \
|
|
-annotate +10+16 "$timestamp" \
|
|
-annotate +10+34 "$texte" \
|
|
-pointsize 8 \
|
|
-gravity south-west \
|
|
-annotate +10+6 "tTh & Konrad" \
|
|
${outfile}
|
|
}
|
|
|
|
# ---------------------------------------
|
|
|
|
for foo in $(seq 0 1999)
|
|
do
|
|
echo '............' $foo
|
|
une_passe $foo
|
|
exit
|
|
done
|
|
|
|
ffmpeg -nostdin \
|
|
-loglevel warning \
|
|
-y -r 30 -f image2 -i WS/trid/%05d.png \
|
|
-metadata artist='---{ tTh and Konrad }---' \
|
|
-metadata title="Experiment on Gravity Field" \
|
|
-c:v libx264 -pix_fmt yuv420p \
|
|
bar.mp4
|
|
|