Glossary · Streaming technology

What is a video codec?

A codec is the algorithm used to compress video or audio for storage and delivery and to decompress it for playback. The name combines coder and decoder. The choice of codec determines how small a file is at a given quality and which devices can play it.

The main video codecs in streaming

  • H.264 (AVC): plays on practically every device; the universal baseline
  • H.265 (HEVC): roughly 40% to 50% smaller than H.264 at the same quality; standard for 4K and HDR; well supported on televisions and Apple devices
  • VP9: Google's royalty-free codec, similar in efficiency to H.265; common in Chrome and on Android
  • AV1: royalty-free and roughly 30% more efficient than H.265; hardware support growing on newer devices

Audio codecs

  • AAC: the standard for streaming audio, supported everywhere
  • Dolby Digital and Dolby Digital Plus: surround sound for films and television
  • Opus: efficient and royalty-free, used mainly with WebRTC and on the web

Codec vs container

A codec compresses the video. A container, such as MP4 or MKV, is the file format that holds the compressed video, audio and subtitles together. An MP4 file may contain H.264 or H.265; the extension alone does not tell you which.

How to choose

Three things pull against each other: compression efficiency, which lowers delivery cost; device support, which decides who can play it; and encoding cost, which rises steeply with newer codecs. Licensing terms differ too.

The usual answer is more than one. Encode everything in H.264 so that it plays everywhere, and add a more efficient codec for 4K and for your most-watched titles, where the saving in delivery outweighs the extra encoding and storage.

Last reviewed

FAQ

Codec, answered.

More definitions in the streaming glossary.

Planning a streaming service?
What does codec stand for?

Coder-decoder, or compressor-decompressor.

Which codec is best for streaming?

H.264 for reach, since everything plays it. H.265 or AV1 where devices support them and the delivery saving justifies a second encode.

Is MP4 a codec?

No. MP4 is a container. The video inside it is compressed with a codec such as H.264.

Ready to own the screen?

Tell us what you are launching. We will walk through the platform and map the path to go-live around your catalog, markets and revenue model.