A video codec is
software
Software is a set of computer programs and associated software documentation, documentation and data (computing), data. This is in contrast to Computer hardware, hardware, from which the system is built and which actually performs the work.
...
or
hardware that
compresses and
decompresses digital video. In the context of video compression, ''
codec
A codec is a device or computer program that encodes or decodes a data stream or signal. ''Codec'' is a portmanteau of coder/decoder.
In electronic communications, an endec is a device that acts as both an encoder and a decoder on a signal or ...
'' is a
portmanteau
A portmanteau word, or portmanteau (, ) is a blend of words[encoder Encoder may refer to:
Electronic circuits
* Audio encoder, converts digital audio to analog audio signals
* Video encoder, converts digital video to analog video signals
* Simple encoder, assigns a binary code to an active input line
* Priority e ...](_blank)
'', and one that only decompresses is a ''decoder''.
The compressed data format usually conforms to a standard
video coding format
A video coding format (or sometimes video compression format) is a content representation format for storage or transmission of digital video content (such as in a data file or bitstream). It typically uses a standardized video compression alg ...
. The compression is typically
lossy, meaning that the compressed video lacks some information present in the original video. A consequence of this is that decompressed video has lower quality than the original, uncompressed video because there is insufficient information to accurately reconstruct the original video.
There are complex relationships between the
video quality, the amount of data used to represent the video (determined by the
bit rate), the complexity of the encoding and decoding algorithms, sensitivity to data losses and errors, ease of editing, random access, and end-to-end delay (
latency).
History
Historically, video was stored as an analog signal on
magnetic tape
Magnetic tape is a medium for magnetic storage made of a thin, magnetizable coating on a long, narrow strip of plastic film. It was developed in Germany in 1928, based on the earlier magnetic wire recording from Denmark. Devices that use mag ...
. Around the time when the
compact disc
The compact disc (CD) is a digital optical disc data storage format that was co-developed by Philips and Sony to store and play digital audio recordings. In August 1982, the first compact disc was manufactured. It was then released in Octo ...
entered the market as a digital-format replacement for analog audio, it became feasible to also store and convey video in digital form. Because of the large amount of storage and bandwidth needed to record and convey raw video, a method was needed to reduce the amount of data used to represent the raw video. Since then,
engineers
Engineers, as practitioners of engineering, are professionals who Invention, invent, design, analyze, build and test machines, complex systems, structures, gadgets and materials to fulfill functional objectives and requirements while considerin ...
and
mathematicians have developed a number of solutions for achieving this goal that involve compressing the digital video data.
In 1974,
discrete cosine transform (DCT) compression was introduced by
Nasir Ahmed, T. Natarajan and
K. R. Rao
Kamisetty Ramamohan Rao was an Indian-American electrical engineer. He was a professor of Electrical Engineering at the University of Texas at Arlington (UT Arlington). Academically known as K. R. Rao, he is credited with the co-invention of di ...
.
During the late 1980s, a number of companies began experimenting with DCT
lossy compression for video coding, leading to the development of the
H.261 standard.
H.261 was the first practical video coding standard,
and was developed by a number of companies, including
Hitachi
() is a Japanese multinational corporation, multinational Conglomerate (company), conglomerate corporation headquartered in Chiyoda, Tokyo, Japan. It is the parent company of the Hitachi Group (''Hitachi Gurūpu'') and had formed part of the Ni ...
,
PictureTel,
NTT,
BT, and
Toshiba, among others.
Since H.261, DCT compression has been adopted by all the major video coding standards that followed.
The most popular
video coding standards used for codecs have been the
MPEG standards.
MPEG-1
MPEG-1 is a standard for lossy compression of video and audio. It is designed to compress VHS-quality raw digital video and CD audio down to about 1.5 Mbit/s (26:1 and 6:1 compression ratios respectively) without excessive quality loss, mak ...
was developed by the
Motion Picture Experts Group (MPEG) in 1991, and it was designed to compress
VHS-quality video. It was succeeded in 1994 by
MPEG-2
MPEG-2 (a.k.a. H.222/H.262 as was defined by the ITU) is a standard for "the generic coding of moving pictures and associated audio information". It describes a combination of lossy video compression and lossy audio data compression methods, w ...
/
H.262,
which was developed by a number of companies, primarily
Sony
, commonly stylized as SONY, is a Japanese multinational conglomerate corporation headquartered in Minato, Tokyo, Japan. As a major technology company, it operates as one of the world's largest manufacturers of consumer and professional ...
,
Thomson and
Mitsubishi Electric.
MPEG-2 became the standard video format for
DVD and
SD digital television.
In 1999, it was followed by
MPEG-4
MPEG-4 is a group of international standards for the compression of digital audio and visual data, multimedia systems, and file storage formats. It was originally introduced in late 1998 as a group of audio and video coding formats and related ...
/
H.263
H.263 is a video compression standard originally designed as a low-bit-rate compressed format for videotelephony. It was standardized by the ITU-T Video Coding Experts Group (VCEG) in a project ending in 1995/1996. It is a member of the H.26x fam ...
, which was a major leap forward for video compression technology.
It was developed by a number of companies, primarily Mitsubishi Electric, Hitachi and
Panasonic.
The most widely used video coding format, as of 2016, is
H.264/MPEG-4 AVC. It was developed in 2003 by a number of organizations, primarily Panasonic,
Godo Kaisha IP Bridge and
LG Electronics.
H.264 is the main video encoding standard for
Blu-ray Discs, and is widely used by streaming internet services such as
YouTube
YouTube is a global online video sharing and social media platform headquartered in San Bruno, California. It was launched on February 14, 2005, by Steve Chen, Chad Hurley, and Jawed Karim. It is owned by Google, and is the second most ...
,
Netflix
Netflix, Inc. is an American subscription video on-demand over-the-top streaming service and production company based in Los Gatos, California. Founded in 1997 by Reed Hastings and Marc Randolph in Scotts Valley, California, it offers a ...
,
Vimeo
Vimeo, Inc. () is an American video hosting, sharing, and services platform provider headquartered in New York City. Vimeo focuses on the delivery of high-definition video across a range of devices. Vimeo's business model is through software a ...
, and
iTunes Store
The iTunes Store is a digital media store operated by Apple Inc. It opened on April 28, 2003, as a result of Steve Jobs' push to open a digital marketplace for music. As of April 2020, iTunes offered 60 million songs, 2.2 million apps, 25,00 ...
, web software such as
Adobe Flash Player and
Microsoft Silverlight, and various
HDTV
High-definition television (HD or HDTV) describes a television system which provides a substantially higher image resolution than the previous generation of technologies. The term has been used since 1936; in more recent times, it refers to the ...
broadcasts over terrestrial and satellite television.
AVC has been succeeded by
HEVC (H.265), developed in 2013. It is heavily patented, with the majority of patents belonging to
Samsung Electronics
Samsung Electronics Co., Ltd. (, sometimes shortened to SEC and stylized as SΛMSUNG) is a South Korean multinational electronics corporation headquartered in Yeongtong-gu, Suwon, South Korea. It is the pinnacle of the Samsung chaebol, a ...
,
GE, NTT and
JVC Kenwood
, stylized as JVCKENWOOD, is a Japanese multinational electronics company headquartered in Yokohama, Japan. It was formed from the merger of Victor Company of Japan, Ltd (JVC) and Kenwood Corporation on October 1, 2008. Upon creation, Haruo Kaw ...
.
The adoption of HEVC has been hampered by its complex licensing structure. HEVC is in turn succeeded by
Versatile Video Coding (VVC).
There are also the open and free
VP8,
VP9 and
AV1 video coding formats, used by YouTube, all of which were developed with involvement from
Google
Google LLC () is an American Multinational corporation, multinational technology company focusing on Search Engine, search engine technology, online advertising, cloud computing, software, computer software, quantum computing, e-commerce, ar ...
.
Applications
Video codecs are used in DVD players,
Internet video,
video on demand
Video on demand (VOD) is a media distribution system that allows users to access videos without a traditional video playback device and the constraints of a typical static broadcasting schedule. In the 20th century, broadcasting in the form of ...
,
digital cable
Digital cable is the distribution of cable television using digital data and video compression. The technology was first developed by General Instrument. By 2000, most cable companies offered digital features, eventually replacing their previo ...
,
digital terrestrial television
Digital terrestrial television (DTTV or DTT, or DTTB with "broadcasting") is a technology for terrestrial television in which land-based (terrestrial) television stations broadcast television content by radio waves to televisions in consume ...
,
videotelephony and a variety of other applications. In particular, they are widely used in applications that record or transmit video, which may not be feasible with the high data volumes and bandwidths of uncompressed video. For example, they are used in
operating theaters to record surgical operations, in
IP cameras in security systems, and in
remotely operated underwater vehicle
A remotely operated underwater vehicle (technically ROUV or just ROV) is a tethered underwater mobile device, commonly called ''underwater robot''.
Definition
This meaning is different from remote control vehicles operating on land or in the ...
s and
unmanned aerial vehicle
An unmanned aerial vehicle (UAV), commonly known as a drone, is an aircraft without any human pilot, crew, or passengers on board. UAVs are a component of an unmanned aircraft system (UAS), which includes adding a ground-based controlle ...
s. Any video stream or file can be encoded using a wide variety of live video format options. Here are some of the H.264 encoder settings that need to be set when streaming to an HTML5 video player.
Video codec design
Video codecs seek to represent a fundamentally analog data set in a digital format. Because of the design of analog video signals, which represent
luminance (luma) and
color information (chrominance, chroma) separately, a common first step in image compression in codec design is to represent and store the image in a
YCbCr
YCbCr, Y′CbCr, or Y Pb/Cb Pr/Cr, also written as YCBCR or Y′CBCR, is a family of color spaces used as a part of the color image pipeline in video and digital photography systems. Y′ is the Luma (video), luma component and CB and CR are t ...
color space. The conversion to YCbCr provides two benefits: first, it improves compressibility by providing decorrelation of the color signals; and second, it separates the luma signal, which is perceptually much more important, from the chroma signal, which is less perceptually important and which can be represented at lower resolution using
chroma subsampling to achieve more efficient data compression. It is common to represent the ratios of information stored in these different channels in the following way Y:Cb:Cr. Different codecs use different chroma subsampling ratios as appropriate to their compression needs. Video compression schemes for Web and DVD make use of a 4:2:1 color sampling pattern, and the
DV standard uses 4:1:1 sampling ratios. Professional video codecs designed to function at much higher bitrates and to record a greater amount of color information for post-production manipulation sample in 4:2:2 and 4:4:4 ratios. Examples of these codecs include Panasonic's DVCPRO50 and DVCPROHD codecs (4:2:2), Sony's HDCAM-SR (4:4:4), Panasonic's HDD5 (4:2:2),
Apple
An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple trees are cultivated worldwide and are the most widely grown species in the genus '' Malus''. The tree originated in Central Asia, where its wild ances ...
's Prores HQ 422 (4:2:2).
It is also worth noting that video codecs can operate in RGB space as well. These codecs tend not to sample the red, green, and blue channels in different ratios, since there is less perceptual motivation for doing so—just the blue channel could be undersampled.
Some amount of spatial and temporal
downsampling may also be used to reduce the raw data rate before the basic encoding process. The most popular encoding transform is the 8x8 DCT. Codecs which make use of a
wavelet transform are also entering the market, especially in camera workflows which involve dealing with
RAW image formatting in motion sequences. This process involves representing the video image as a set of
macroblocks. For more information about this critical facet of video codec design, see
B-frames.
The output of the transform is first
quantized, then
entropy encoding is applied to the quantized values. When a DCT has been used, the coefficients are typically scanned using a
zig-zag scan order, and the entropy coding typically combines a number of consecutive zero-valued quantized coefficients with the value of the next non-zero quantized coefficient into a single symbol, and also has special ways of indicating when all of the remaining quantized coefficient values are equal to zero. The entropy coding method typically uses
variable-length coding tables. Some encoders compress the video in a multiple step process called ''n-pass'' encoding (e.g. 2-pass), which performs a slower but potentially higher quality compression.
The decoding process consists of performing, to the extent possible, an inversion of each stage of the encoding process.
The one stage that cannot be exactly inverted is the quantization stage. There, a best-effort approximation of inversion is performed. This part of the process is often called ''inverse quantization'' or ''dequantization'', although quantization is an inherently non-invertible process.
Video codec designs are usually standardized or eventually become standardized—i.e., specified precisely in a published document. However, only the decoding process need be standardized to enable interoperability. The encoding process is typically not specified at all in a standard, and implementers are free to design their encoder however they want, as long as the video can be decoded in the specified manner. For this reason, the quality of the video produced by decoding the results of different encoders that use the same video codec standard can vary dramatically from one encoder implementation to another.
Commonly used video codecs
A variety of video compression formats can be implemented on PCs and in consumer electronics equipment. It is therefore possible for multiple codecs to be available in the same product, reducing the need to choose a single dominant video compression format to achieve
interoperability.
Standard
video compression formats can be supported by multiple encoder and decoder implementations from multiple sources. For example, video encoded with a standard MPEG-4 Part 2 codec such as Xvid can be decoded using any other standard MPEG-4 Part 2 codec such as FFmpeg MPEG-4 or DivX Pro Codec, because they all use the same video format.
Codecs have their qualities and drawbacks. Comparisons are frequently published. The trade-off between compression power, speed, and fidelity (including
artifacts) is usually considered the most important figure of technical merit.
Codec packs
Online video material is encoded by a variety of codecs, and this has led to the availability of codec packs — a pre-assembled set of commonly used codecs combined with an installer available as a software package for PCs, such as
K-Lite Codec Pack
The K-Lite Codec Pack is a collection of audio and video codecs for Microsoft Windows DirectShow that enables an operating system and its software to play various audio and video formats generally not supported by the operating system itsel ...
,
Perian and
Combined Community Codec Pack.
See also
*
Video coding format
A video coding format (or sometimes video compression format) is a content representation format for storage or transmission of digital video content (such as in a data file or bitstream). It typically uses a standardized video compression alg ...
*
Bit rate
*
Comparison of video codecs
*
*
Display resolution
The display resolution or display modes of a digital television, computer monitor or display device is the number of distinct pixels in each dimension that can be displayed. It can be an ambiguous term especially as the displayed resolution i ...
*
Frame rate
Frame rate (expressed in or FPS) is the frequency (rate) at which consecutive images ( frames) are captured or displayed. The term applies equally to film and video cameras, computer graphics, and motion capture systems. Frame rate may also ...
*
*
List of open-source codecs
*
Multiplexing
In telecommunications and computer networking, multiplexing (sometimes contracted to muxing) is a method by which multiple analog or digital signals are combined into one signal over a shared medium. The aim is to share a scarce resource - a ...
*
Sampling rate
*
Subjective video quality
*
Transcoding
Transcoding is the direct digital-to-digital conversion of one encoding to another, such as for video data files, audio files (e.g., MP3, WAV), or character encoding (e.g., UTF-8, ISO/IEC 8859). This is usually done in cases where a target ...
*
Video quality
References
External links
Wyner-Ziv Coding of Videodescribes another algorithm for video compression that performs close to the
Slepian–Wolf bound (with links to source code).
AMD Media Codecs€”optional download (formerly called
ATI Avivo)
{{DEFAULTSORT:Video Codec
Videotelephony