#!/usr/bin/env bash #renderall.sh #Author: Brady O'Brien #Date: April 10, 2013 # This is a shell script used to render all of the frames of the # animation and stitch them together #clean up the directory rm *.png rm *.mpg #do physics ./balls.py #This calls the povray helper script to render. It opens up to 4 parallel # povray instances to speed up rendering. echo {0..300} | tr ' ' '\n' | xargs -n 1 -P 4 -I {} ./pinvoke.sh {} 300 #This stitches together the frames # -r 30 sets the framerate to 30. -qscale 1 sets the highest # quality. the -i balls%d.png tells ffmpeg to stitch together # all of the images with the filename pattern balls%d.png in the # order specified by the %d ffmpeg -r 30 -qscale 1 -i balls%d.png out.mpg