Every video you have ever watched passed through a codec — the algorithm that squeezes moving images into files small enough to store and send. Codecs are why a raw movie shoot fills hard drives and the same movie streams over your phone line. And the three names you will actually meet — H.264, H.265, AV1 — are not interchangeable labels. Which one your video uses decides its size, its quality, and whether it plays on the device in front of you.
Here is what a codec actually does, and how to choose between the big three.
What a codec is (in one paragraph)
Raw video is absurd: uncompressed 1080p is roughly 1.5 gigabits per second — a phone couldn't store thirty seconds of it. A codec (coder-decoder) describes each frame in terms of what changed since the last one, what the eye will and won't notice, and mathematic tricks to throw away the rest. The encoder squeezes on the way in; the decoder rebuilds on the way out. Different codecs are different generations of this trickery: newer ones throw away less visible detail at smaller sizes — but need newer hardware to decode.
H.264 (AVC): the universal baseline
Released 2003, and still the format everything on earth can play — every browser, phone, TV, game console, editor.
**Strengths:** total compatibility, hardware decoding in literally everything, encoders are mature and fast.
**Weakness:** size. It needs roughly twice the bitrate of H.265 for the same visual quality.
**Use it when:** maximum reach matters — sharing files with strangers, old devices in the loop, or "it just has to work everywhere."
H.265 (HEVC): the efficiency upgrade
Half the size of H.264 at the same quality — the reason modern phones default to it for recording.
**Strengths:** big size savings, hardware decode in most devices from the last several years.
**Weaknesses:** licensing mess made browser support patchy (Firefox historically, some Linux setups), and old devices can't decode it at all — the file plays as silence and a black screen.
**Use it when:** you control the playback devices, or the video goes through a platform that transcodes anyway.
AV1: the open future
The newest major codec, royalty-free by design, another 30–50% smaller than H.265 at equal quality. YouTube and Netflix already serve it where they can.
**Strengths:** best compression, no licensing landmines, all modern browsers decode it.
**Weaknesses:** encoding is slow (hardware encoders only now arriving), older devices can't play it.
**Use it when:** serving modern audiences over bandwidth you pay for. For personal sharing in 2026, it's still the early-adopter choice.
The practical decoder (pun intended)
"Will it play where it's going?"
Check the oldest device in the chain. H.264 always plays; H.265 plays on most things from recent years; AV1 on current software.
"How much does size matter?"
Sending a file to one person: barely — use H.264 and stop thinking. Storing an archive: H.265 halves the disk bill. Serving thousands of streams: AV1's royalty-free efficiency is why platforms are all-in on it.
"Who pays the licensing?"
For personal use: nobody, ignore it. For products and platforms: AV1 exists precisely because H.264/H.265 royalties annoy companies. That's why open platforms transcode your uploads into modern codecs server-side — s.pub, for instance, handles the ladder so you never think about codecs at all.
What about MP4?
MP4 is not a codec — it's a container, the box that holds the video stream (the codec's output), the audio stream, and metadata. "An MP4" usually means "H.264 video + AAC audio in an MP4 box" — the safest possible combination. When something won't play, the fix is often re-boxing or re-encoding the stream, not the container.
The rule of thumb
Default to H.264 for sharing, H.265 for storage, AV1 if you are a platform or an enthusiast. Better yet — upload the highest-quality file you have to a video platform and let its transcoders produce all three generations for you, matched to every viewer's device. That's what they're for.
No comments yet