Converting .mov to .gif with FFmpeg [macOS Edition]

Tadashi Shigeoka ·  Thu, December 10, 2020

I’ll introduce how to convert .mov to .gif using FFmpeg on macOS.

FFmpeg

Background: Want to Convert .mov to .gif with FFmpeg

I converted .mov files recorded with iPhone camera to .gif using FFmpeg to upload them to GitHub issues.

ffmpeg Help

$ ffmpeg -h                              
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers

usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Video options:
-r rate             set frame rate (Hz value, fraction or abbreviation)

Converting .mov to .gif with ffmpeg Command

ffmpeg -i IMG_1234.MOV scale=880:-1 -r 12 output.gif

Here’s an explanation of the options:

  • scale=880:-1 Width of 880 pixels while maintaining aspect ratio
  • -r 12 Convert at 12 frames per second

Testing the .gif File

open -a /Applications/Google\\ Chrome.app output.gif

That’s all from the Gemba on converting .mov to .gif with FFmpeg on macOS.