Thankfully, you don’t have to extract specific frames from your videos and then arrange them in a single image manually. You can use tools to easily create thumbnail sheets from videos. We show you two ways of doing so in Linux in this article.
Using Gnome Videos
If you are using Gnome, its default media player, named “Videos” (actually “Gnome Videos”, since it’s part of the Gnome suite of tools and up to recently known on its own as “Totem”), offers an option for easy creation of thumbnail sheets. To use it, run the program. Open the video you want to create some thumbnail sheets from, and then from the application’s menu, select “Create Screenshot Gallery …” The window that pops up will offer you some basic options about your thumbnail sheets. You can change the width of each thumbnail, and either let the program select the number of screenshots automatically or choose how many you want. Then, you only have to enter a name for the image sheet file on the top middle of the window and click on Save on the top right. The produced file is useful, but if it doesn’t look like you expected, there’s not much you can do. For more control over the results, you will have to use something that offers more options.
Using FFMPEG
FFMPEG is an admittedly very complex command-line tool you can use to work with your videos in multiple ways. One of those is the creation of thumbnail sheets. To do it, though, you have to craft a somewhat complicated command. It will look something like this:
-ss defines a time offset from the beginning of the video file. Most videos start with a title sequence, and in most cases it’s not useful having a thumbnail of that. With this switch, we instruct FFMPEG to ignore “X” seconds from the beginning of the video to skip its probably not-so-exciting introduction.-i sets the input file from which FFMPEG will pull its thumbnails.-frames defines the number of frames that will be recorded.-q:v sets the compression quality of the produced image files.
As for the most interesting but also complicated part of this command, we will have to expand a bit on it since it does three things at once. We are talking about this: The -vf at the beginning instructs FFMPEG to use a video filter. Select=not(mod(n,3000)) is responsible for the selected frames in the final images. It divides the current frame’s number (“n”) with the provided number (“3000”). Has the video reached frame 3001? If we divide 3001 with the number 3000, we get 1, so this frame will be the first in the first produced image sheet. Have we reached frame 6001? Since 6001/3000 gives us 2, this will be the second frame, and so on. Thus, by reducing this number, you increase the frequency of frame selection and vice-versa. With the scale=320:240 part, we set the dimensions of each thumbnail in the final thumbnail sheet. For best results, this should be a fraction of the original video’s resolution, taking into account its aspect ratio. Finally, the tile=4x3 part of the command defines how the thumbnails will be arranged in each sheet. Maybe you noticed that the final filename, for the produced image file, looks like this: The %03d part states that if FFMPEG ends up selecting more frames than it can fit in a single sheet, based on your title setup, it will produce more image sheets with numbered filenames. By decreasing the “n,NUMBER” of the selection or the number of tiles each sheet, more files will be produced and vice versa. Of course, this also depends on the length of the video file. It’s only math, after all: a 3-1/2-hour epic like “The Lord of the Rings” is made up of hundreds of thousands more frames than one of Pixar’s shorts. If you want to control the number of image sheet files FFMPEG will produce, use the following equation: Use the value from the “mod(n,RESULTS)” part of the command. If you prefer to have individual images rather than a thumbnail sheet, FFMPEG also allows you to decompile the video into individual images. What other ways do you produce a thumbnail sheet from your video?