Use FFmpeg to extract one frame of a video every N seconds. Replace the number in the "-r 1 image" command. Use 1/the number of seconds, and you'll get the result with which you should replace 1. For example, 0.5 for one frame every 2 seconds, 0.2 for every 5 seconds, 0.0167 for every 60 seconds.