ffmpeg无效的比例尺寸 - swScaler

时间:2011-04-18 08:44:04

标签: ffmpeg scale dimension

我在使用ffmpeg命令时遇到了使用swScaler的问题"swScaler: 6x25 -> 6x25 is invalid scaling dimension Cannot get resampling context"。 这是命令和它的输出。

# ffmpeg  -i /var/www/site/tmp/cache/bc1a6321b7a595e928be9717edf43027/media.jpg test.bmp
FFmpeg version SVN-r24948, Copyright (c) 2000-2010 the FFmpeg developers
  built on Apr 15 2011 15:10:24 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
  configuration: 
  libavutil     50.24. 0 / 50.24. 0
  libavcore      0. 6. 0 /  0. 6. 0
  libavcodec    52.87. 0 / 52.87. 0
  libavformat   52.78. 3 / 52.78. 3
  libavdevice   52. 2. 1 / 52. 2. 1
  libavfilter    1.38. 1 /  1.38. 1
  libswscale     0.11. 0 /  0.11. 0
Input #0, image2, from '/var/www/site/tmp/cache/bc1a6321b7a595e928be9717edf43027/media.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: mjpeg, yuvj444p, 6x25 [PAR 72:72 DAR 6:25], 25 tbr, 25 tbn, 25 tbc
swScaler: 6x25 -> 6x25 is invalid scaling dimension
Cannot get resampling context

任何帮助将不胜感激。 提前谢谢

1 个答案:

答案 0 :(得分:0)

FFmpeg不是将图像从一种格式转换为另一种格式的正确工具。 FFmpeg适用于经常对其尺寸有限制的视频,并且不会接受非常小的输入,例如6乘25。

更好的选择是ImageMagick。等效的转换命令是:

convert input.jpg output.bmp