首页 新闻 会员 周边

ffmpeg 视频转换前30帧为 gif图片失败!

0
悬赏园豆:10 [已关闭问题] 关闭于 2013-01-25 16:05

执行代码如下:

ffmpeg -i VTS2.wmv -vframes 30 -y -f gif a.gif

pause

生成过程信息:

D:\>ffmpeg -i VTS2.wmv -vframes 30 -y -f gif a.gif
FFmpeg version SVN-r22048, Copyright (c) 2000-2010 the FFmpeg developers
built on Feb 25 2010 17:20:36 with gcc 4.3.3
configuration: --prefix=/FFMpegSDK --enable-memalign-hack --enable-shared --en
able-version3 --disable-static --enable-gpl --enable-nonfree --enable-postproc -
-enable-avfilter --enable-runtime-cpudetect --enable-hardcoded-tables --enable-p
threads --enable-avisynth --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-l
ibnut --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 -
-enable-libxvid --enable-small
libavutil 50. 9. 0 / 50. 9. 0
libavcodec 52.55. 0 / 52.55. 0
libavformat 52.54. 0 / 52.54. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.17. 0 / 1.17. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, avi, from 'VTS2.wmv':
Metadata:
ISFT : Lavf52.54.0
Duration: 00:01:45.68, start: 0.000000, bitrate: 1490 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 720x576 [PAR 1:1 DAR 5:4], 25 tbr, 25 tb
n, 25 tbc
Stream #0.1: Audio: mp2, 48000 Hz, 2 channels, s16, 64 kb/s
[gif @ 0xc2ca60]ERROR: gif only handles the rgb24 pixel format. Use -pix_fmt rgb
24.
Output #0, gif, to 'a.gif':
Metadata:
encoder : Lavf52.54.0
Stream #0.0: Video: rawvideo, yuv420p, 720x576 [PAR 1:1 DAR 5:4], q=2-31, 20
0 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Could not write header for output file #0 (incorrect codec parameters ?)

D:\>pause
请按任意键继续. . .

 

生成出来的图片,大小为0KB

请问要如何解决??

小明冥的主页 小明冥 | 菜鸟二级 | 园豆:222
提问于:2013-01-12 16:35
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册