澳门银河网上官方赌场_老品牌值得信赖

ITKeyword,专注技术干货聚合推荐

注册 | 登录

ffmpeg animated gif is blotchy

itPublisher 分享于

2020腾讯云双十一活动,全年最低!!!(领取3500元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1073

2020阿里云最低价产品入口,含代金券(新老用户有优惠),
地址https://www.aliyun.com/minisite/goods

推荐:ffmpeg 截取gif图片

今天按网上的命令"ffmpeg -i a.avi -vframes 30 -y -f gif a.gif" 去截取gif图片一直报"Could not write header for output file #0 (incorrect codec parameter

I am generating an animated gif from an mp4 ... but due (I think) to color reduction (gif requires -pix_fmt rgb24) the result is somewhat ... blotchy? like running an image through an oil paint (or maybe "posterize") special effect filter. I think that the quality could be better, but I don't know what to tweak.

Not sure about this ... but ooking at the color palette of the resulting gif in an image editor it does not even appear to have attempted to create a color palette specific to this clip, but instead is attempting to us a generic palette ... which wastes a lot of pixmap space. That is, if I am interpreting this correctly.

Any tips on preserving the original video image instead of getting a "posterized" animated gif?

ffmpeg gif
|
  this question
edited Nov 14 '13 at 18:46 Will 101k 41 252 348 asked Aug 10 '13 at 5:35 R. Hartman 16 3      You may be interested in this. –  Joachim Isaksson Aug 10 '13 at 5:39      See How do I convert a video to GIF using ffmpeg, with reasonable quality? –  LordNeckbeard Jan 4 '16 at 2:43

 | 

2 Answers
2

To get better looking gifs, you can use generated palettes. palettegen filter will generate a png palette to use with the paletteuse filter.

推荐:在Linux上将视频转换成动态gif图片 (附:ffmpeg和ImageMagick安装方法)

虽然曾经被认为是过时的艺术形式,但动态GIF图片现在复苏了。如果你还没有留意到,不少在线分享和社交网络网站都开始支持动态GIF图片,例如,Tumblr,Flickr,Go

ffmpeg -i input.mkv -vf palettegen palette.png
ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif

|
  this answer
answered Jan 4 '16 at 1:15 posit labs 3,385 2 17 41      See: blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html –  Bruno Bronosky Dec 5 '16 at 23:39

 | 

You can try using -vf format=rgb8,format=rgb24.


|
  this answer
answered Aug 5 '15 at 23:00 Jimmy Rustles 1

 | 

推荐:FFmpeg续篇:截取视频片段转成GIF动画

前段时间写过一篇文章,介绍了FFmpeg的几个常用的命令行。最近,项目里需要做一个把视频片段转成GIF动画的功能,便于用户分享到微博。惊奇地发现,原来强大的FFm


相关阅读排行


相关内容推荐

最新文章

×

×

请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品,请激活账号。

您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱

如果您没有收到激活邮件,请注意检查垃圾箱。

澳门银河网上官方赌场 <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <文本链> <文本链> <文本链> <文本链> <文本链> <文本链>