#!/bin/bash source configuration.sh PASS=60 DELAY=" 77 " NAME="Fscking Camera" NBFRAMES=480 TMPF="/dev/shm/rush.png" DDIR="frames/rush" STDERR="WS/rush.stderr" POVOPT=" -d +q9 +a +W800 +H600 -v +WT2" for pass in $(seq 0 $PASS) do idx=$(cat WS/rush.last) next=$(( ( idx + 1 ) % NBFRAMES )) printf "pass %3d/%3d next %3d\n" \ $pass $PASS $next outfile=$(printf "%s/%04d.png" $DDIR $next) povray -iessai.pov -K${next} $POVOPT -O${TMPF} 2> $STDERR if [ $? -ne 0 ] then mogrify -colorspace gray $outfile tail -14 $STDERR echo $outfile "FAIL" sleep 80 else txt=$(printf "\$%03d" $next) convert ${TMPF} \ -pointsize 68 \ -kerning 10 \ -font Courier \ -fill $COLTEXT_A \ -annotate +555+137 "$txt" \ -annotate +19+69 "$NAME" \ -fill $COLTEXT_B \ -annotate +557+139 "$txt" \ -annotate +19+71 "$NAME" \ $outfile echo $outfile "done" fi echo $next > WS/rush.last sleep $DELAY done ffmpeg -nostdin \ -loglevel error \ -y -r 25 -f image2 -i $DDIR/%04d.png \ -metadata artist='---[ tTh ]---' \ -metadata title='* this is just an ugly WIP *' \ -c:v libx264 -pix_fmt yuv420p \ rush.mp4 echo figlet -W '* DONE *' | sed 's/^/ /' echo