ffmpeg -y -i input.mp4 -filter_complex "fps=5,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=32[p];[s1][p]paletteuse=dither=bayer" output.gif
For webm
videos, two passes should be made. on Windows, redirect to NUL
instead of /dev/null
ffmpeg -i input.mp4 -b:v 0 -crf 30 -pass 1 -an -f webm -y /dev/null
ffmpeg -i input.mp4 -b:v 0 -crf 30 -pass 2 output.webm
Select frame 34
ffmpeg -i <input> -vf "select=eq(n\,34)" -vframes 1 out.png