Combine multiple images to form a strip of images ffmpeg


I wish to combine multiple images into a single strip of images, using FFMPEG.

I have been trying to search this thing on google, but unable to find anything useful. All links take me to places where multiple images are combined to give a video output.

Assuming that all the files are of the same width and height, how can I join them to get a single strip of images. Can anybody help me?

Best Answer

Example using the scale and tile video filter in ffmpeg:

$ ls *.png
001.png  002.png  003.png  004.png  005.png

$ ffmpeg -i %03d.png -filter_complex scale=120:-1,tile=5x1 output.png

If you have file names that are in a non-numbered sequential order you can use the glob pattern type:

$ ffmpeg -pattern_type glob -i "*.png" -filter_complex tile=5x1 output.png

Output example where each individual input image is a unique solid color (only 248 bytes!): tile

You can also add a margin (outer border space) and padding (space between frames):

$ ffmpeg -i %03d.png -filter_complex scale=120:-1,tile=5x1:margin=10:padding=4 output.png

tile with margin and padding

A vertical orientation is possible too: tile=1x5 for this example:

enter image description here

Related Question