Converting .mov to .gif with MacOS automator quick action

Mov To Giv Automator

I really love automator scripts, especially as quick actions to automate some simple workflows. One of those is converting .mov files (created by MacOS screencasts for example) to small .gif files that you can easily send via email.

You will then have a quick action after right clicking any .mov file and can simply convert it to a small and optimised .gif file.

  • fire up automator
  • create a new quick action
  • add a shell script to your workflow
  • paste the following code and don’t forget to choose “as arguments” in the pass input dropdown
  • save it
for f
do
    if [[ $f == *.mov ]]; then
        /usr/local/bin/ffmpeg -i "$f" -pix_fmt rgb24 -r 10 -f gif - | /usr/local/bin/gifsicle --optimize=3 > "$f".gif
    fi
done

This is how everything should look after you are finished.

mov_to_giv_automator

You need ffmpeg and gifsicle installed so if you haven’t install them via homebrew.

brew install ffmpeg
brew install gifsicle