Video Codec

/ˈvɪdi.oʊ ˈkoʊdɛk/

noun — "algorithm for compressing and decompressing digital video."

Video Codec is a software or hardware component that encodes (compresses) and decodes (decompresses) digital video streams. The primary purpose of a video codec is to reduce the size of video data for storage or transmission while preserving acceptable visual quality. Compression is typically lossy, meaning some information is discarded to achieve higher efficiency, though some codecs support lossless compression for specialized applications.

Encoding involves transforming raw video frames into a compressed format using algorithms that exploit spatial and temporal redundancy. Common techniques include motion compensation, transform coding (e.g., discrete cosine transform), and quantization. Decoding reverses this process, reconstructing the video frames for playback. Video codecs operate in conjunction with container formats, such as MP4 or MKV, which organize encoded streams and metadata.

Modern video codecs include H.264 (AVC), H.265 (HEVC), VP9, and AV1. These codecs differ in compression efficiency, computational complexity, and support for features like high dynamic range (HDR), variable frame rates, or hardware acceleration. Encoding and decoding may be performed by a GPU or a dedicated hardware encoder/decoder for real-time performance.

In practical workflows, a content creator records raw footage, which is then encoded with a video codec into a compressed format suitable for streaming or storage. The client device receives the encoded stream, decodes it, and renders frames in sequence. Efficient codecs allow high-resolution video to be transmitted over limited bandwidth while maintaining playback smoothness.

Buffering is closely related, as decoded frames are often temporarily held in memory to accommodate network jitter or processing delays. Adaptive streaming systems monitor buffer levels and dynamically adjust the encoded bitrate to maintain continuity.

Conceptually, a video codec acts as a translator between raw visual data and efficient, transportable digital streams. It allows high-quality video to flow across networks and devices without overwhelming storage or bandwidth.

See Streaming, GPU, Buffering.