Formats and Codecs

With the continuing evolution of digital video and the advent of consumer-accessible high-definition video, the landscape has changed. New formats have come to light, and, with them, new codecs are now in fairly widespread use.

Say What?

A codec is defined as a compressor/decompressor, or a piece of hardware or software that compresses a data stream into a specific format for recording or decompresses the data from that same format for playback. In this context, we’ll be discussing codecs for video and audio, although there are also codecs for compressing still images and computer files used from day to day.

We’ve provided handy-dandy comparison tables of some of the most common formats you’ll run across in your days of video production. In it, we include the name of the codec, its developer, the type (whether lossy, lossless or uncompressed) and the typical use for it. We hope it helps you follow along as you read.

Why Should I Care?

The choice of which codec you use for a certain purpose may be a function of how much disk space you have on hand or what your customer might be asking for you to deliver. In these cases, the choice is easier. But if you have a choice or want to be prepared to make a case for using a different codec, we hope to arm you with the information you need.

Codecs can be lumped into several categories. One of the most-used means of comparison for codecs is whether it is lossless or lossy. Lossless compression packs the data in such a way that you preserve every single bit of it, so when you decompress the file, the original file is unscathed. A typical lossy compression scheme, on the other hand, discards data that a typical human wouldn’t notice was missing in order to save space. You could also store data in an uncompressed format that you haven’t compressed at all – this is the easiest format to process, but, of course, it also takes up the largest amount of data.

Video Codecs

The codec most video producers know best is DV, which is unique in that its compression is particularly gentle (well, processing-wise, anyway). Technically, the reason any computer editing DV can perform editing operations so quickly is that all compression on DV is performed intra-frame, so each frame stands alone. You can perform any cut cleanly, and dissolves take a minimum of processor power to execute. The most common form of DV operates at 25Mbps and is restricted to standard-definition video, but Panasonic’s DVCPRO HD (which uses four DV codecs operating in parallel) is worth mentioning as the most accessible high-definition codec that also performs intra-frame compression.

There are a couple of other major codecs used for both acquisition and distribution. The best-known of these is currently MPEG-2. MPEG-2 has become a popular distribution format for its relatively low-bitrate requirements. It is the most common format in such applications as DVD, DBS, digital cable and both of the new high-def disc formats. The other one is H.264/AVC, which is used by AVCHD and both Blu-ray Disc and HD DVD, which is approximately twice as efficient as MPEG-2 but requires significantly more processor power to play back and is supported by only a very small number of editing programs.

Distribution-only codecs include Windows Media and RealVideo. These codecs feature tremendous efficiency, since they are designed for streaming the highest-quality video possible over the finite amount of available bandwidth on the internet – the downside is that you generally are not able to edit them at all.

Another drawback when it comes to compression is that, if you make an edit on a compressed file and then recompress it, the quality may not always be preserved. Some editing programs are able to work with MPEG-2 video clips at I-frame level, so if recompression is necessary, they can do this intelligently to preserve the quality and increase the speed of the render. If the extent of your editing was simple cuts, you might find that a DVD- or hard drive-based camcorder might work just fine for your needs, when paired with an editing program that performs I-frame level editing.

As far as video goes, there are ways to store video without using compression. You’ll have to get out your credit card to use any of them, though. Any solution for using uncompressed video requires extremely high bandwidth for storage. This would be one of the times where you’d want to use a RAID 0 for storage (to maximize throughput).

To succinctly summarize this discussion, keep the following in mind. In general, the degree of compression in use determines how difficult the footage will be to edit. The considerations you have to make in finding the best balance include amount of disk space available, processing power available, the amount of bandwidth available (if streaming) or the number of bits available (if authoring to disc).

Audio Codecs

While audio takes up a much smaller amount of data on a typical project compared to video, it still bears discussion since, of course, half of the experience of a video presentation is audio. It’s also easier for pretty much any device (whether a computer, a camcorder, a playback device, etc.) to process audio than video, regardless of the levels of compression in use.

