Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webinista/4e9c06693b9087cebc57ed944e3b4396 to your computer and use it in GitHub Desktop.
Save webinista/4e9c06693b9087cebc57ed944e3b4396 to your computer and use it in GitHub Desktop.
Tested on macOS 11.3.1 with ffmpeg installed with homebrew
Use the h264_videotoolbox codec. -b:v is the bitrate flag. Using a higher
bitrate improves quality, but increases file size.
760k (include the k!) gives a nice balance between quality and file size.
ffmpeg -i input.gif -vcodec h264_videotoolbox -b:v 760k output.h264.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment