Skip to content

Instantly share code, notes, and snippets.

@holgergp
Last active February 5, 2024 13:12
Show Gist options
  • Save holgergp/facb980c78c5f787966acc772ac4cef8 to your computer and use it in GitHub Desktop.
Save holgergp/facb980c78c5f787966acc772ac4cef8 to your computer and use it in GitHub Desktop.
This is my little script to convert (screengrabbed-) movs to gifs to paste them into docs. This is just a tiny wrapper around ffmpeg and gifsicle. Obviously ffmpeg and gifsicle need to installed. I use ffmpeg version 6.6.1 and gifsicle in version 1.94
#!/bin/sh
while getopts f: flag
do
case "${flag}" in
f) inputFilename=${OPTARG};;
esac
done
ffmpeg -i $inputFilename.mov -pix_fmt rgb8 -r 10 $inputFilename.gif && gifsicle -O3 $inputFilename.gif -o $inputFilename.gif
@jkempff
Copy link

jkempff commented Feb 5, 2024

Very nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment