gif-edit

Installation
SKILL.md

gif-edit

A GIF is the format where the obvious approach is usually wrong: frames animate, so a decision that looks right on the settled frame breaks during the build-in. Work from frames, check across the whole timeline, encode last.

A mechanical change (resize, retime, trim, text swap) is: make it, check the encoded file, deliver. The camera and size work in references/camera-retime-size.md is for screen recordings that need it.

cd /workspace/projects/<slug>
ffprobe -v error -select_streams v:0 -show_entries stream=width,height,nb_frames,avg_frame_rate in.gif
mkdir -p frames && ffmpeg -i in.gif -fps_mode passthrough frames/f-%04d.png   # edit frames, not the gif
ffmpeg -framerate 20 -i frames/f-%04d.png -filter_complex \
  "[0:v]split[a][b];[a]palettegen=stats_mode=diff[p];[b][p]paletteuse=dither=bayer" renders/out.gif

The traps

Installs
1
GitHub Stars
548
First Seen
7 days ago