#! /bin/bash # convert a bunch of .pov files to raster format, # then combine them into a movie just1='' function mk_rip() { for file in tmp-ray/x*.pov ; do ofile=${file%.pov} # FJ for jpeg # FN for png povray -V -V -d +Q11 +O$ofile +FN +H480 +W854 $file echo $file if test -n "$just1" ; then break # good for testing fi done } function mk_mp4(){ avconv -i tmp-ray/x%05d.png \ -c:v libx264 -preset veryslow \ -y ~/video/conserved-speedup.mp4 } while test -n "$*" ; do arg="$1" ; shift case "$arg" in rip|ras*) mk_rip ;; mp4) mk_mp4 ;; one) export just1=yes ;; *) 1>&2 echo "Unrecognized option '$arg'" exit 1 esac done