본문 바로가기

Programming/Bash

[BASH] Make multiple screenshots into one image(tile, mosaic) by using ffmpeg




To make multiple screenshots and place them into a single image file (creating tiles), you can use FFmpeg's tile video filter, like this:

ffmpeg -ss 00:00:10 -i movie.avi -frames 1 -vf "select=not(mod(n\,1000)),scale=320:240,tile=2x3" out.png

That will seek 10 seconds into the movie, select every 1000th frame, scale it to 320x240 pixels and create 2x3 tiles in the output image out.png, which will look like this: