FFMPEG无法提取大于.6 MB的图像的缩略图

时间:2011-02-04 05:20:03

标签: ffmpeg thumbnails

ffmpeg.exe -i "imageLarge.jpg" -y -f mjpeg -s 72x92 -vframes 1 -an thumbnail7292.jpg

我们正在使用此命令使用FFmpeg生成图像文件的缩略图,但发现它无法生成大于.6 MB的文件的缩略图。有人可以就此提出建议。

1 个答案:

答案 0 :(得分:1)

目前尚不清楚ffmpeg究竟是什么问题,但无论如何我建议使用imagemagick中的convert实用程序。它更简单:

convert imageLarge.jpg -resize 72x92 thumbnail7292.jpg

如果您提供实际错误的说明,那么会有更多人帮助您。

修改

OP的错误是:

swScaler: Compile time max width is 2048  
change VOF/VOFW and recompile
Cannot get resampling context

很清楚问题是什么。您的JPEG文件对于当前版本的ffmpeg来说太大了。如果您想处理更大的图像,则必须重新编译ffmpeg或获取更新的版本。

来自src/libswscale/swscale_internal.h(版本:FFmpeg SVN-r26402)。

#if ARCH_X86
#define VOFW 5120
#else
#define VOFW 2048 // faster on PPC and not tested on others
#endif

如果您想更改限制,那就是您需要编辑的文件。

你使用的是什么版本的ffmpeg?这一problem seems to have been addressed一年多以前。

如果您不想重建ffmpeg,可以像我原先建议的那样使用convert