Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 790
vaid Avatar asked Oct 05 '15 01:10

vaid


1 Answers

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.

like image 105
vaid Avatar answered Oct 12 '22 02:10

vaid