The Full Wiki

Video codecs: Wikis


Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


(Redirected to Video codec article)

From Wikipedia, the free encyclopedia

A 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. Around the time when the compact disc entered the market as a digital-format replacement for analog audio, it became feasible to also begin storing and using video in digital form, and a variety of such technologies began to emerge.

Audio and video call for customized methods of compression. Engineers and mathematicians have tried a number of solutions for tackling this problem.

There is a complex balance between the video quality, the quantity of the data needed to represent it (also known as the bit rate), the complexity of the encoding and decoding algorithms, robustness to data losses and errors, ease of editing, random access, the state of the art of compression algorithm design, end-to-end delay, and a number of other factors.



Digital video codecs are found in DVD systems (players, recorders), Video CD systems, in emerging satellite and digital terrestrial broadcast systems, various digital devices and software products with video recording and/or playing capability. 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.

Encoding media by the public has seen an upsurge with the availability of CD and DVD-writers.

Video codec design

Video codecs seek to represent a fundamentally analog data set in a digital way. Because of the design of analog video signals, which represent luma and color information separately, a common first step in image compression in codec design is to represent and store the image in a YCbCr 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 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. Refer to the following article for more information about Chroma subsampling.

Different codecs will use different chroma subsampling ratios as appropriate to their compression needs. Video compression schemes for Web and DVD make use of a 4:2:0 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 3:1:1 (uncommon), 4:2:2 and 4:4:4 ratios. Examples of these codecs include Panasonic's DVCPRO50 and DVCPROHD codecs (4:2:2), and then Sony's HDCAM-SR (4:4:4) or Panasonic's HDD5 (4:2:2). Apple's new Prores HQ 422 codec also samples in 4:2:2 color space. More codecs that sample in 4:4:4 patterns exist as well, but are less common, and tend to be used internally in post-production houses. 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 such transform is the 8x8 discrete cosine transform (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. 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 can compress the video in a multiple step process called n-pass encoding (e.g. 2-pass), which performs a slower but potentially better 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.

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 pictures.

Video codec designs are often standardized or will be in the future- i.e., specified precisely in a published document. However, only the decoding process needs to 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, avoiding the need to choose a single dominant video compression format for compatibility reasons.

Video in most of the publicly documented or standardized video compression formats can be created with multiple encoders made by different people. Many video codecs use common, standard video compression formats, which makes them compatible. For example, video created with a standard MPEG-4 Part 2 codec such as Xvid can be decoded (played back) 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.

Some widely-used software codecs are listed below.


Lossless codecs

  • Huffyuv: Huffyuv (or HuffYUV) is a very fast, lossless Win32 video codec written by Ben Rudiak-Gould and published under the terms of the GPL as free software, meant to replace uncompressed YCbCr as a video capture format.
  • Lagarith: A more up-to-date fork of Huffyuv is available as Lagarith.

MPEG-4 Part 2 codecs

  • DivX Pro Codec: A proprietary MPEG-4 ASP codec made by DivX, Inc.
  • Xvid: Free/open-source implementation of MPEG-4 ASP, originally based on the OpenDivX project.
  • FFmpeg MPEG-4: Included in the open-source libavcodec codec library, which is used by default for decoding and/or encoding in many open-source video players, frameworks, editors and encoding tools such as MPlayer, VLC, ffdshow or GStreamer. Compatible with other standard MPEG-4 codecs like Xvid or DivX Pro Codec.
  • 3ivx: A commercial MPEG-4 codec created by 3ivx Technologies.

H.264/MPEG-4 AVC codecs

  • x264: A GPL-licensed implementation of the H.264 encoding standard. x264 is only an encoder.
  • Nero Digital: Commercial MPEG-4 ASP and AVC codecs developed by Nero AG.
  • QuickTime H.264: H.264 implementation released by Apple.
  • DivX Pro Codec: An H.264 decoder and encoder was added in version 7.

Microsoft codecs

  • WMV (Windows Media Video): Microsoft's family of proprietary video codec designs including WMV 7, WMV 8, and WMV 9. The latest generation of WMV is standardized by SMPTE as the VC-1 standard.
  • MS MPEG-4v3: A proprietary and not MPEG-4 compliant video codec created by Microsoft. Released as a part of Windows Media Tools 4. A hacked version of Microsoft's MPEG-4v3 codec became known as DivX ;-).

Other codecs

  • VP6, VP6-E, VP6-S, VP7, VP8: Proprietary high definition video compression formats and codecs developed by On2 Technologies used in platforms such as Adobe Flash Player 8 and above, Adobe Flash Lite, Java FX and other mobile and desktop video platforms. Supports resolution up to 720p and 1080p.
  • libtheora: A reference implementation of the Theora video compression format developed by the Foundation, based upon On2 Technologies' VP3 codec, and christened by On2 as the successor in VP3's lineage. Theora is targeted at competing with MPEG-4 video and similar lower-bitrate video compression schemes.
  • Schrödinger and dirac-research: implementations of the Dirac compression format developed by BBC Research at the BBC. Dirac provides video compression from web video up to ultra HD and beyond.
  • DNxHD codec: a lossy high-definition video production codec developed by Avid Technology. It is an implementation of VC-3.
  • Sorenson 3: A video compression format and codec that is popularly used by Apple's QuickTime, basically the ancestor of H.264. Many of the QuickTime movie trailers found on the web use this compression format.
  • Sorenson Spark: A codec and compression format that was licensed to Macromedia for use in its Flash Video starting with Flash Player 6. It is considered as an incomplete implementation of the H.263 standard.
  • RealVideo: Developed by RealNetworks. A popular compression format and codec technology a few years ago, now fading in importance for a variety of reasons.
  • Cinepak: A very early codec used by Apple's QuickTime.
  • Indeo, an older video compression format and codec initially developed by Intel.

All of the codecs above have their qualities and drawbacks. Comparisons are frequently published. The tradeoff between compression power, speed, and fidelity (including artifacts) is usually considered the most important figure of technical merit.

Missing codecs and video-file issues

A common problem when an end user wants to watch a video stream encoded with a specific codec is that if the exact codec is not present and properly installed on the user's machine, the video won't play (or won't play optimally).

MPlayer or VLC media player contain many popular codecs in a portable standalone library, available for many operating systems, including Windows, Linux, and Mac OS X. This also resolves many issues within Windows in conflicting and poorly installed codecs.[citation needed]

Video codec benchmarking

To benchmark video decoders, try the Haali TimeCodec. You have to install the latest version of the Haali Media Splitter before using it.

Another method is using the internal audio and video decoders built into TCPMP for both mobile devices and desktop PC's. See Shinos TCPMP benchmark page

See also

External links


Got something to say? Make a comment.
Your name
Your email address