GIF is a poor video format
GIF dates from 1987 and was never designed for video. It is limited to 256 colours per frame, uses lossless LZW compression that performs badly on photographic content, and has no interframe motion compensation of the kind every video codec relies on. The result is that a three-second clip can be several megabytes as a GIF and a few hundred kilobytes as MP4.
The colour limit is the most visible constraint. Reducing a video frame's thousands of colours to 256 produces banding in gradients and skies, and dithering trades that banding for visible noise — which also destroys compression efficiency, because the noise is exactly what LZW cannot compress.
Where the destination accepts video, use video. Most social platforms now convert uploaded GIFs to MP4 or WebM internally, so uploading a GIF means your quality loss happens first and theirs happens second. GIF remains genuinely necessary only where autoplay in an image context is required — email clients, some documentation systems, chat platforms that render images but not video.
Keeping the file small
Four levers control GIF size, in roughly descending order of effect. Dimensions matter most, since data scales with area — halving width and height leaves a quarter of the pixels. Frame count is next: reducing from 30 frames per second to 12 or 15 more than halves the file, and for most screen recordings and reaction clips the result is entirely acceptable.
Duration should be as short as the content allows. GIF has no temporal compression, so every frame carries close to its full cost and file size scales almost linearly with length. Trimming two seconds off a five-second clip removes 40 percent of the file.
Palette optimisation is the last lever. A palette computed from the clip's actual colours beats a generic one substantially, and where the background is static, restricting the palette to the moving region helps further. Disabling dithering produces flatter but much smaller files, which suits screen recordings and flat graphics well and photographic content poorly.
Getting motion to look right
GIF frame timing is stored in hundredths of a second, which means frame rates must divide into 100 to be exact. Ten frames per second is 10 hundredths per frame and precise; 30 frames per second is 3.33 hundredths and cannot be represented exactly, so playback is slightly irregular. Choosing 10, 12.5, 20 or 25 frames per second avoids the problem.
Browsers also enforce a minimum frame delay, historically clamping anything below 2 hundredths to 10 — so a GIF authored at 50 frames per second may play at 10. Authoring above 25 frames per second is generally wasted.
For a seamless loop, the last frame must lead naturally back into the first, which usually means choosing cut points where the subject is in a similar position rather than trimming to an arbitrary duration. Content with a static background loops far better than a moving camera, which is why screen recordings and locked-off shots make the best GIFs.