A quick guide to video codecs
What is it?
Still standing for, COder / DECoder with the same functionality that we brought to you in last week's "A quick guide to audio codecs". Once again, it's the second part of the word that most people will be more familiar with, as that part is handled by the device the video is being played back on. Those include and range from a computer, to a web browser and portable media players such as the iPod or even a mobile phone.
More often than not you're unaware of the COder part of the process, that's when the video has been transformed from the initial larger source into its compressed version for the convenience of playback. By the time you normally see video, this has already taken place.
A lot of devices such as portable media players, camcorders and mobile phones are accompanied by software for the single purpose of converting other video formats to ones it can handle. There are even DVDs shipping today with versions already on the retail disc tailored for products such as the PSP, where this conversion process has already been taken care of.
Just as in last week's piece, it's still best to think of the various codec types for video as file types, such as the .doc file or the .pdf. Although unlike before, some may be transparent as the extension – the words that come after the "." of the file name – defining the codec that's used, isn't always disclosed on websites or by the operating system. Key examples of that would be the likes of QuickTime movie trailers or videos on YouTube, these both fall into this category.
What are the variations of the technology?
Unlike the simple MP3 audio file, which can almost certainly be played back on many devices natively – video is nearly always dependent on another piece of software or a codec file suite to be installed. There are a number of reasons behind this ranging from licenses used by the software to encode the video, down to the media not being native to the device.
More than likely you've come across a video on a computer that's been downloaded and cannot be played, where the above is the sole reason for that. On portable media players that are solely designed for this purpose or a similar one, this has normally been taken care of already and is built in.
As mentioned last week in the difference between lossy and lossless, with the first process used to bring files down to smaller version aspects can be lost along the way. Nearly all video encoding is performed in this fashion, with very few exceptions. The way most videos are encoded is by concentration where the action or fast motion is on the screen, and to a lesser extent on the other areas that do not change as much. There is a lot more to it than just that, but this gives you a basic idea of how the compression is achieved.
With all the above in mind, there are several formats of video around, far more than with audio, that are in common usage today. How familiar you are with these formats all depends on what and how you use video. As these all vary from downloading video, to watching embedded materials on websites to capturing video yourself.
MPEG-2 is one of the formats that's been around for the longest, and one of the most frequently used. You might have come across this as a file with a .MPG extension, or failing that it's at the very heart of DVDs, or .VOB files.
One of the other common formats is the .AVI file. These could be under the guise of a few different codecs, more often than not you'll find them under just one or two flavours these days. With nearly all the AVI video content around for downloading today, the usual way of encoding these files is in a format or codecs known as DivX, and its open source equivalent Xvid.
These were born from the technology behind MPEG-2 and could be seen as the advancement of that, as they fall into the category of MPEG-4. Without going into too much detail, more can be fitted into these files and in an overall smaller file size than MPEG-2. DivX was the standard for some time and was from a company of that very name, whereas the Xvid is under GNU General Public License. It's freely available to be used on many systems from computers, to portable media players and is even seen on games consoles now.
You will have undoubtedly watched a video on that codec format, as the sheer plethora of content around today for downloading is just vast. There's even talk of UK broadcasting companies adopting this format for transmitting channels into your home, where even HD broadcasts are already using this in the USA right now.
It'll probably be remiss of us not to mention Windows Media Video or the .WMV file format. This proprietary standard by Microsoft is widely used, although not as popular as the ones above it is gaining more momentum. Beforehand DVDs could be brought down to Xvid files by encoding them, with the quality still being sustained during the process. Taking down a high definition video via one of these codecs doesn't deliver the best results, which is why more and more HD content is now around in the latest incarnation of the WMV file format – Windows Media Video 9.
Why should I care?
Just as last week, size once again does matter, just as quality does too. If you saw the inconceivable size of video footage, before a codec is applied you'd be running for the hills to obtain many, many terabytes of storage. Yes, it's that vast.
These file types were introduced for many reasons, ranging from the best possible way to deliver video conveniently to streaming over the Internet – all of which relate to size, with the best quality taken into consideration.
Bitrates are also to be factored in, just as they are with audio files. The higher the rate, the better the quality of the video and the larger the file size.
When it comes down to producing video and encoding, that's a whole different topic and a much more complex one at that. Although there are simple solutions around - like YouTube - for getting personal video content out there; with the greatest ease of use being key.
What's a good example in practice?
The last paragraph really says it all, in terms of the everyday use of video producing – the flip side of video playback.
As with playback the best practice of this medium is all down to the device you use or the very place you watch video. Flash content is used by most people, a step up from that is the likes of iPlayer and moving on further is downloadable video.
It's more common to see Xvid material around in the latter, with more and more devices and computers with the codec files installed being able access these videos.
Is there a competing technology that I should be aware of?
There isn't another technology competing in the same realm as such, other than the more advanced video codec formats we'll mention later.
In the audio codec guide from last week, we touched on the files being static, as in they're stored and played from a device – with the alternative way of using audio possibly being "streaming" over the Internet. This might very well apply here too, with video content being much more widely available online. Some might even argue more so than audio, depending on who uses it and for what purpose.
What is in store for the future?
The next step on the evolutionary ladder is HD codecs and video content. Most of the formats around in common usage aren't really geared up to deliver the type of video quality, or compression levels needed. The next rung, which we briefly touched upon with WMV9, as with others they all surround x264 or H.264 format which is set up for capture and displaying of 720 and 1080 materials.
H.264 is the industry standard used for high definition content, it's at the heart of Blu-ray media and also the dying out HD DVD format. It's also in the same category of MPEG-4, so it's a well tried and tested medium already.
Those Xvid formats we mentioned earlier can be used to encode a DVD, which could initially contain a film of 8.5GB in size down to around the 700MB mark. Where if you think of the capacity of Blu-ray discs, which could possibly contain films of over 50GB in stature the codec needed to compress such a beast has to be cutting edge.
This is where the new breed comes in to play, with the likes of WMV9 and similar formats with file extensions such as .MKV or .264. These are geared up to deliver 16:9 1080p content, in a much smaller file container around the region of 11GB on average.