GIF video thumbnail with FFmpeg
There is thumbnail filter just for that, and palettegen/paletteuse to create high quality gif.

Example command: "scale=vga,thumbnail=100,split[a][b],[b]palettegen=reserve_transparent=0:stats_mode=single[b];[a][b]paletteuse=new=1,settb=1/25,setpts=N"

Thumbnail filter selects one frame from set of 100 frames. To get gif of 3 secs, you will need to adjust this number to smaller or bigger value depending on source file number of frames.