Macbook使用gifify免费制作gif动态图

274 阅读1分钟

在写文章的时候,需要演示实际的操作步骤,单单放一个静态图片让读者不能更深刻的看到操作过程,所以学习了一下使用Macbook电脑自带的QuickTime Player工具加上gifify工具实现自己录制制作gif动态图,详细教程请继续往下看。

一、具体实现

1. QuickTime Player录制视频
打开Macbook自带的QuickTime Player工具。

依次点击,文件->新建屏幕录制。

点击录制所选部分,框选所需要录制的区域,依次点击选项-> 文稿(方便查找)->录制即可。

2. gifify工具mov转换gif

gifify开源地址:github.com/jclem/gifif…

# 安装工具,安装卡或者慢的继续观看文章,后面有解决方案# gifify开源项目地址:https://github.com/jclem/gifify
brew install gifify
# 切换到视频保存目录
cd Documents
# 重命名一下视频文件,原文件名太长转换会报错,也可以鼠标右键重命名
mv 屏幕录制2023-09-09\ 14.55.15.mov 1.mov 
# 转换为gif
gifify 1.mov -o 1.gif

3 brew切换国内源(可选操作)

# brew安装慢或者没有反应,默认是github的源是国外的所以访问慢,所以需要换国内源,这里换的是清华的源
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
brew update


二、实现效果

生成之后的gif图片可能有点大,可以在线压缩一下:免费在线 GIF 动图压缩工具 - docsmall