How the GIF is made
The page takes the part of the video you chose and draws it at 12 frames a second at the width you picked.
GIF can show at most 256 colours per frame, which is why many GIFs look blotchy. To avoid that, the page first builds a palette of the colours this particular clip actually uses, then draws every frame with it. Gradients and skin tones come out cleaner than with a generic palette.
The finished GIF is set to loop forever, the way GIFs are expected to behave in chats, docs and web pages.
Why GIFs are so large, and how to keep yours small
GIF is an image format from 1987. It stores each frame as a compressed picture and has none of the motion tricks modern video codecs use, so a GIF is usually many times larger than an MP4 of the same clip.
Three choices control the size. Length matters most: every second adds 12 more frames. Width matters next: a 640 px GIF has four times the pixels of a 320 px one. And content matters: a static screen recording compresses far better than shaky, detailed footage.
Start with 480 px and a few seconds, then adjust.
When a GIF is the right choice
A GIF plays everywhere without a play button: in emails, chat apps, issue trackers, README files, slides and documentation. That makes it ideal for a quick product demo, a reaction or a short how-to.
It has no sound, though, and long or high-resolution clips get heavy. If sound or length matters, keep the video and compress it as an MP4 instead.