Huffyuv
Encyclopedia
Huffyuv is a lossless video codec
created by Ben Rudiak-Gould which is meant to replace uncompressed YCbCr
as a video capture format.
Despite the "YUV" in the name, it does not compress the YUV
color space, but YCbCr. The codec can also compress in the RGB color space.
"Lossless" means that the output from the decompressor is bit-for-bit identical with the original input to the compressor. Lossless only occurs when the compression color space matches the input and output color space. When the color spaces do not match, a low loss compression is performed.
Huffyuv's algorithm is similar to that of lossless JPEG, in that it predicts each sample and then Huffman
-encodes the error.
. The Huffyuv 1.1 was released in 2000. The implementation is considered very fast, giving a compression throughput of up to 38 megabytes per second on a 416 MHz Celeron. The official Huffyuv has not had a new release since 2002.
Huffyuv 2.1.1 with CCESP patch 0.2.5 was released to address problems particularly for compatibility with Cinema Craft Encoder
.
Huffyuv 2.2 is available on some alternative sites, but is reported to have problems on some computer systems.
There is a currently developed fork
of the code named Lagarith
which offers better compression at the cost of sometimes reduced speed on uniprocessor systems.
The FFmpeg
project also contains an implementation of HuffYUV which allows HuffYUV files to be created & played on Linux
and Mac OS X
. Additionally, this means that many of the applications which use FFmpeg as a base can also play/create HuffYUV files, including VLC media player
, MPlayer
and ffdshow
.
Video codec
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...
created by Ben Rudiak-Gould which is meant to replace uncompressed YCbCr
YCbCr
YCbCr or Y′CbCr, sometimes written or , 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 component and CB and CR are the blue-difference and red-difference chroma components...
as a video capture format.
Despite the "YUV" in the name, it does not compress the YUV
YUV
YUV is a color space typically used as part of a color image pipeline. It encodes a color image or video taking human perception into account, allowing reduced bandwidth for chrominance components, thereby typically enabling transmission errors or compression artifacts to be more efficiently...
color space, but YCbCr. The codec can also compress in the RGB color space.
"Lossless" means that the output from the decompressor is bit-for-bit identical with the original input to the compressor. Lossless only occurs when the compression color space matches the input and output color space. When the color spaces do not match, a low loss compression is performed.
Huffyuv's algorithm is similar to that of lossless JPEG, in that it predicts each sample and then Huffman
Huffman coding
In computer science and information theory, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol where the variable-length code table has been derived in a particular way based on...
-encodes the error.
Implementations
The original implementation was written for Windows by Ben Rudiak-Gould and published under the terms of the GPLGNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....
. The Huffyuv 1.1 was released in 2000. The implementation is considered very fast, giving a compression throughput of up to 38 megabytes per second on a 416 MHz Celeron. The official Huffyuv has not had a new release since 2002.
Huffyuv 2.1.1 with CCESP patch 0.2.5 was released to address problems particularly for compatibility with Cinema Craft Encoder
Cinema Craft Encoder
Cinema Craft Encoder or CCE is a video encoder for MPEG-1 and MPEG-2. It is written in assembly and optimized with SIMD multimedia instructions of compatible x86 processors....
.
Huffyuv 2.2 is available on some alternative sites, but is reported to have problems on some computer systems.
There is a currently developed fork
Fork (software development)
In software engineering, a project fork happens when developers take a legal copy of source code from one software package and start independent development on it, creating a distinct piece of software...
of the code named Lagarith
Lagarith
Lagarith is an open source lossless video codec written by Ben Greenwood. It was designed and written with a few aims in mind:Speed: while not as fast as Huffyuv, it still outperforms most other lossless video codecs when it comes to encoding times, although decoding speed may be slower...
which offers better compression at the cost of sometimes reduced speed on uniprocessor systems.
The FFmpeg
FFmpeg
FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line...
project also contains an implementation of HuffYUV which allows HuffYUV files to be created & played on Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
and Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
. Additionally, this means that many of the applications which use FFmpeg as a base can also play/create HuffYUV files, including VLC media player
VLC media player
VLC media player is a free and open source media player and multimedia framework written by the VideoLAN project.VLC is a portable multimedia player, encoder, and streamer supporting many audio and video codecs and file formats as well as DVDs, VCDs, and various streaming protocols. It is able to...
, MPlayer
MPlayer
MPlayer is a free and open source media player. The program is available for all major operating systems, including Linux and other Unix-like systems, Microsoft Windows and Mac OS X. Versions for OS/2, Syllable, AmigaOS and MorphOS are also available. The Windows version works, with some minor...
and ffdshow
Ffdshow
ffdshow is a media decoder and encoder mainly used for the fast and high-quality decoding of video in the MPEG-4 ASP and AVC formats, but it supports numerous other video and audio formats as well...
.
See also
- Huffman codingHuffman codingIn computer science and information theory, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol where the variable-length code table has been derived in a particular way based on...
- Adaptive Huffman codingAdaptive Huffman codingAdaptive Huffman coding is an adaptive coding technique based on Huffman coding. It permits building the code as the symbols are being transmitted, having no initial knowledge of source distribution, that allows one-pass encoding and adaptation to changing conditions in data.The benefit of...
- PPM compression algorithmPPM compression algorithmPrediction by partial matching is an adaptive statistical data compression technique based on context modeling and prediction. PPM models use a set of previous symbols in the uncompressed symbol stream to predict the next symbol in the stream....
- YCbCr color spaceYCbCrYCbCr or Y′CbCr, sometimes written or , 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 component and CB and CR are the blue-difference and red-difference chroma components...
- Lagarith Lossless Video CodecLagarithLagarith is an open source lossless video codec written by Ben Greenwood. It was designed and written with a few aims in mind:Speed: while not as fast as Huffyuv, it still outperforms most other lossless video codecs when it comes to encoding times, although decoding speed may be slower...
- MSU Lossless Video CodecMSU Lossless Video CodecThe MSU Lossless Video Codec is a video codec developed by the Graphics & Media Lab Video Group of Moscow State University. It was designed to provide space-effective lossless video compression...
- List of codecs#Lossless compression