What are codecs?

A codec is a computer program capable of encoding or decoding a digital data stream or signal. A codec encodes a data stream or signal for transmission, storage or encryption, or decodes it for playback or editing. Codecs are used in videoconferencing, streaming media and video editing applications. An audio codec converts analog audio signals into digital signals for transmission or storage. A receiving device then converts the digital signals back to analog using an audio decompressor for playback. A video codec accomplishes the same task for video signals, and other codecs do the same for metadata such as subtitles and closed captioning.

Many of the more popular codecs in the software world are lossy, meaning that they reduce quality by some amount in order to achieve compression. Often, this type of compression is virtually indistinguishable from the original uncompressed sound or images, depending on the codec and the settings used. Smaller data sets ease the strain on relatively expensive storage sub-systems such as non-volatile memory and hard disk as well as write-once-read-many formats such as CD-ROM, DVD and Blu-ray Disc . Lower data rates also reduce cost and improve performance when the data is transmitted.

There are also many lossless codecs which are typically used for archiving data (for such uses as reference or transcription) in a compressed form while retaining all of the information present in the original stream. If preserving the original quality of the stream is more important than eliminating the correspondingly larger data sizes, lossless codecs are preferred. This is especially true if the data is to undergo further processing such as editing, in which case the repeated application of processing (encoding and decoding) on lossy codecs will degrade the quality of the resulting data such that it is no longer identifiable.

Two principal techniques are used in codecs, pulse-code modulation and delta modulation. Codecs are often designed to emphasize certain aspects of the media to be encoded such as motion, color or surface texture. There are thousands of audio and video codecs, ranging in cost from free to hundreds of dollars or more. This variety of codecs can create compatibility and obsolescence issues. The impact is lessened for older formats, for which free or nearly-free codecs have exist.

Many multimedia data streams contain both audio and video and often some metadata that permit synchronization of audio and video. Each of these three streams may be handled by different programs, processes, or hardware; but for the multimedia data streams to be useful in stored or transmitted form, they must be encapsulated together in a container format.