Download and install:
- ffmpeg (https://www.ffmpeg.org/)
- gifsicle (https://www.lcdf.org/gifsicle/)
You can do it directly in terminal with Homebrew:
$brew install ffmpeg
$brew install gifsicle
If you don't have Homebrew, check out their official site on how to install it: https://brew.sh/