DEV Community

Derek Crosson
Derek Crosson

Posted on

MacOS Convert Video to GIF

Yesterday I needed to convert a video screen recording I made to a GIF in order to upload to Github. I discovered that this can be done quickly and easily with a terminal tool called ffmpeg. Here's how you do it:

Install ffmpeg and gifsicle (if not installed)

brew install ffmpeg
brew install gifsicle

Convert the video to GIF

ffmpeg -i Screen\ Recording\ 2020-09-11\ at\ -s 1440x900 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > screen-recording.gif

Replace Screen\ Recording\ 2020-09-11\ at\ with the path to the video file and screen-recording.gif with the path to the GIF you want to create.

Hope this helps someone :)

Top comments (0)