Audio Codec
Also known as: Codec
Algorithm or software that encodes audio into a compressed or structured digital format and decodes it back for playback, such as MP3, AAC or FLAC.
An audio codec, short for coder-decoder, is a method for representing audio digitally in a particular format. The encoder converts audio, usually from PCM samples, into a bitstream; the decoder reconstructs audio from that bitstream for playback. Codecs are either lossless, preserving every bit of the original, or lossy, discarding information judged least audible to reach much smaller sizes. The same term is also used for hardware chips that convert between analog and digital audio in devices, a separate but related meaning.
Well-known lossy codecs include MP3, standardized in the early 1990s; AAC, used by many streaming and mobile platforms; Vorbis; and Opus, designed for both speech and music with very low latency. FLAC and Apple Lossless (ALAC) are widely used lossless codecs. Telephony and voice applications rely on speech codecs optimized for intelligibility at low bit rates. Codecs are distinct from container formats, such as MP4, Ogg or Matroska, which package encoded audio and metadata into files or streams.
Choosing a codec involves trade-offs among quality, bit rate, latency, computational cost, compatibility and licensing. Patent licensing shaped the history of the field: concerns about royalties on formats such as MP3 encouraged the development of open, royalty-free codecs under the Xiph.Org Foundation, including Vorbis, FLAC and Opus, the last of which was standardized by the IETF in 2012. Codec design relies on psychoacoustics to decide which information can be discarded without audible harm.
Key points
- A codec encodes audio into a digital bitstream and decodes it for playback.
- Lossy codecs such as MP3 and AAC discard less audible information, while lossless codecs such as FLAC preserve everything.
- Codecs differ from container formats such as MP4 and Ogg, which package encoded data.
- Open, royalty-free codecs such as Vorbis, FLAC and Opus emerged partly in response to patent licensing.
Related entries
MP3
Lossy audio format developed largely at Germany's Fraunhofer institute that made music small enough to share and carry as computer files.
FLAC
Open, royalty-free audio format that compresses digital audio without losing any information, widely used for music archiving.
Opus
Open, royalty-free audio codec standardized by the IETF in 2012 that handles both speech and music with very low delay.
Lossy Compression
Data compression that permanently discards some information to achieve much smaller files, aiming to remove what human perception is least likely to notice.
Compression of digital audio that reduces file size while allowing exact, bit-for-bit reconstruction of the original samples on decoding.
Xiph.Org Foundation
Nonprofit organization that develops free, open and royalty-free multimedia formats and software, including Ogg, Vorbis, FLAC and Opus.
FFmpeg
Free and open-source suite of libraries and command-line tools for recording, converting, streaming and processing audio and video.
Psychoacoustics
Scientific study of how humans perceive sound, linking physical properties such as frequency and intensity to sensations like pitch, loudness and location.
Referenced by
Other entries that discuss or point to Audio Codec.