I tested for these types of files AVI, FLV, MP4, and WebM.
There are two problems that can occur in this case:
The film is small as a dimension and allows sharing without having to consume disk space or time.
In this case, we will use this:
ffmpeg -i ~/input.mp4 -an -r 20 -y %d.jpg
The movie size is too large and we need only a portion of it. We use the following command:
$ ffmpeg -i ~/input.mp4 -an -r 10 -y %d.jpg -ss 00:58:20 -t 00:02:00 -sameq
I could give you complete information about FFmpeg.
You can find them in the Help command, using:
$ ffmpeg --help
I will only say:
In the example above I used the following combinations of arguments to obtain the desired result.
-i ~/input.mp4 this give the input file name
-r 20 this set frame rate
-y %d.jpg this overwrite output files like jpeg images: 1.jpg , 2.jpg ...
-ss 00:58:20 this set the start time offset
-t 00:02:00 this is duration
-sameq it is used same quantizer as source