使用FFMPEG提取缩略图在大型视频文件上速度非常慢?

vai*_*aid 8 performance ffmpeg extract video-thumbnails

.MOV在Linus(Debian 64bit)上使用FFMPEG 从文件中提取缩略图.

我从中提取缩略图的文件大约是430兆字节.

我使用以下命令来执行此操作:

ffmpeg -i 'largeVideoFile.mov' -ss 00:14:37 -vframes 1 'thumbnail.jpg'
Run Code Online (Sandbox Code Playgroud)

单帧提取需要3分钟以上.

我怎样才能加快速度?

vai*_*aid 18

我发现这篇文章,它表明人们应该通过简单地-ss在前面 -i而不是相反的方式来定义来快速寻求提高性能.

所以我的命令现在看起来像这样:

ffmpeg -ss 00:14:37 -i 'largeVideoFile.mov' -vframes:v 1 'thumbnail.jpg'
Run Code Online (Sandbox Code Playgroud)

注意,参数的配置已经被改变,从-ss与时间,其次是-i和源文件,最后-vframes:v,1和目标路径.

时间下降到大约1秒,这很好.