Streaming

Codec

Coder-Decoder

The technology that squeezes audio and video small enough to stream — and unsqueezes it for playback. The codec a service uses, as much as the resolution, decides how much bandwidth a stream actually needs.

A codec — short for coder-decoder — compresses media into a compact form for transmission and decompresses it for playback. Raw, uncompressed video is astonishingly large: a few seconds could fill the data budget of an entire movie. A codec applies clever compression to shrink that down to something streamable, then reverses the process on your device. Without codecs, internet video and voice calls as we know them would be impossible.

Why codecs matter for bandwidth

The key idea is efficiency: a better codec delivers the same visual quality at a lower bitrate, which means it needs less bandwidth. So the data a stream consumes is not set by resolution alone — it depends just as much on which codec encodes it. A 4K stream in a modern codec can require less bandwidth than an older codec would need for 1080p.

Video codecGenerationEfficiency
H.264 (AVC)Older, universalBaseline — widely supported
HEVC (H.265)Newer~50% less data than H.264 for similar quality
VP9Newer (royalty-free)Comparable to HEVC; common on web video
AV1Newest (royalty-free)Most efficient; best quality per bit

Audio codecs too

Codecs are not just for video. Audio codecs compress sound: AAC and MP3 for music and media, and Opus for real-time voice and VoIP because it sounds good at very low bitrates and adapts to changing network conditions. On a video call, separate video and audio codecs work together, which is why a call can keep audio clear even when it drops the video to save bandwidth.

The decoding catch

Compression is only half the deal — your device must be able to decode the codec, ideally in dedicated hardware. Hardware decoding is fast and power-efficient; software decoding (falling back to the CPU) works but drains battery and can stutter on high resolutions. A device that lacks support for a newer codec like AV1 may play such videos poorly or not at all. This is why streaming platforms encode each title in several codecs and serve whichever one your device can decode efficiently — balancing bandwidth savings against device compatibility.

Codecs and adaptive streaming

Modern streaming combines an efficient codec with adaptive bitrate delivery: the service offers the same content at several quality levels and the player switches among them based on your connection. The codec sets how much quality fits into each bandwidth tier, and adaptation picks the tier. Together they explain why a stream can look great on a fast connection and gracefully step down to keep playing on a slow one, rather than stopping to buffer.

Related Terms

More From This Section