Glossary

Codec

Software that encodes and decodes digital media — compressing video or audio for storage and decompressing it for playback.

Last updated

What Is a Codec?

Codec is a portmanteau of coder/decoder. It is software (or hardware) that encodes a media stream into a compressed format for storage or transmission, and decodes it back to raw audio or video for playback.

Container vs Codec

This distinction causes most "video won't play" confusion:

Container (MP4, MKV, AVI, MOV) — the outer wrapper file. Stores multiple streams (video, audio, subtitles) and synchronises them.

Codec (H.264, H.265, VP9, AAC, MP3) — the compression algorithm used on the data inside the container.

An MP4 file can contain H.264 video + AAC audio, or H.265 video + MP3 audio, or many other combinations. When a video "won't play," the problem is usually that the device has the container library but not the codec for the stream inside.

Common Video Codecs

CodecContainerQuality/SizeSupport
H.264 (AVC)MP4, MKVGood — baseline standardUniversal
H.265 (HEVC)MP4, MKV~50% smaller than H.264Most modern devices
VP9WebMSimilar to H.265Chrome, Firefox
AV1WebM, MP4Best compressionGrowing support
MPEG-2MPEG, VOBOlder — large filesDVD players

Common Audio Codecs

CodecContainerUse Case
AACMP4, M4AStreaming, Apple devices
MP3MP3Universal music
FLACFLAC, MKVLossless audio
OpusWebM, OGGWebRTC, Discord voice
AC3 (Dolby)MP4, MKVSurround sound

Why Codec Errors Happen

"Cannot play this video" or "no audio" errors occur when the playback device lacks the decoder for the codec used in the file. Solutions:

  • Install VLC (plays virtually any codec on any OS — free)
  • Install K-Lite Codec Pack (Windows)
  • Re-encode the file to a universally supported codec (H.264 + AAC)