1- Install ffmpeg : https://linuxhint.com/convert-video-to-gif-linux/
2- use the below command to create a git with small size
## size 800
ffmpeg -y -i 2.mp4 -filter_complex "fps=5,scale=800:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=32[p];[s1][p]paletteuse=dither=bayer" output.gif