Codecs
What Are Codecs?
Codecs are algorithms or hardware components that encode and decode digital data streams, converting raw audio, video, or other media into a compressed format for storage or transmission and then reconstructing that data for playback or processing. The word itself is a portmanteau of "encoder" and "decoder," reflecting the paired nature of the function: no codec is useful without both halves. Codecs are central to modern telecommunications, streaming media, broadcast systems, and consumer electronics, where reducing data volume while preserving perceptual quality is a persistent engineering challenge.
The design of codecs draws from information theory, signal processing, and psychoacoustics or psychovisual science. A codec must exploit the limits and characteristics of human perception, discarding information the listener or viewer is unlikely to notice, while meeting strict requirements on latency, computational cost, and interoperability across diverse hardware and software platforms.
Lossless and Lossy Compression
Codecs are broadly divided into lossless and lossy classes, each suited to different use cases. Lossless codecs, such as FLAC for audio and FFV1 for video, reproduce the original bitstream exactly on decoding. They are used in archival, professional audio production, and medical imaging, where any alteration to the data is unacceptable. Lossy codecs accept a controlled reduction in fidelity in exchange for substantially smaller file sizes. Audio formats such as MP3, AAC, and Opus exploit psychoacoustic masking to eliminate signal components below the threshold of human hearing. Video codecs such as H.264, H.265 (HEVC), and AV1 apply spatial and temporal redundancy reduction, encoding only the differences between successive frames rather than full images.
Video Codec Standards
Video codec development has been shaped by a series of international standards that balance compression efficiency against decoder complexity. H.264 (MPEG-4 AVC) became dominant in internet streaming and broadcast through the 2010s; H.265 doubled compression efficiency at comparable quality, enabling 4K and HDR delivery at manageable bitrates. IEEE has contributed standards in this space, including the IEEE 1857 family of video coding standards, which target ultra-high-definition television, IP surveillance, and internet video applications. The open-source AV1 codec, developed by the Alliance for Open Media, has gained traction as a royalty-free alternative for web streaming.
Audio Codec Standards
Audio codecs span a similarly wide design space. Voice codecs, such as those used in VoIP systems, must operate at low bitrates and tolerate packet loss while preserving speech intelligibility. Narrowband codecs operate on frequency ranges of 300 Hz to 3.4 kHz; wideband and fullband codecs, including G.722 and Opus, extend coverage to 7 kHz and beyond, improving the perceived naturalness of speech. High-fidelity music codecs apply different trade-offs, targeting higher bitrates and richer frequency content. The MDN Web Docs audio codec guide provides a detailed comparison of codecs available for web browser deployment, covering bitrate ranges, latency profiles, and patent status. Research on neural network-based codecs, documented extensively on arXiv, is now producing models that outperform classical designs at very low bitrates by learning perceptual representations directly from training data.
Applications
Codecs have applications in a wide range of disciplines, including:
- Internet streaming platforms for audio and video delivery
- Broadcast television and over-the-air digital transmission
- Video conferencing and VoIP communications systems
- Professional media production and archival storage
- Surveillance and security camera networks
- Wireless multimedia communication in mobile networks