Skip to content

Instantly share code, notes, and snippets.

@wteuber
Last active January 23, 2026 15:51
Show Gist options
  • Select an option

  • Save wteuber/28fd2efe46738399475807aedc3e713e to your computer and use it in GitHub Desktop.

Select an option

Save wteuber/28fd2efe46738399475807aedc3e713e to your computer and use it in GitHub Desktop.
Convert video to animated GIF
#!/usr/bin/env bash
# Convert all mp4 videos in the current directory to animated GIF files.
# https://github.com/ImageOptim/gifski?tab=readme-ov-file#from-ffmpeg-video
for f in *.mp4; do
ffmpeg -i "$f" -f yuv4mpegpipe - | gifski --fps 15 --width 480 -o "${f%.mp4}.gif" -
done
@wteuber
Copy link
Author

wteuber commented Jan 23, 2026

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