Skip to main content
Codec & Encoding

CodecCoder-Decoder

A codec (coder-decoder) is software or hardware that compresses raw video data for efficient storage and transmission, then decompresses it for playback. Without codecs, a single minute of uncompressed 1080p video would require over 10 GB of storage. Modern codecs reduce this to just 50-150 MB while maintaining visual quality.

How video codecs work

Video codecs exploit two types of redundancy to compress data: spatial redundancy (similar pixels within a single frame) and temporal redundancy (similar content between consecutive frames). The encoder analyzes each frame, predicts content based on previous frames, and stores only the differences.

  • Intra-frame compression: removes redundancy within a single frame (similar to JPEG)
  • Inter-frame compression: stores only differences between consecutive frames
  • Motion estimation: predicts how objects move between frames to reduce data
  • Quantization: reduces precision of less visually important data
  • Entropy coding: applies lossless compression to the final bitstream

Common video codecs

The video industry has evolved through several generations of codecs, each offering better compression efficiency at the cost of increased encoding complexity.

CodecYearEfficiency vs H.264Browser supportLicense
H.264 / AVC2003BaselineUniversalLicensed (MPEG LA)
H.265 / HEVC2013~50% betterSafari, EdgeLicensed (complex)
VP92013~30-40% betterChrome, Firefox, EdgeRoyalty-free (Google)
AV12018~50% betterChrome, Firefox, Edge, Safari 17+Royalty-free (AOMedia)

Codec vs container format

A common source of confusion is the difference between a codec and a container format. The codec defines how video is compressed (H.264, VP9, AV1). The container format defines how compressed video, audio, subtitles, and metadata are packaged together (MP4, WebM, MKV). One container can hold different codecs: for example, an MP4 file can contain H.264 or H.265 video.

How Videas handles codecs

Videas produces two codecs for every uploaded video: H.264, which plays everywhere, and VP9, which reaches the same quality at roughly 30% less bitrate. The player queries the viewer's browser and serves the most efficient version it can decode — VP9 on Chrome, Firefox and Edge, H.264 on Safari and on older devices. All from a single upload: the interface exposes no codec choice.

Frequently asked questions

What is a video codec?+

A video codec is software that compresses (encodes) video for storage and transmission, then decompresses (decodes) it for playback. Common codecs include H.264, H.265, VP9 and AV1.

Which codec should I use for web video?+

H.264 remains the safest choice for universal compatibility, but newer codecs like VP9 and AV1 compress significantly better at the same quality. Videas produces H.264 and VP9 for every video and serves each viewer the one their browser can decode.

What is the difference between H.264 and H.265?+

H.265 (HEVC) achieves roughly 50% better compression than H.264 at the same visual quality. In exchange, browser support is limited and licensing is complex. VP9 and AV1 offer comparable gains, with wider availability and royalty-free terms.

Which codecs does Videas produce?+

H.264 and VP9 for every quality level, plus an AAC audio track. There is nothing to choose: the interface exposes no codec setting, and the same treatment is applied to every video.

Does Videas accept H.265, AV1 or ProRes?+

On upload, yes: these are input formats, accepted and converted automatically, just like MP4, MOV, AVI, MKV or WebM. On the way out, delivery stays H.264 and VP9.

How does the player choose the codec?+

The HLS manifest declares both versions and the player queries the browser. Chrome, Firefox and Edge decode VP9 and get the lighter version; Safari and older devices get H.264. The choice happens at playback, not at upload.

Does the codec change perceived quality?+

At equal bitrate, yes: a more efficient codec produces a cleaner image. That is what lets the VP9 Videas serves be lighter than H.264 without looking worse.

Why not deliver in AV1 only?+

Because not every browser decodes it yet, and because it is far slower to encode. Serving a codec a viewer cannot read means serving a black screen: compatibility comes before saving bandwidth.

What is the difference between a codec and a container?+

The codec defines how the image is compressed (H.264, VP9, AV1). The container defines how video, audio, subtitles and metadata are packaged together (MP4, WebM, MKV). The same container can carry different codecs.

Which audio codec does Videas use?+

AAC, at 128 kbps in 48 kHz stereo. It is the most universally supported audio format, and it is produced first on upload — before the higher video qualities — so the video becomes playable as soon as possible.