A
codec is a device or
computer programA computer program is a sequence of instructions written to perform a specified task with a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute...
capable of
encodingAn encoder is a device, circuit, transducer, software program, algorithm or person that converts information from one format or code to another, for the purposes of standardization, speed, secrecy, security, or saving space by shrinking size.-Media:...
or
decodingIn communication theory and coding theory, decoding is the process of translating received messages into codewords of a given code. There have been many common methods of mapping messages to codewords...
a
digitalA digital system is a data technology that uses discrete values. By contrast, non-digital systems use a continuous range of values to represent information...
data streamIn telecommunications and computing, a data stream is a sequence of digitally encoded coherent signals used to transmit or receive information that is in the process of being transmitted....
or signal. The word
codec is a portmanteau of "
compressor-
decompressor" or, more commonly, "
coder-
decoder". A
codec (the
program) should not be confused with a coding or compression
format or
standard – a format is a document (the standard), a way of storing data, while a codec is a program (an
implementation) which can read or write such files. In practice "codec" is sometimes used loosely to refer to formats, however.
A codec encodes a data stream or signal for transmission, storage or
encryptionIn cryptography, encryption is the process of transforming information using an algorithm to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key. The result of the process is encrypted information...
, or decodes it for playback or editing. Codecs are used in videoconferencing,
streaming mediaStreaming media is multimedia that is constantly received by and presented to an end-user while being delivered by a streaming provider.The term "presented" is used in this article in a general sense that includes audio or video playback. The name refers to the delivery method of the medium rather...
and
video editingThe term video editing can refer to:* Linear video editing, using video tape* Non-linear editing system , using computers with video editing software* Offline editing* Online editing...
applications. A video camera's
analog-to-digital converterAn analog-to-digital converter is a device that converts a continuous quantity to a discrete time digital representation. An ADC may also provide an isolated measurement...
(ADC) converts its analog signals into digital signals, which are then passed through a
video compressorA video codec is a device or software that enables video compression and/or decompression for digital video. The compression usually employs lossy data compression. Historically, video was stored as an analog signal on magnetic tape...
for digital transmission or storage. A receiving device then runs the signal through a video decompressor, then a
digital-to-analog converterIn electronics, a digital-to-analog converter is a device that converts a digital code to an analog signal . An analog-to-digital converter performs the reverse operation...
(DAC) for analog display. The term
codec is also used as a generic name for a video conferencing unit.
Related concepts
An
endecAn endec is a device which acts as both an encoder and a decoder on a signal or data stream, either with the same or separate circuitry or algorithm...
(encoder/decoder) is a similar yet different concept mainly used for
hardwareHardware is a general term for equipment such as keys, locks, hinges, latches, handles, wire, chains, plumbing supplies, tools, utensils, cutlery and machine parts. Household hardware is typically sold in hardware stores....
. In the mid 20th century, a "
codec" was hardware that coded analog signals into
Pulse-code modulationPulse-code modulation is a method used to digitally represent sampled analog signals. It is the standard form for digital audio in computers and various Blu-ray, Compact Disc and DVD formats, as well as other uses such as digital telephone systems...
(PCM) and decoded them back. Late in the century the name came to be applied to a class of software for converting among digital signal formats, and including compander functions.
A
modemA modem is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The goal is to produce a signal that can be transmitted easily and decoded to reproduce the original digital data...
is a contraction of
modulator/
demodulator (modem was called dataset by telcos) and converts digital data from computers to analog for phone line transmission. On the receiving end the analog is converted back to digital. Codecs do the opposite (convert audio analog to digital and then computer digital sound back to audio).
An
audio codecAll codecs are devices or computer programs capable of coding or decoding a digital data stream or signal.The term audio codec has two meanings depending on the context:...
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. An example of this are the codecs used in the sound cards of personal computers. A
video codecA video codec is a device or software that enables video compression and/or decompression for digital video. The compression usually employs lossy data compression. Historically, video was stored as an analog signal on magnetic tape...
accomplishes the same task for video signals.
Compression quality
- Lossy codecs: 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
Non-volatile memory, nonvolatile memory, NVM or non-volatile storage, in the most basic sense, is computer memory that can retain the stored information even when not powered. Examples of non-volatile memory include read-only memory, flash memory, ferroelectric RAM, most types of magnetic computer...
and hard diskA hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...
, as well as write-once-read-many formats such as CD-ROMA CD-ROM is a pre-pressed compact disc that contains data accessible to, but not writable by, a computer for data storage and music playback. The 1985 “Yellow Book” standard developed by Sony and Philips adapted the format to hold any form of binary data....
, DVDA DVD is an optical disc storage media format, invented and developed by Philips, Sony, Toshiba, and Panasonic in 1995. DVDs offer higher storage capacity than Compact Discs while having the same dimensions....
and Blu-ray DiscBlu-ray Disc is an optical disc storage medium designed to supersede the DVD format. The plastic disc is 120 mm in diameter and 1.2 mm thick, the same size as DVDs and CDs. Blu-ray Discs contain 25 GB per layer, with dual layer discs being the norm for feature-length video discs...
. Lower data rates also reduce cost and improve performance when the data is transmitted.
- Lossless codecs: There are also many lossless codecs which are typically used for archiving data 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 (for example editing
Editing is the process of selecting and preparing written, visual, audible, and film media used to convey information through the processes of correction, condensation, organization, and other modifications performed with an intention of producing a correct, consistent, accurate, and complete...
) 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 (visually, audibly or both). Using more than one codec or encoding scheme successively can also degrade quality significantly. The decreasing cost of storage capacity and network bandwidth has a tendency to reduce the need for lossy codecs for some media.
Media codecs
Codecs are often designed to emphasize certain aspects of the media, or their use, to be encoded. For example, a digital video (using a
DVDV is a format for the digital recording and playing back of digital video. The DV codec was launched in 1995 with joint efforts of leading producers of video camcorders....
codec) of a sports event needs to encode motion well but not necessarily exact colors, while a video of an art exhibit needs to perform well encoding color and surface texture.
Audio codecs for cell phones need to have very low
latencyLatency refers to a short period of delay between when an audio signal enters and when it emerges from a system...
between source encoding and playback; while audio codecs for recording or broadcast can use high-latency audio compression techniques to achieve higher fidelity at a lower bit-rate.
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 existed for a long time. The older formats are often ill-suited to modern applications, however, such as playback in small portable devices. For example, raw uncompressed PCM audio (44.1 kHz, 16 bit stereo, as represented on an audio CD or in a .wav or .aiff file) has long been a standard across multiple platforms, but its transmission over networks is slow and expensive compared with more modern compressed formats, such as
MP3MPEG-1 or MPEG-2 Audio Layer III, more commonly referred to as MP3, is a patented digital audio encoding format using a form of lossy data compression...
.
Many
multimediaMultimedia is media and content that uses a combination of different content forms. The term can be used as a noun or as an adjective describing a medium as having multiple content forms. The term is used in contrast to media which use only rudimentary computer display such as text-only, or...
data streams contain both
audioSound is a mechanical wave that is an oscillation of pressure transmitted through a solid, liquid, or gas, composed of frequencies within the range of hearing and of a level sufficiently strong to be heard, or the sensation stimulated in organs of hearing by such vibrations.-Propagation of...
and
videoVideo is the technology of electronically capturing, recording, processing, storing, transmitting, and reconstructing a sequence of still images representing scenes in motion.- History :...
, 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.
Lower
bitrateIn telecommunications and computing, bit rate is the number of bits that are conveyed or processed per unit of time....
codecs allow more users, but they also have more distortion. Beyond the initial increase in distortion, lower bit rate codecs also achieve their lower bit rates by using more complex algorithms that make certain assumptions, such as those about the media and the packet loss rate. Other codecs may not make those same assumptions. When a user with a low bitrate codec talks to a user with another codec, additional distortion is introduced by each transcoding.
The notion of
AVIAudio Video Interleave , known by its acronym AVI, is a multimedia container format introduced by Microsoft in November 1992 as part of its Video for Windows technology. AVI files can contain both audio and video data in a file container that allows synchronous audio-with-video playback...
being a codec is incorrect as AVI is a container format, which many codecs might use (although not to ISO standard). There are also other well-known containers such as
OggOgg is a free, open container format maintained by the Xiph.Org Foundation. The creators of the Ogg format state that it is unrestricted by software patents and is designed to provide for efficient streaming and manipulation of high quality digital multimedia.The Ogg container format can multiplex...
,
ASFAdvanced Systems Format is Microsoft's proprietary digital audio/digital video container format, especially meant for streaming media...
,
QuickTimeQuickTime is an extensible proprietary multimedia framework developed by Apple Inc., capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity. The classic version of QuickTime is available for Windows XP and later, as well as Mac OS X Leopard and...
,
RealMediaRealMedia is a proprietary multimedia container format created by RealNetworks. Its extension is ".rm". It is typically used in conjunction with RealVideo and RealAudio and is used for streaming content over the Internet....
,
MatroskaThe Matroska Multimedia Container is an open standard free container format, a file format that can hold an unlimited number of video, audio, picture or subtitle tracks in one file. It is intended to serve as a universal format for storing common multimedia content, like movies or TV shows...
, DivX Media Format and containers defined as ISO standards, such as MPEG transport stream, MPEG program stream, MP4 and
ISO base media file formatISO base media file format defines a general structure for time-based multimedia files such as video and audio. It is used as the basis for other media file formats...
.
See also
- Comparison of container formats
This table compares features of container formats. To see which multimedia players support which container format, look at comparison of media players.-Information:-Audio formats supported:-Video formats supported:-Caption formats supported:...
- Datatypes (Amiga)
- Audio signal processing
Audio signal processing, sometimes referred to as audio processing, is the intentional alteration of auditory signals, or sound. As audio signals may be electronically represented in either digital or analog format, signal processing may occur in either domain...
- Digital signal processing
Digital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...
- List of codecs
- Lossless data compression
Lossless data compression is a class of data compression algorithms that allows the exact original data to be reconstructed from the compressed data. The term lossless is in contrast to lossy data compression, which only allows an approximation of the original data to be reconstructed, in exchange...
- Lossy compression
- List of open source codecs
- Transcoding
- Video coding