Real World Maths Busters

The Maths Behind Everyday Life

The story, the formula and a worked example — see exactly where this maths shows up in the world around you.

Back to all stories
Technology 3 min read

Why that "small" GIF is bigger than the video

GIFs store every frame crudely; video compresses the changes between frames.

A looping GIF often weighs more than the same clip as an MP4. GIF stores each frame separately with a limited palette, while modern video only records what changes from frame to frame.

Per-frame vs between-frame coding

GIF size grows with every full frame; video uses inter-frame compression, storing mostly the differences, so size scales with motion, not frame count.

GIF≈∑frames,  video≈∑changes\text{GIF} \approx \sum \text{frames}, \;\text{video} \approx \sum \text{changes}

Why video wins

A 5-second clip

Compare the formats.

GIF vs MP4

  1. 1

    GIF

    Every frame stored with a 256-colour palette — can be several MB.

  2. 2

    MP4

    Only frame-to-frame changes stored — often a fraction of the size.

Answer

Video compression beats GIF whenever there is little change between frames.

The formula behind it

Format Size

∑frames vs∑changes\sum \text{frames vs} \sum \text{changes}

The takeaway

GIFs store whole frames; video stores changes. That is why an MP4 is usually far smaller than the equivalent GIF.

Back to all stories