Search code examples
performanceffmpegextractvideo-thumbnails

Extracting thumbnails with FFMPEG is super slow on large video files?


I extract thumbnails from a .MOV file using FFMPEG on Linus (Debian 64bit).

The file I extract the thumbnail from is about 430 Megabytes large.

I use the following command to do so:

ffmpeg -i 'largeVideoFile.mov' -ss 00:14:37 -vframes 1 'thumbnail.jpg'

It takes well over 3 minutes for a single frame to be extracted.

How can I speed it up?


Solution

  • I found this article, which suggests that one should use fast seeking to increase performance by simply defining -ssin front of -i rather than the other way around.

    So my command now looks like this:

    ffmpeg -ss 00:14:37 -i 'largeVideoFile.mov' -vframes:v 1 'thumbnail.jpg'
    

    Notice that the arrangement of the parameters have been changed, starting with -ssand time, followed by -i and source file, and finally -vframes:v, 1 and the destination path.

    The time is down to about 1 second which is nice.