Take the 2-minute tour ×

I'm using this shell command to make thumbnail from VIDEO_FILE from 123 second and save it to THUMBNAIL_FILE.

ffmpeg -i VIDEO_FILE  -r 1 -ss 123 -f image2 THUMBNAIL_FILE

It works, but it is really slow for big movies. Is there any way to make it a little faster?

share|improve this question

3 Answers 3

up vote 9 down vote accepted

it has happened to me also, changing the argument order fixes this problem. tested on a 1.4GB 90 minute mp4 video - took about 1-2 seconds. before that it took MINUTES...

try this:

ffmpeg -ss 123 -i "VIDEO_FILE" "THUMBNAIL_FILE" -r 1 -vframes 1 -an -vcodec mjpeg
share|improve this answer
Testing on a 4GB MKV file I got: 1.23s on using mplayer and 1.687s using the above ffmpeg command. Both were taken from the third second of the video and are identical in resolution and size. –  Edu Felipe Sep 13 '11 at 14:46
Note that this way is not as reliable as the "slow way" - it can sometimes grab the wrong frame (which may or may not be important of course) and sometimes grabs a "p-frame or b-frame" - a frame that doesn't contain enough information to recreate the full image - in short, it could be all grey or blocky. –  Darren Greaves Feb 14 '12 at 9:17

Ffmpeg is not really good with creating thumbnails as I investigated. People recommend to use mplayer (by ffmpeg creators).

mplayer VIDEO_FILE -ss 00:10:11 -frames 1 -vo jpeg:outdir=THUMBNAILS_DIRECTORY
share|improve this answer

A small enhancement to Kirzilla's code: If you want to create PNG files (with compression), you can use the following code:

mplayer VIDEO_FILE -ss 00:10:11 -frames 1 -vo png:z=9:outdir=THUMBNAILS_DIRECTORY

This will probably create better thumbnails but of course with a larger size than JPEG.

share|improve this answer

Your Answer


