#!/bin/sh

#This script encodes the first 1600 (argument list length limitation) 
#jpeg images in each directory into a movie using mencoder.  Alternatively
#you could use qiv to view the files.

for file in $(pwd)/*
do
   if [ -d $file ]; then
       echo $file
       mencoder "mf://${file}/*.jpg" -vf scale -zoom -xy 512 -mf fps=25 -o ${file}.avi -ovc  lavc  -lavcopts vcodec=mpeg4
   fi
done
