How to Create Thumbnail Sheets for Your Videos in Linux

Ubuntu Thumbnail Sheets Featured

Thumbnail sheets are typical image files containing frames from a video. Video thumbnail sheets originate from photo sheets that were more popular around a decade ago when people were still printing their photographs. Just like photo sheets acted as previews for the pictures in films and SD cards back then, the thumbnail sheets we see here work as a preview for a video file. They’re easier and quicker to flip through to check a video’s content and quality instead of opening it in a media player to “scan it” from start to finish.

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.

Ubuntu Thumbnail Sheets Run Videos

Open the video you want to create some thumbnail sheets from, and then from the application’s menu, select “Create Screenshot Gallery …”

Ubuntu Thumbnail Sheets Menu Create 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.

Ubuntu Thumbnail Sheets Videos Gallery Setup

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.

Ubuntu Thumbnail Sheets Videos Sheet

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:

Ubuntu Thumbnail Sheets Ffmpeg Command
  • -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.

Ubuntu Thumbnail Sheets Ffmpeg Produced Sheet

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.

Ubuntu Thumbnail Sheets Ffmpeg Tweaked Tiling

Finally, the tile=4x3 part of the command defines how the thumbnails will be arranged in each sheet.

Ubuntu Thumbnail Sheets Ffmpeg More Tiles

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.

Ubuntu Thumbnail Sheets Increased Scale

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?

Odysseas Kourafalos Odysseas Kourafalos

OK's real life started at around 10, when he got his first computer - a Commodore 128. Since then, he's been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read.

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.