#!/bin/bash for n in *.ppm; do convert $n $n.sgi; done; mencoder "mf://*.sgi" -mf fps=25 -o output.avi -ovc lavc -lavcopts vcodec=msmpeg4v2