Glue pics together to a movie

if you want to glue pictures together, e.g. a webcam and you want to see it as a movie

mencoder "mf://*.jpg" -mf fps=5 -o movie.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800