To create a time-lapse video using mencoder I use:
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=5 -vf scale=1400:1050 -mf type=jpeg:fps=20 mf://*.JPG -o time-lapse.avi