Skip to content

Instantly share code, notes, and snippets.

@bmorris3
Created June 18, 2026 15:26
Show Gist options
  • Select an option

  • Save bmorris3/6b1a7e0a3ccada6ce7ea4e42fb7efff5 to your computer and use it in GitHub Desktop.

Select an option

Save bmorris3/6b1a7e0a3ccada6ce7ea4e42fb7efff5 to your computer and use it in GitHub Desktop.
Convert Mac QuickTime screen recordings to small-ish GIFs for readmes/docs
#!/bin/bash
# Convert a quicktime screen recording to a small-ish gif
#
# call signature:
# ./mov_to_gif.sh <filename>.mov
#
# output will be saved to <filename>.gif
input_file=$1
input_file_strip_extension=$(echo "$input_file" | cut -d '.' -f 1)
output_file="$input_file_strip_extension.gif"
ffmpeg -i "$input_file" -vf "fps=8,scale=1200:-1:flags=lanczos,split[a][b];[a]palettegen=max_colors=256[p];[b][p]paletteuse=dither=floyd_steinberg" -f gif - | gifsicle -j -O3 --delay=5 > "$output_file"
echo "Done: '$input_file' converted to '$output_file'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment