#!/bin/bash set -e ; set -u source tools/fonctions.sh SEQNAME="$1" NBFRAMES=360 echo "Running $0 $SEQNAME" >> WS/log DIMS="-W1024 -H768" POVOPT="+q9 +A -d ${DIMS} -WT6" echo $POVOPT ; echo ; sleep 2 TMPIMG=/dev/shm/${SEQNAME}-tmp.png for frame in $(seq 0 $((NBFRAMES-1))) do img=$(printf "frames/%s/%05d.png" $SEQNAME $frame) debut=$(date +%s) set +e povray ${POVOPT} +K${frame} -i${SEQNAME}.pov -o${TMPIMG} err=$? if [ $err != 0 ] ; then echo "$SEQNAME fail $frame" >> WS/log mogrify -colorspace gray $img visual_sleep 12 continue fi set -e txt=$(printf "%s %03d" ${SEQNAME} $frame | tr '0' 'o') # echo $frame $img $txt convert ${TMPIMG} \ -font Courier-Bold \ -pointsize 18 \ -fill Gray80 \ -gravity south \ -annotate +0+5 "$txt" \ ${img} fin=$(date +%s) echo echo ${SEQNAME} $frame $(( fin - debut )) | \ tee -a WS/mp4.timing echo ; sleep 3 done echo ff_encodage $SEQNAME wip-${SEQNAME}.mp4 echo "+------- build of $SEQNAME done"