## Use FFMPEG to Extract an Image from a Video Every N Seconds

I have videos from which I need to extract a screenshot of the video every 5 seconds. So I need a screenshot of the video at 00:05, 00:10, 00:15, and so on.

This can be accomplished using the following command with FFMPEG.

\$ ffmpeg -i video.mp4 -vf fps=1/5 -qscale:v 2 video-%d.jpg

FFMPEG itself cannot use wildcards for the file names, so it cannot be used by itself to automatically run this process on every MP4 in a directory. However, it would be fairly easy to write a script that would accomplish this in Bash or Python.