unixffmpeg

ffmpeg command to create thumbnail sprites


To output a single frame from ffmpeg I can do:

ffmpeg -i input.flv -ss 00:00:14.435 -vframes 1 out.png

And to output an image every second, I can do:

ffmpeg -i input.flv -vf fps=1 out%d.png

Would there be a way to create a thumbnail sprite from these outputs to help with the creation of a vtt file for thumbs on seek position?


Solution

  • I am not completely sure what you need/mean with sprite for a vtt file, but there is a nice tool that allows you to combine single images into a big overview picture:

    ImageMagick comes with a handy tool called montage

    montage - create a composite image by combining several separate images. The images are tiled on the composite image optionally adorned with a border, frame, image name, and more.

    You can put the thumbnails together on one or more images with the following command:

    montage *.png -tile 4x4 overview.png
    

    It will automatically generate the number of needed pictures to give you an overview.