Multiple thumbnail resolutions with FFMpeg

2010 August 25
by Martijn

For a project I’m working on, we need to generate thumnails from video files. While there are many tutorials for generating multiple thumbnails at different timestamps, we need to generate multiple, different resolution, thumbnails at the same timestamp. Using a post-processing tool here was not convenient.
Fortunately, its possible with just 1 ffmpeg command: you can have it use multiple output file names, each with their own parameters:
ffmpeg -i inputfile.flv -vframes 1 -ss 1 -s 320x240 -f image2 thumb1.jpg -s 160x100 -f image2 thumb2.jpg

-i is input file
-vframes 1 stop after 1 frame
-ss is skip time (where to take the thumb)
-s is size of the image
-f is format. image2 works.
thumb1.jpg and thumb2.jpg are the filenames

Just a quick heads up if anybody is looking for the same :)

One Response leave one →
  1. 2011 August 19

    Thanks Martijn, I have this exact same requirement was only finding the multiple thumbnails at different timestamps instructions. Kudos for documenting this!

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS