TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

High quality GIF with FFmpeg

482 点作者 ux大约 10 年前

16 条评论

dangerlibrary大约 10 年前
ffmpeg is downright magical - just don&#x27;t get caught using the one in the Ubuntu&#x2F;Debian repositories. Compile your own ffmpeg if you have any need to do serious work; the Libav fork just isn&#x27;t as capable. The reasons are obvious if you look into the development philosophies of the two projects.<p><a href="https://github.com/mpv-player/mpv/wiki/FFmpeg-versus-Libav" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mpv-player&#x2F;mpv&#x2F;wiki&#x2F;FFmpeg-versus-Libav</a>
评论 #9213386 未加载
评论 #9214751 未加载
评论 #9214608 未加载
评论 #9214296 未加载
评论 #9213993 未加载
quotedmycode大约 10 年前
So it&#x27;s using a simple Median Cut quantization... which is okay, but you can get great results using an octree quantizer, and without dithering. Dithering kills your compression savings in GIF so you&#x27;d want to avoid it if possible. In any case, you can see the difference a better quantizer makes here:<p><a href="http://www.leptonica.com/color-quantization.html" rel="nofollow">http:&#x2F;&#x2F;www.leptonica.com&#x2F;color-quantization.html</a>
评论 #9215040 未加载
评论 #9213599 未加载
评论 #9215762 未加载
评论 #9214581 未加载
评论 #9213671 未加载
1ris大约 10 年前
&gt;As you probably know, GIF is limited to a palette of 256 colors.<p>No, it&#x27;s not. OK, the current, wrong, implementations do limit it to 256 colors, but that&#x27;s not a limitation of gif. Mulitple frames without a delay allow multiple pallets and multiple times 265 colors.<p>But this limitation is just another reason not to use it.<p>Can I use Webm?<p><a href="http://caniuse.com/#feat=webm" rel="nofollow">http:&#x2F;&#x2F;caniuse.com&#x2F;#feat=webm</a><p>Yes, you can, and you should. Or h.264:<p><a href="http://caniuse.com/#feat=mpeg4" rel="nofollow">http:&#x2F;&#x2F;caniuse.com&#x2F;#feat=mpeg4</a>
评论 #9214075 未加载
评论 #9214744 未加载
评论 #9214191 未加载
评论 #9216881 未加载
artursapek大约 10 年前
I use this shell script for generating gifs out of .mov files: <a href="https://gist.github.com/artursapek/5b3d15ecac5ff75593c4" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;artursapek&#x2F;5b3d15ecac5ff75593c4</a><p>I can probably improve it further by using some of what&#x27;s in this article, but it&#x27;s already faster and better than any online tool I&#x27;ve found.
评论 #9213425 未加载
评论 #9213616 未加载
FranOntanaya大约 10 年前
ffmpeg doesn&#x27;t get nearly enough credit. As long as you can grok the various settings, it makes you feel like McGyver with a paperclip. We work often with media from unusual sources, and after the first &quot;can we do this with ffmpeg&quot; filter there&#x27;s very little left to handle.
Pephers大约 10 年前
This is pretty cool. I use GIFs for marketing for my SaaS startup[1] because it has the best support for autoplaying across devices, but the file sizes are a bit high (690 KB and 270KB for screencasts of a few minutes each). I use licecap[2] for recording and Gifsicle for optimizing, but perhaps I should give ffmpeg a go and compare the results.<p>[1] <a href="https://zapla.co" rel="nofollow">https:&#x2F;&#x2F;zapla.co</a><p>[2] <a href="http://www.cockos.com/licecap/" rel="nofollow">http:&#x2F;&#x2F;www.cockos.com&#x2F;licecap&#x2F;</a>
theophrastus大约 10 年前
This is an interesting discussion, thank you. It would be great to see it compared with the parallel ImageMagick methods: <a href="http://www.imagemagick.org/Usage/anim_opt/" rel="nofollow">http:&#x2F;&#x2F;www.imagemagick.org&#x2F;Usage&#x2F;anim_opt&#x2F;</a>
评论 #9213664 未加载
syoc大约 10 年前
There is no reason to create new content in .gif and not webm as of now. FFmpeg is really nice though.
评论 #9215088 未加载
mplewis大约 10 年前
I wanted to use FFmpeg in an iOS app, but I ran into licensing issues—the FFmpeg wrapper [1] and FFmpeg itself [2] are both LGPL 2.1, which I didn&#x27;t think you could use in an iOS app.<p>Since this project does exactly that, I took a second look and found a discussion on that specific use case [3]. It didn&#x27;t quite clarify things, but it looks like it _might_ be legal to use FFmpeg in an app.<p>[1] <a href="https://github.com/OpenWatch/FFmpegWrapper" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;OpenWatch&#x2F;FFmpegWrapper</a> [2] <a href="https://www.ffmpeg.org/legal.html" rel="nofollow">https:&#x2F;&#x2F;www.ffmpeg.org&#x2F;legal.html</a> [3] <a href="https://trac.ffmpeg.org/ticket/1229" rel="nofollow">https:&#x2F;&#x2F;trac.ffmpeg.org&#x2F;ticket&#x2F;1229</a>
评论 #9214101 未加载
neeee大约 10 年前
Gifsicle is very good at making highly optimized GIFs, but slightly more cumbersome as you have to convert each frame to a separate image first.<p><a href="http://www.lcdf.org/gifsicle/" rel="nofollow">http:&#x2F;&#x2F;www.lcdf.org&#x2F;gifsicle&#x2F;</a>
oakwhiz大约 10 年前
What would be really cool is if ffmpeg&#x2F;avconv gained the ability to create lossy LZW GIFs, like in this tool:<p><a href="https://github.com/pornel/giflossy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pornel&#x2F;giflossy</a>
sorenjan大约 10 年前
Nice article and good job implementing it. I would have preferred a small explanation of the filter graph option (-lavfi), but I guess that&#x27;s outside the scope of the post.
评论 #9214038 未加载
lnanek2大约 10 年前
The improved screenshots do look quite improved, with less screen door effect. Nice.
simas大约 10 年前
Very nice of you to share this with the community! Examples are just awesome.
pkhamre大约 10 年前
I like your domain.
imaginenore大约 10 年前
And to complete the circle, run the gif through Gfycat and check out the mindblowing bandwidth savings:<p><a href="http://gfycat.com/IllustriousHairyGermanpinscher" rel="nofollow">http:&#x2F;&#x2F;gfycat.com&#x2F;IllustriousHairyGermanpinscher</a><p>GIF: 1 MB<p>Video: 73k
评论 #9214213 未加载
评论 #9213438 未加载
评论 #9213492 未加载
评论 #9213679 未加载
评论 #9213797 未加载
评论 #9215662 未加载