Thumbnails
The thumbnails file consists of a collection of thumbnails joined together on a single line.
Obviously, all of them share the same width and height.
So, if we whish a succession of 100 thumbnails of 120 pixels width, we get a picture of 120 x 100 = 12000 pixels.
Something like this :

To build it, we can use the power of FFmpeg Project who provides a well-known collection of video tools.
Number of frames
First, we need to get the number of frames in our video.
Suppose our video file is named LesCastorsAutoConstructeurs.mp4, ffprobe can give us what we need with one quite simple command line :
(Okay, this assumes the FFmpeg folder is specified in your path environment variable and that you launch a terminal in the video file folder... But I think you're brilliant enough to guess it !)
ffprobe -v error -select_streams v:0 -show_entries stream=nb_frames -of csv=p=0 -i LesCastorsAutoConstructeurs.mp4
5261
-
-v error : hide the info output for a better readability.
-
-select_streams v:0 : select only the video stream.
- -show_entries stream=nb_frames : show only the entry for nb_frames.
- -of csv=p=0 : minimize the output to nb_frames.
- -i LesCastorsAutoConstructeurs.mp4 : set our video as input.
- 5261 : the answer to our question.
You can get the full explanation and some alternative methods here.
Generating the thumbs
Imagine we want to extract 100 thumbnails of 120 pixels width from our video LesCastorsAutoConstructeurs.mp4 to a single image named preview.jpg. Our video contains 5261 frames. So, we have to take a snapshot each 52 frames.
The magical line to achieve such a result looks like this :
ffmpeg -i LesCastorsAutoConstructeurs.mp4 -y -frames 1 -q:v 10 -vf "select=not(mod(n\,52)),scale=120:-1,tile=100x1" preview.jpg
-
-i LesCastorsAutoConstructeurs.mp4 : take our video as input.
-
-y : overwrite the output file (preview.jpg) if it exists.
- -frames 1 : output only one frame.
- -q:v 10 : set maximum constant quality (VBR) encoding.
- -vf : create the filtergraph.
- "select=not(mod(n\,52)),scale=120:-1,tile=100x1" : our filtergraph which selects one frame every 52, uses the scale filter to fix the width to 120 pixels while keeping the aspect ratio (this is why we get :-1) and finally outputs the result to a 100x1 tile.
All in one
I guess that some of you would like an easiest and more human-friendly solution.
So was I...
As I wanted to give a try to Kotlin, I've decided to build a little piece of soft with it to do the job.
And this is how the result looks like :
First, you need to point the ffmpeg executable folder path (if it's not in the path environment variable of your system, otherwise, this step is simply skipped), then select the video file, and, finally, choose the number and the width of the thumbnails and the destination file.
That's done, you only have to wait for the process to finish.
You can download it from here.
However, as other Java applications, remember you need to have Java Runtime Environment installed so you may run it.