如何使用ffmpeg从png图像创建视频

如何使用ffmpeg从png图像创建视频,ffmpeg,centos,Ffmpeg,Centos,我想从不同的png图像创建一个视频。我的代码是: ffmpeg -r 20 -f image2 -i slideshow/%d.png -y -s 320x240 -aspect 4:3 out.mp4 我收到输出: FFmpeg version SVN-r26400, Copyright (c) 2000-2011 the FFmpeg developers built on Sep 27 2011 00:47:07 with gcc 4.1.2 20080704 (Red Hat 4.

我想从不同的png图像创建一个视频。我的代码是:

ffmpeg -r 20 -f image2 -i slideshow/%d.png -y -s 320x240 -aspect 4:3 out.mp4
我收到输出:

FFmpeg version SVN-r26400, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 27 2011 00:47:07 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
  configuration: --enable-avfilter --enable-filter=fade
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 1 /  0.16. 1
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.93. 0 / 52.93. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.74. 0 /  1.74. 0
  libswscale     0.12. 0 /  0.12. 0
Input #0, image2, from 'slideshow/%d.png':
  Duration: 00:00:00.25, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: png, rgb24, 720x471, 20 fps, 20 tbr, 20 tbn, 20 tbc
[buffer @ 0x9687230] w:720 h:471 pixfmt:rgb24
[scale @ 0x9687600] w:720 h:471 fmt:rgb24 -> w:320 h:240 fmt:yuv420p flags:0xa0000004
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf52.93.0
    Stream #0.0: Video: mpeg4, yuv420p, 320x240 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 20 tbn, 20 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
Segmentation fault
有什么问题吗?请帮忙。。。
目前我正在使用centos 5服务器。

最后我找到了解决该问题的方法。我不知道为什么,但在多个大小的png图像的情况下,ffmpeg并没有创建视频,但当我使用相同大小的png图像时,视频创建没有错误。所以,我从图像中剪下了大小相似的图钉,并用这些缩略图创建了视频,我能够生成幻灯片