Video Formats for the Web: Codecs, Weight and Compatibility
Video on a website lives by different rules than video for viewing. Here start-up speed and compatibility matter more than maximum quality — a clip that never played has no quality at all.
Which codec
H.264 remains the default: every browser understands it, including old ones, and so does every mobile device. Newer codecs compress better but require a fallback, which doubles both the work and the storage.
Choose a profile below the highest: Main rather than High enlarges the file slightly but guarantees playback on weak hardware.
Faststart
A file contains a service block acting as its table of contents. By default it often ends up at the end — forcing the browser to download the whole file before playback can begin. Moving the block to the front solves this and costs nothing. Without it, a short clip starts several seconds late.
Resolution by actual display size
The commonest mistake is loading a 1080×1440 frame into a window 250 pixels wide. Look at the size of the element on the page and take a twofold margin for high-density screens. Anything beyond that is wasted data and needless load on the decoder.
Frame rate
For short loops, twenty-five to thirty frames is plenty. Sixty doubles both weight and load, and the difference on a five-second clip is barely legible.
Weight benchmarks
- A five-second loop — 300 to 600 kilobytes
- A ten-second clip — up to one and a half megabytes
- Strip audio if it is not needed: it does not play but it does download
Read next
Why Heavy Media Kills a Site, and What to Do About It The Vertical Frame: Why 3:4 and 9:16 Displaced Everything Else Storing a Shoot Archive: Losing Nothing and Leaking Nothing A History of Photo Manipulation: From Pencil on Glass to Neural NetworksThis material is intended for adults over 18 and is informational in nature.