美文网首页
Mac上制作项目效果的GIF图

Mac上制作项目效果的GIF图

作者: nadou23 | 来源:发表于2017-10-17 10:15 被阅读11次

第一步:打开终端,依次输入命令(如果还没有安装brew, 点击这里参考安装)

brew install ffmpeg

brew cask install xquartz #dependency for gifsicle, only required for mountain-lion and above

open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # runs the XQuartz installer

brew install gifsicle

注:其中2.7.4是版本号 ‘open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # runs the XQuartz installer’ 不是必须的 可能上一句就可以把这个步骤完成了 看你安装的版本 我的是2.7.11就不用这步

第二步 安装成功后,打开QuickTime,见下图

屏幕快照 2017-10-17 上午10.06.32.png

第三步 右键点击QuickTime新建屏幕录制

屏幕快照 2017-10-17 上午10.08.28.png

录制好后保存到本地,比如我保存到download文件夹,命名为video1

第四步 再次打开终端,输入

ffmpeg -i /Users/tz/Downloads/video1.mov -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > /Users/tz/Downloads/video1.gif


对应的参数说明

ffmpeg -i 视频位置 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > 输出gif位置

当然,里面参数可以改
-r 10tells ffmpeg to reduce the frame rate from 25 fps to 10

-s 600x400tells ffmpeg the max-width and max-height

--delay=3tells gifsicle to delay 30ms between each gif

最后成功之后是这样的

out4.gif

相关文章

网友评论

      本文标题:Mac上制作项目效果的GIF图

      本文链接:https://www.haomeiwen.com/subject/lkpruxtx.html