>>1062
Forgot, but here's the commands in case anyone wants a way to make gifs.
First, use ffmpeg to create a list of images from the video frames (as seen in >>1057 )
ffmpeg -ss 00:00:00.000 -i INPUTFILE -t 00:00:00.000 -filter:v scale=w=400:h=400:force_original_aspect_ratio=decrease OUTPUTPATH/frame_%04d.png
Put the start time after -ss and the duration after -t. w=400:h=400 is the maximum width and height of the gif you want, around 400-600 is good for gifs. Replace INPUTFILE and OUTPUTPATH with whatever you want, I recommend outputting to an empty folder since it creates tons of files.
If you want to crop it, you can put it before the scale:
-filter:v crop=WIDTH:HEIGHT:X:Y,scale=w=...
You can also crop in the next step, but I don't have the command for that.
Next, use imagemagick to combine the frames into an optimized gif animation:
magick -delay 1xFRAMERATE INPUTPATH/frame_*.png -fuzz 2% -layers OptimizeFrame -layers OptimizeTransparency +fuzz OUTPUTFILE.gif
FRAMERATE must be the framerate of the video, for example 1x30 if the video is 30fps, see below. Again replace INPUTPATH and OUTPUTFILE with whatever. You can increase the fuzz value to improve filesize (it ignores pixels whose color changes less than 2%), but it may create artifacts, 1-3% seems usually fine.
You can find out the fps of a video by using ffprobe: ffprobe -hide_banner -i INPUTFILE there should be "xx fps" somewhere. If it's something like 29.97, then it's fine to just pretend it's 30.