Comparison of video codecs
From Seo Wiki - Search Engine Optimization and Programming Languages
|This article may require cleanup to meet Wikipedia's quality standards. Please improve this article if you can. (June 2007)|
Comparison of video codecs — is an evaluation process for codec similarities and differences. 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, so quality measurement issues become important. Shortly after the compact disc became widely available as a digital-format replacement for analog audio, it became feasible to also store and use video in digital form. A variety of technologies soon emerged to do so. The primary goal for most methods of compressing video is to produce video that most closely approximates the fidelity of the original source and simultaneously deliver the smallest file size possible. However, there are also several other factors that can be used as a basis for comparison.
Introduction to comparison
The following characteristics are compared in video codecs comparisons:
- Video quality per bitrate (or range of bitrates). Commonly video quality is considered the main characteristic of codec comparisons. Video quality comparisons can be subjective or objective.
- Performance characteristics like compression/decompression speed, supported profiles/options, supported resolutions, supported rate control strategies etc.
- General software characteristics, for example:
Another important issue for comparison is application area. The following application areas need different codec characteristics:
- Videoconferencing presume
- very fast compression (minimum delay and similar compression time for all frames)
- very fast decompression (minimum delay)
- pretty good error resistance
- good quality characteristics for low bitrates
- camera artifacts suppression is welcome
- DVD or MPEG-4 CD video compression presume
- maximum quality compression (maybe multipass: 2-pass compression)
- fast decompression (but constant delay with buffering is possible)
- error resistance mechanism implementation is welcome, but not critical
- maximum quality characteristics for high and medium bitrates
- typical video processing (like automatic denoising, deinterlacing) is welcome.
Comparison of the best DVD MPEG-2 codec with the base profile videoconferencing H.264 implementation can cause some confusing issues and generally wrong results. Such methods of codec comparison were widely used for marketing materials preparation during dot-com bubble.
The quality the codec can achieve is heavily based on the compression format the codec uses. A codec is not a format, and there can be multiple codecs that implement the same compression specification – for example, MPEG-1 codecs typically do not achieve quality/size ratio comparable to codecs that implement the more modern H.264 specification. But quality/size ratio of output produced by different implementations of the same specification can vary, too.
Prior to comparing codec video quality, it is important to understand that every codec can give a varying degree of quality for a given set of frames within a video sequence. Numerous factors play a role in this variability. First, all codecs have a bitrate control mechanism which is responsible for determining the bitrate and quality on a per-frame basis. A difference between variable bit rate (VBR) and constant bit rate (CBR) creates a trade-off between a consistent quality over all frames, and a more constant bitrate, which is required for some applications. Second, some codecs differentiate between different types of frames such as key frames and non-key frames, differing in their importance to overall visual quality and the extent to which they can be compressed. Third, quality depends on prefiltrations, that is included on all present-day codecs. Other factors can also come into play.
For a sufficiently long clip, it is possible to select sequences which have suffered little from the compression and sequences which have suffered heavily, especially if CBR was used, in which the quality between frames can vary highly due to different amounts of compression needed to achieve a constant bitrate. So, in any one long clip such as a full length movie, any two codecs may perform quite differently on a particular sequence from the clip, while the codecs may be approximately equal (or the situation reversed) in quality over a wider sequence of frames. Press-releases and amateur forums sometimes select sequences known to favor a particular codec or style of rate control in reviews.
Objective video quality
Objective video evaluation techniques are mathematical models that approximate results of subjective quality assessment, but are based on criteria and metrics that can be measured objectively and automatically evaluated by a computer program. Objective methods are classified based on the availability of the original video signal, which is considered to be of high quality (generally not compressed). Therefore, they can be classified as:
- Full reference methods (FR),
- Reduced reference methods (RR), and
- No-reference methods (NR).
The main FR metrics are:
- Peak signal-to-noise ratio (PSNR)
- The most widely used video quality metric during last 20 years (used approximately in 99% of scientific papers and in 20% of marketing materials). However, the validity of this metric is limited. It is only conclusive when the same codec (or codec type) and content is being compared.
- Structural similarity (SSim.)
- New metric (was suggested in 2004) shows better results than PSNR with reasonable computational complexity increasing.
Some other metrics have been suggested by Video Quality Experts Group (VQEG); private companies; and universities, but are not widespread.
Main comparison method is so called RD-curve (rate/distortion chart), where Y-axis used for metric value and X-axis used for bitrate.
Following NR metrics are used:
- Blocking measure — measurement power of so called blocking artefacts (extremely noticeable without deblocking filter usage on low bitrates)
- Blurring measure — measurement of common video blurring (washout)
Subjective video quality
It is concerned with how video is perceived by a viewer and designates his or her opinion on a particular video sequence. Subjective video quality tests are quite expensive in terms of time (preparation and running) and human resources.
There is an enormous number of ways of showing video sequences to experts and to record their opinions. A few of them have been standardized. They are thoroughly described in ITU-R recommendation BT.500.
Following subjective video quality comparison methods are used:
- Double Stimulus Impairment Scale (DSIS) — suggested in ITU-R BT.500-11.
- Double Stimulus Continuous Quality Scale (DSCQS) type I and type II — suggested in ITU-R BT.500-11
- Stimulus Comparison Adjectival Categorical Judgement (SCACJ) — suggested in ITU-R BT.500-11
- Subjective Assessment Method for Video Quality evaluation (SAMVIQ)
- MSU Continuous Quality Evaluation (MSUCQE)
The reason for measuring subjective video quality is the same as for measuring the Mean Opinion Score for audio. Opinions of experts can be averaged; average mark is usually given with confidence interval. Additional procedures can be used for averaging, for example experts who give unstable results can be rejected (for instance, if their correlation with average opinion is small).
In case of video codecs, this is very common situation. When codecs with similar objective results show results with different subjective results, the main reasons can be:
- Pre- and postfilters are widely used in codecs. Commonly codecs use prefilters like video denoising, deflicking, deshacking and etc. Denoising and deflicking commonly maintain PSNR value, but increase visual quality (the best slow denoising filters also increase PSNR on middle and high bitrates). Deshacking seriously decreases PSNR, but increases visual quality. The same situation with postfilters — deblocking and deringing maintain PSNR, but increase quality. Graining (suggested in H.264) essentially increases video quality especially on big plasma screens, but decrease PSNR.
- Note: All filters worsen compression/decompression time, so they increase visual quality, but decrease speed.
- Motion estimation (ME) search strategy can also cause different visual quality for the same PSNR. So called true motion search commonly will not reach minimum sum of absolute differences (SAD) values in codec ME, but may result in better visual quality. Also such methods require more compression time.
- Rate control strategy. VBR commonly cause better visual quality marks than CBR for the same average PSNR values for sequences.
For subjective video comparison it's difficult to use big amount of sequences. Commonly 3-4 10 seconds sequences are used in comparison with full movies compared with objective metrics. So sequences selection become pretty important (as far as those sequences will be close to the developers codec tuned sequences, their results will be more competitive).
Number of frames per second (FPS) commonly used for compression/decompression speed measurement.
In case of codecs following issues should be taken into account for correct comparison:
- Decompression (sometimes compression) frame time uniformity. Big difference in this time can cause annoying jerkily playback.
- SIMD support by processor and codec — MMX, SSE, SSE2.
- Multi-threading support by processor and codec (sometimes Hyper-threading support turning on cause codec speed decreasing)
- RAM speed (pretty important for codecs)
- Processor's cache size (sometimes cause serious speed degradation on low cache CPU's such as the Intel Celeron.)
for example codec A is more optimized for memory usage (use less memory) but shows lower results than codec B on modern computer. The same codecs places can be swapped on old processor with limited cache size.
Modern standards define a wide range of features and require very substantial software or hardware efforts and resources for their implementation. Only selected profiles of a standard are typically supported in any particular product. (This very common situation for H.264 implementations for example.)
The H.264 standard includes the following seven sets of capabilities, which are referred to as profiles, targeting specific classes of applications:
- Baseline Profile (BP): Primarily for lower-cost applications with limited computing resources, this profile is used widely in videoconferencing and mobile applications.
- Main Profile (MP): Originally intended as the mainstream consumer profile for broadcast and storage applications, the importance of this profile faded when the High profile was developed for those applications.
- Extended Profile (XP): Intended as the streaming video profile, this profile has relatively high compression capability and some extra tricks for robustness to data losses and server stream switching.
- High Profile (HiP): The primary profile for broadcast and disc storage applications, particularly for high-definition television applications (this is the profile adopted into HD DVD and Blu-ray Disc, for example).
- High 10 Profile (Hi10P): Going beyond today's mainstream consumer product capabilities, this profile builds on top of the High Profile — adding support for up to 10 bits per sample of decoded picture precision.
- High 4:2:2 Profile (Hi422P): Primarily targeting professional applications that use interlaced video, this profile builds on top of the High 10 Profile — adding support for the 4:2:2 chroma sampling format while using up to 10 bits per sample of decoded picture precision.
- High 4:4:4 Predictive Profile (Hi444PP): This profile builds on top of the High 4:2:2 Profile — supporting up to 4:4:4 chroma sampling, up to 14 bits per sample, and additionally supporting efficient lossless region coding and the coding of each picture as three separate color planes.
The standard also contains four additional all-Intra profiles, which are defined as simple subsets of other corresponding profiles. These are mostly for professional (e.g., camera and editing system) applications:
- High 10 Intra Profile: The High 10 Profile constrained to all-Intra use.
- High 4:2:2 Intra Profile: The High 4:2:2 Profile constrained to all-Intra use.
- High 4:4:4 Intra Profile: The High 4:4:4 Profile constrained to all-Intra use.
- CAVLC 4:4:4 Intra Profile: The High 4:4:4 Profile constrained to all-Intra use and to CAVLC entropy coding (i.e., not supporting CABAC).
Moreover, the standard now also contains three Scalable Video Coding profiles.
- Scalable Baseline Profile: A scalable extension of the Baseline profile.
- Scalable High Profile: A scalable extension of the High profile.
- Scalable High Intra Profile: The Scalable High Profile constrained to all-Intra use.
An accurate comparison of codecs must take the profile variations within each codec into account.
See also MPEG-2 Profiles and Levels.
Supported rate control strategies
Videocodecs rate control strategies can be classified as:
Variable bit rate (VBR) is a strategy to maximize the visual video quality and minimize the bit rate. On fast motion scenes, a variable bit rate uses more bits than it does on slow motion scenes of similar duration yet achieves a consistent visual quality. For real-time and non-buffered video streaming when the available bandwidth is fixed, e.g. in videoconferencing delivered on channels of fixed bandwidth, a constant bit rate (CBR) must be used.
CBR is commonly used for videoconferences, satellite and cable broadcasting. VBR is commonly used for video CD/DVD creation and video in programs.
Usage of different rate control strategies — one of the main reasons of different results of codecs, implemented one standard.
|Codec||Creator/Maintainer||First public release date||Latest stable version||License||Patented compression formats||Compression method|
|libtheora (Theora)||Xiph.org||2002-09-25||1.1.1 (2009)||BSD-style||noneTemplate:Ref label||Lossy|
|dirac-research (Dirac)||BBC Research Department||2008-09-17||1.0.2 (2009)||MPL 1.1, GNU GPL 2, GNU LGPL 2.1||none||Lossy/lossless|
|Schrödinger (Dirac)||David Schleef||2008-02-22||1.0.7 (2009)||MPL 1.1, GNU GPL 2, GNU LGPL 2, MIT License||none||Lossy/lossless|
|x264||x264 team||2003||r1376 (2009)||GNU GPL||Non-free MPEG-4 AVC/H.264||Lossy/lossless|
|Xvid||Xvid team||2001||1.2.2 (2009)||GNU GPL||Non-free MPEG-4 ASP||Lossy|
|FFmpeg (libavcodec)||FFmpeg team||2000||0.5 (2009)||GNU LGPL||Non-free MPEG-1, MPEG-2, MPEG-4 ASP, H.261, H.263, VC-3, WMV7, WMV8, VP5, VP6, MJPEG etc.||Lossy/lossless|
|FFavs (libavcodec)||FFavs team||2009||0.0.3||GNU LGPL||Non-free MPEG-1, MPEG-2, MPEG-4 ASP etc.||Lossy/lossless|
|Blackbird||Forbidden Technologies plc||2006-01||2||Non-free Proprietary||Non-free Blackbird||Lossy|
|DivX||DivX, Inc.||2001||7.0 (2009)||Non-free Proprietary||Non-free MPEG-4 ASP, H.264||Lossy|
|DivX ;-)||a hack of Microsoft's MPEG-4v3 codec||1998||3.20 alpha (2000)||Non-free Proprietary||Non-free Microsoft's MPEG-4v3 (not MPEG-4 compliant)||Lossy|
|3ivx||3ivx Technologies Pty. Ltd.||2001||5.0.2 (2007)||Non-free Proprietary||Non-free MPEG-4 ASP||Lossy|
|Nero Digital||Nero AG||2003||Template:Unk||Non-free Proprietary||Non-free MPEG-4 ASP, H.264||Lossy|
|Sorenson Video||Sorenson Media||1998||Non-free Proprietary||Non-free Sorenson Video||Lossy|
|Sorenson Spark||Sorenson Media||2002||Non-free Proprietary||Non-free Sorenson Spark||Lossy|
|VP3||On2 Technologies||2000||BSD-style||noneTemplate:Ref label||Lossy|
|VP4||On2 Technologies||2001||Non-free Proprietary||Non-free VP4||Lossy|
|VP5||On2 Technologies||2002||Non-free Proprietary||Non-free VP5||Lossy|
|VP6||On2 Technologies||2003||Non-free Proprietary||Non-free VP6||Lossy|
|VP7||On2 Technologies||2005||Non-free Proprietary||Non-free VP7||Lossy|
|VP8||On2 Technologies||2008||Non-free Proprietary||Non-free VP8||Lossy|
|DNxHD||Avid Technology||2008||Non-free Proprietary||Non-free VC-3||Lossy|
|Cinema Craft Encoder SP2||Custom Technology Corporation||2000||1.00.01.09 (2009)||Non-free Proprietary||Non-free MPEG-1, MPEG-2||Lossy|
|TMPGEnc Free Version||Pegasys Inc.||2001||2.525.64.184 (2008)||Non-free Proprietary||Non-free MPEG-1, MPEG-2||Lossy|
|Windows Media Encoder||Microsoft||1999||9 (2003) (WMV3 in FourCC)||Non-free Proprietary||Non-free WMV, VC-1, (in early versions MPEG-4 Part 2 and not MPEG-4 compliant MPEG-4v3, MPEG-4v2)||Lossy|
|Cinepak|| Created by SuperMac, Inc.
Currently maintained by Compression Technologies, Inc.
|1991||188.8.131.52 (1999)||Non-free Proprietary||Template:Unk||Lossy|
|Indeo Video||Intel Corporation, currently offered by Ligos Corporation||1992||5.2||Non-free Proprietary||Non-free Indeo Video||Lossy|
|TrueMotion S||The Duck Corporation||1995||Non-free Proprietary||Non-free TrueMotion S||Lossy|
|RealVideo||RealNetworks||1997||RealVideo 10||Non-free Proprietary||Non-free H.263, RealVideo||Lossy|
|ACT-L3||Streambox||Template:02-21-03||Template:3.4 (2009)||Non-free Proprietary||Template:Unk||Lossy|
|Huffyuv||Ben Rudiak-Gould||2000||2.1.1 (2003)||GNU GPL 2||none||Lossless|
|Lagarith||Ben Greenwood||2004-10-04||1.3.20 (2009)||GNU GPL 2||none||Lossless|
Native operating system support
Note that operating system support does not mean whether video encoded with the codec can be played back on the particular operating system – for example, video encoded with the DivX codec is playable on Unix-like systems using free MPEG-4 ASP decoders (FFmpeg MPEG-4 or Xvid), but the DivX codec (which is a software product) is only available for Windows and Mac OS X.
|Codec||Mac OS X||other Unix & Unix-like||Windows|
|Sorenson Video 3||Yes||No||Yes|
|Codec||Compression type||Basic algorithm||Highest supported bitrate||Highest supported resolution||Variable frame rate|
|Blackbird||Lossy compression||Template:Unk||Template:Unk||384×288 (PAL), 320×240 (NTSC)||Yes|
|Cinepak||Lossy compression||Vector quantization||Template:Unk||Template:Unk||Template:Unk|
|Dirac||Lossy/Lossless compression||Wavelet compression||Unlimited||Unlimited||Yes|
|Sorenson 3||Lossy compression||Template:Unk||Template:Unk||Template:Unk||Template:Unk|
|Theora||Lossy compression||Discrete cosine transform||2 Gibit/s||1,048,560×1,048,560||Via chainingTemplate:Ref label|
|RealVideo||Lossy compression||Discrete cosine transform||Template:Unk||Template:Unk||Yes|
Freely available codecs comparisons
List of freely available comparisons and their content description:
|Name of comparison||Type of comparison||Date(s) of publication||List of compared codecs||Comments|
|Series of Doom9 codec comparisons||Series of subjective comparison of popular codecs||
||Subjective comparison with convenient visualization|
|Series of MSU annual H.264 codecs comparisons||Series of objective H.264 codecs comparisons with MPEG-4 ASP reference||
||Detailed objective comparisons|
|Series of Lossless Video Codecs Comparison||Two size and time comparisons of lossless codecs (with lossless checking)||
||in 2007 — more detailed report with new codecs including first standard H.264 (x264)|
|MSU MPEG-4 codecs comparison||Objective comparison of MPEG-4 codecs||
||DivX 5.2.1, DivX 4.12, DivX 3.22, MS MPEG-4 3688 v3, XviD 1.0.3, 3ivx D4 4.5.1, OpenDivX 0.3||Different versions of DivX was also compared. The Xvid results may be erroneous, as deblocking was disabled for it while used for DivX.|
|Subjective Comparison of Modern Video Codecs||Scientifically accurate subjective comparison using 50 experts and SAMVIQ methodology||
||DivX 6.0, Xvid 1.1.0, x264, WMV 9.0 (2 bitrates for every codec)||PSNR via VQM via SSIM comparison was also done|
|MPEG-2 Video Decoders Comparison||Objective MPEG-2 Decoders comparison||
||bitcontrol MPEG-2 Video Decoder, DScaler MPEG2 Video Decoder, Elecard MPEG-2 Video Decoder, ffdshow MPEG-4 Video Decoder (libavcodec), InterVideo Video Decoder, Ligos MPEG Video Decoder, MainConcept MPEG Video Decoder, Pinnacle MPEG-2 Decoder||Objectly tested (100 times per stream) decoders "crash test" (test on damaged stream — like scratched DVD or satellite samples)|
|Codecs comparison||Personal subjective opinion||
||3ivx, Avid AVI 2.02, Cinepak, DivX 3.11, DivX 4.12, DivX 5.0.2, DV, Huffyuv, Indeo 3.2, Indeo 4.4, Indeo 5.10, Microsoft MPEG-4 v1, Microsoft MPEG-4 v2, Microsoft RLE, Microsoft Video 1, XviD, 3ivx, Animation, Blackmagic 10-bit, Blackmagic 8-bit, Cinepak, DV, H.261, H.263, Motion-JPEG, MPEG-4 Video, PNG, Sorenson Video, Sorenson Video 3||Sometimes comparison is short (up to one text line per codec)|
|Evaluation of Dirac and Theora||Scientific paper||
||Dirac, Dirac Pro, Theora I, H.264, Motion JPEG2000 (the tested codecs are from Q2-2008)||Quite detailed comparison of software available in Q2-2008; However, a buggy version of ffmpeg2Theora was used|
- Comparison of media players
- List of video players (software)
- List of codecs
- Comparison of audio codecs
- Comparison of container formats
- Comparison of video encoders
- Comparison of video editing software
Notes and references
- ↑ Thomos, N., Boulgouris, N. V., & Strintzis, M. G. (2006, January). Optimized Transmission of JPEG2000 Streams Over Wireless Channels. IEEE Transactions on Image Processing , 15 (1).
- ↑ Xiangjun, L., & Jianfei, C. ROBUST TRANSMISSION OF JPEG2000 ENCODED IMAGES OVER PACKET LOSS CHANNELS. ICME 2007 (pp. 947-950). School of Computer Engineering, Nanyang Technological University.
- ↑ Xiph.Org Foundation (2009) Theora development website - news, Retrieved 2009-10-06
- ↑ 4.0 4.1 Theora.org FAQ: what is the license for Theora?
- ↑ 5.0 5.1 Dirac Video Compression, Retrieved on 2009-08-08
- ↑ x264 - Jarod's unofficial builds for Windows, Retrieved on 2009-12-13
- ↑ x264 - a free h264/avc encoder, Retrieved on 2009-08-08
- ↑ Xvid.org, Retrieved on 2009-08-08
- ↑ FFmpeg.org, Retrieved on 2009-08-09
- ↑ FFavs, Retrieved on 2009-08-08
- ↑ VirtualDub VirtualDub documentation: codecs, Retrieved on 2009-08-08
- ↑ FOURCC.org Video Codecs - Compressed Formats, Retrieved on 2009-08-08
- ↑ Tom's Hardware (2001-10-22) A Tough Choice: DivX 3.20a Codec Still Better Than DivX 4.01 Codec, Retrieved on 2009-08-08
- ↑ 3ivx, Retrieved on 2009-08-09
- ↑ Nero AG What is Nero Digital, Retrieved on 2009-08-08
- ↑ Custom Technology Corporation CINEMA CRAFT - Download, Retrieved on 2009-08-11
- ↑ Pegasys Inc. What Is New, Retrieved on 2009-08-11
- ↑ Compression Technologies, Inc., current maintainer of Cinepak
- ↑ RealNetworks Products - Codecs, Retrieved on 2009-08-07
- ↑ Huffyuv v2.1.1, Retrieved on 2009-08-09
- ↑ Lagarith Lossless Video Codec, Retrieved on 2009-08-09
- ↑ Theora.org FAQ: isn't VP3 a patented technology?
- ↑ Technical description of the Cinepak codec
- ↑ 24.0 24.1 Frame rate, resolution, etc. are coded as variable length data.
- ↑ 25.0 25.1 PDF (827 KB)
- ↑ Requires about 3 terabytes per uncompressed frame at maximum resolution (pg 37, Theora I Specification. March 7, 2006)