If I understand you correctly, this article on FFmpeg's Wiki named "Create a thumbnail image every X seconds of the video" shows that FFmpeg can't do what you want it to do (without some automated calculations).
The wiki says that
-vf "fps=fps=XYZ" is your best shot - it will create one thumbnail/frame every
XYZ frames of the original video. If you really want 10 pictures per video and they all have different lengths, you could first read out the total frame-count and then calculate the needed fps with a script:
wanted_frames_times_actual_fps being e.g.
10*25 (PAL) or
10*30 (NTSC) in your case and
hh means hours,
mm means minutes,
ss means seconds, and
ff means frames (after the last counted second). Calculation example: a timecode of
01:35:45.960 in FFmpeg's terms, as FFmpeg doesn't use frames but milliseconds) at 25 frames per second resembles 143649 frames total.
This solution could well work - you just need to find a way to get the total time of the video (e.g. via ffprobe) and its fps (if you can't get a proper timecode) and then store that info as a variable named
I found another approach on this in the Wiki's "Also see"-section, linking to
a superuser-question named "Meaningful thumbnails for a Video using FFmpeg" which suggests using:
ffmpeg -hide_banner -i <YOUR_VIDEO> -vf "select=gt(scene\,0.8)" -frames:v 10 -vsync vfr -vf "fps=fps=1/200" -y out%03d.png
(I modified the code a bit - changed image codec to PNG and changed values for
fps. Also changed the output images to have three digits in their names.)
and then re-coding them to your GIF.
This solution also needs some computation or manual labor, as the values of all options (and especially
fps need changing according to the length of the video. I.e. I tried the original code from superuser with a 35min video - and only got 5 frames out of it.