Create a 5x5 Video Thumbnail Sheet Using FFmpeg
This article provides a quick guide on how to extract a 5x5 grid of thumbnail frames from a two-hour movie using the command-line tool FFmpeg. You will learn how to calculate the correct time intervals for a long video, apply the necessary video filters, and output a single, consolidated image containing all 25 tiled frames.
To generate a 5x5 grid, you need exactly 25 frames. For a standard two-hour movie, the total duration is 7,200 seconds (120 minutes × 60 seconds). Dividing 7,200 seconds by 25 frames means you need to extract one frame every 288 seconds.
The FFmpeg Command
Run the following command in your terminal to generate the thumbnail grid:
ffmpeg -i input.mp4 -vf "fps=1/288,scale=320:-1,tile=5x5" output.jpgCommand Breakdown
-i input.mp4: Specifies the path to your input movie file.-vf: Introduces the video filtergraph chain.fps=1/288: Instructs FFmpeg to capture one frame every 288 seconds. This ensures you get exactly 25 frames spread evenly across the two-hour duration.scale=320:-1: Resizes each individual thumbnail to a width of 320 pixels. The-1automatically calculates the correct height to maintain the original aspect ratio. You can adjust this width to increase or decrease the final image resolution.tile=5x5: Arranges the captured frames into a grid of 5 columns and 5 rows.output.jpg: The filename for your finished thumbnail sheet.