Convert jpg to avi with ffmpeg

This will create a video slideshow (using video codec libx264) from series of jpg images, named image001.jpg, image002.jpg, image003.jpg, … and each image will have a duration of 2 seconds. ffmpeg -r 1/2 -i image%3d.jpg -vcodec libx264 out.avi