You can use ffmpeg for this. For instance, to output one frame per second:
ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg
See http://ffmpeg.org/ffmpeg.html#Video-and-Audio-file-format-co... for more examples.
See http://ffmpeg.org/ffmpeg.html#Video-and-Audio-file-format-co... for more examples.