Take a simple linear PCM file that you’d get if you captured some footage from a Mini DV tape and then separated the audio from the video. This is pretty much the most raw, unprocessed form of audio that you can get. Practically any computer can process linear PCM quickly with reckless abandon – the longest part of the operation would be the time needed by the hard drive to read the file into the system.

On the other hand, before compressed audio can be edited further, the computer has to decompress it. If you, opened, say, an MP3 file in Audacity, the needed operation would happen up-front before you could actually start editing the audio.

Another differentiating factor between audio formats is the ability to encode more than just two channels of audio. Most producers working on 5.1-channel audio mixes will encode them into the Dolby Digital format. This has become the de facto standard for digital surround-sound mixes over the years, mostly as a result of being one of the two mandatory audio formats for DVD.

Wrap It Up

You know all those QuickTime and AVI files strewn about your hard drive – at the core level, they’re all the same, right? Well… not quite. There’s a bit more going on.

Take another look at the export settings screen of your editing software. Under both AVI and QuickTime, you’ll see a number of compressors other than the good ol’ reliable DV codec. There are a lot of choices you can make and a lot of options at your fingertips (so tread carefully!). This is also the reason why there’s generally no guarantee that you can play an AVI file interchangeably in any system you might bring it to. Generally, QuickTime’s codec management tends to be more robust, so it’s usually more likely that a QuickTime file can play the first time on a computer. While a particular MOV file might include Sorenson video and MP3 audio, another might include DV video and linear PCM audio. Same goes with AVI.

Both AVI and QuickTime are wrapper formats, also known as container formats. The goal of a wrapper is to be a holding tank for video and audio packets, which are multiplexed together so the program inside can be read by the computer in a logical order.

MPEG program streams are also worth mentioning here, as they are used in a modified form on DVDs. The VOB files on DVDs are little more than MPEG program streams, though they often include subtitles and CSS encryption (particularly if the VOB in question was on a Hollywood-distributed title).

Two other wrapper up-and-coming formats that include Matroska, an open-source wrapper format, and MXF (Material eXchange Format), a professional wrapper format that is used by high-end Avid editing systems and Sony’s XDCAM system. You most commonly find Matroska as a distribution wrapper format, and MXF hasn’t begun to trickle into many prosumer editing workflows quite yet.

We hope to have assisted you in understanding how codecs and formats impact your daily life as a video producer. There’s a lot here and things are evolving, as does everything else in our field.

Charles Fulton is Videomaker‘s associate editor.

Side Bar: Yawn, Another Format War

Although we’re magazine editors, we are fellow consumers along with our audience. As such, we are tremendously disappointed that another format war is taking place in HD disc formats. HD DVD and Blu-ray Disc are currently slugging it out in the marketing and retail arenas. (Ed. Note: At press time, Warner announced it is planning to switch from HD DVD to Blu-ray Disc, so many voices we hear are now declaring Blu-ray Disc the winner.) We had hoped that all of the manufacturers would have figured out that consumers generally roll their eyes when there’s a prospect of choosing the wrong format (remember how VCR sales were slow until VHS killed off the consumer version of Beta?).

This isn’t the first format war we’ve seen lately, particularly as far as the DVD Forum is concerned. The DVD-R vs. DVD+R fracas from a few years ago was resolved relatively quietly, with the benefit of pretty much all burners now being able to handle either type of media. And the DVD-Audio vs. Super Audio CD war has pretty much fizzled (unless you happen to be talking to a hardcore audiophile). Neither format was adopted widely – the humble CD sounds just fine to pretty much everyone we know. (Yes, we know that some of you still prefer LPs… good for you.)

Then again, there’s recently been a lot of chatter about how the 1-2 punch of even-more-refined compression algorithms and ever-faster broadband Internet access might completely eliminate the need or want for a HD disc format at all, rendering the whole discussion moot. The sooner, the better, we say.

The Videomaker Editors are dedicated to bringing you the information you need to produce and share better video.

Related Content