How to create thumbnail sheets for videos in Linux

You can use tools to easily create thumbnail sheets from the video. TipsMake.com will show you 2 ways to do so with Linux in this article.

Thumbnails sheets are typical image files that contain frames from video. Video thumbnail sheets have their origins in photo sheets, popular about a decade ago, when people still had the habit of printing photos.

Like the photo sheets, which acted as a preview for images on film and SD card back then, the thumbnail sheet you saw here acted as a preview for the video file. It's easier and faster to flip through to check the content and video quality, instead of opening it in a media player and watching from start to finish.

Thankfully, you don't have to extract specific frames from your videos and then rearrange them manually. You can use tools to easily create thumbnail sheets from the video.TipsMake.com will show you 2 ways to do so with Linux in this article.

Use Gnome Videos

If you are using Gnome, its default media player, named Videos , (or Gnome Videos , as it is part of the Gnome toolkit and recently known as Totem ), provide An easy option to create thumbnail sheets.

To use it, run the program.

How to create thumbnail sheets for videos in Linux Picture 1How to create thumbnail sheets for videos in Linux Picture 1
Run Gnome Videos

Open the video you want to create some thumbnail sheets from, then from the application menu, select Create Screenshot Gallery .

The window that appears will give you some basic options for thumbnail sheets. You can change the width of each thumbnail and let the program automatically choose the number of screenshots or give the number you want.

Then you just have to enter a name for the image file in the middle of the top of the window and click Save at the top right.

The generated files are very useful, but if it's not what you expect, you can't do much more. To gain more control over the results, you'll have to use another tool that provides more options.

How to create thumbnail sheets for videos in Linux Picture 2How to create thumbnail sheets for videos in Linux Picture 2
The generated file is very useful

Use FFMPEG

FFMPEG is a very sophisticated command line tool that you can use to work with your videos in many ways. One of them is the creation of thumbnail sheets. Although, to do that, you have to create a somewhat complex command. The command will look like this:

 ffmpeg -ss 3 -i "/path/to/video/file.mp4" -frames 5 -vf "select=not(mod(n,3000)),scale=320:240,tile=4x3" -vsync vfr -q:v 10 image-sheet-filename_%03d.jpg 
  1. -ss specifies the time skipped from the beginning of the video file. Most videos start with a title series and, in most cases, it is not helpful to have this section thumbnail. With this switch, you will instruct FFMPEG to skip X seconds from the beginning of the video to skip the introduction.
  2. -i put the input file that FFMPEG will grab the thumbnail.
  3. -frames specify the number of frames to be recorded.
  4. -q: v sets the compression quality of generated image files.

For the most interesting but also the most complex part of this command, we will have to expand a bit, as it does 3 things at once. What we are talking about is:

 -vf "select=not(mod(n,3000)),scale=320:240,tile=4x3" 

-vf at the beginning of FFMPEG tutorial to use video filter. Select = not (mod (n, 3000)) is responsible for the selected frame in the final image. It divides the number of the current frame ('n') by the number provided ('3000').

Video reaches 3001 frame? If we divide 3001 by the number 3000, we get 1, so this frame will be the first one in the generated image sheet. Video reaches frame 6001? Because 6001/3000 will give 2, this will be the second frame, etc. So by reducing this number, you increase the frequency of frame selection and vice versa.

How to create thumbnail sheets for videos in Linux Picture 3How to create thumbnail sheets for videos in Linux Picture 3
The scale = 320: 240 section sets the size of each thumbnail in the final thumbnail sheet

With scale = 320: 240 , we set the size of each thumbnail in the final thumbnail sheet.

Finally, the tile = 4x3 section of the command determines how to arrange the thumbnails in each page.

You may have noticed that the final file name for the generated image file, looks like this:

 filename_%03d.jpg 

The % 03d section indicates that if FFMPEG ends up selecting more frames than it can fit on a single page, based on the title setting, it will create more image sheets with numbered file names. By reducing the number of n, NUMBER or number of cells per page, more files will be created and vice versa.

How to create thumbnail sheets for videos in Linux Picture 4How to create thumbnail sheets for videos in Linux Picture 4
By reducing the number of n, NUMBER or number of cells per page, more files will be created and vice versa

Of course, this also depends on the length of the video file. If you want to control the number of FFMPEG image files that will be generated, use the following equation:

 Tổng số khung hình trong video/Số lượng ô trong một trang/Số lượng image sheet bạn muốn 

Use the value from the mod (n, RESULTS) part of the command.

If you want individual images rather than a thumbnail sheet, FFMPEG also allows you to 'translate' the video back into individual images.

4.3 ★ | 9 Vote