New: Enveu Flow is now generally available — automate media operations alongside Experience Cloud. Learn more
Streaming Architecture

Codec

Reviewed by Sonu · OTT & StreamingLast updated: 2026-06-30

A codec (coder-decoder) compresses raw video for efficient streaming and decompresses it for playback. The codec you choose sets the trade-off between video quality, file size/bandwidth, and device compatibility across your OTT audience.

Enveu take
There's no single 'best' codec — most platforms ship H.264 for universal reach and add H.265/AV1 for bandwidth savings on devices that support them.
EncodingCompressionPlayback

Where it fits in the OTT stack

SourceEncoder/CodecPackagerPlayer

How it works

  1. The encoder applies a codec to compress raw video into a smaller stream.
  2. The compressed stream is packaged (e.g. HLS/DASH) and delivered.
  3. The player decodes it back to frames for display.
  4. Different codecs offer different compression efficiency and device support.

Key components

  • Codec standard (H.264, H.265/HEVC, AV1, VP9)
  • Encoder settings (bitrate, profile, GOP)
  • Hardware vs software decode support on devices
  • Licensing/royalty considerations

Performance impact

  • Better codecs cut bandwidth and CDN cost at equal quality
  • Newer codecs may lack support on older devices
  • Decode load affects battery and playback on low-end hardware

Common issues

  • Using a codec a target device can't hardware-decode
  • Royalty/licensing surprises with HEVC
  • Over-compressing and introducing visible artifacts

How to choose

  • Ship H.264 as the universal baseline
  • Add H.265/AV1 for bandwidth-sensitive or 4K delivery where supported
What to weigh
  • Device decode support matrix
  • Bandwidth/CDN cost per stream
  • Visual quality at target bitrate

Real-world example

Cutting CDN cost with a second codec
A VOD platform's 4K delivery was expensive on H.264.
Challenge
  • High bitrate per 4K stream inflated CDN egress
  • Older devices still needed broad support
Action taken
  • Added an H.265 ladder for capable devices
  • Kept H.264 as fallback for universal compatibility
Outcome
Bandwidth per 4K stream dropped substantially on supported devices, lowering delivery cost without breaking older clients.

Frequently asked questions

What's the difference between a codec and a container?
A codec compresses/decompresses the video itself (H.264, H.265, AV1). A container (MP4, TS, CMAF) is the file format that wraps the encoded video, audio, and metadata together.
Which video codec is best for streaming?
H.264 has the widest device support; H.265 (HEVC) and AV1 compress better (lower bandwidth at equal quality) but aren't supported everywhere. Most platforms use H.264 as a baseline and add a newer codec where devices allow.
Does the codec affect streaming cost?
Yes — a more efficient codec delivers the same quality at a lower bitrate, which directly reduces CDN egress and storage costs.
Which video codec should I use for streaming?
H.264 for the widest device compatibility, and HEVC or AV1 to cut bandwidth on 4K/HDR where devices support them. Many services encode multiple codecs and let the player pick, balancing reach against delivery cost.
Does changing codec require re-encoding my whole library?
Yes — codecs aren't interchangeable at the file level, so adding HEVC or AV1 means transcoding each asset into the new codec, usually as extra renditions alongside H.264. Many teams do this just-in-time or only for their most-watched titles to control cost.
Build it with Enveu
Encode and deliver on any codec
Enveu's pipeline transcodes to the right codec ladder per device and streams it adaptively across every screen.