#!/bin/bash rm -r build mkdir build convert -size 640x480 -depth 24 canvas:black png24:build/black.png convert -size 640x480 -depth 24 canvas:white png24:build/white.png mkdir build/anim for ((a=0; $a < 1000; a=$a+2)); do ln -s ../black.png build/anim/$a.png done for ((a=1; $a < 1000; a=$a+2)); do ln -s ../white.png build/anim/$a.png done mencoder "mf://build/anim/*.png" -v -vf-clr -mf fps=60 -o build/output.avi -ovc lavc