let’s talk about codecs.
if you shoot video, edit video or even just watch video you might have heard the names of some codecs, things like ProRes, AVCHD, XDCAM, or H.264 and it seems like these days the list of codecs goes on, and on, and on. codecs are something a lot of people get pretty confused about so I’m going to attempt to clear the air on this topic and help you wade through all this codec mumbo jumbo.
so let’s get down to brass tacks. the first question you’re probably asking is, what is a codec? to which I’d answer: the word codec is a portmanteau of the words compressor-decompressor, or coder-decoder. then I’d cross my arms and be done with it, but because that doesn’t help anyone, let’s go even further. what this really means is that a codec is essentially an algorithm that compresses something for storage and then decompresses it when you view it. codecs are used for both audio and video and are essential for keeping files from eating up all of our precious memory card and hard drive space.
but wait, a codec is a compression scheme and compression is evil right? well not exactly, everything you’ve seen or shot and probably everything you will ever see or shoot will have some form of compression applied to it, this is not always a bad thing. what can keep compression from being evil is it’s efficiency, if a codec is really good and you can’t tell the difference between the compressed footage and original footage does it matter if it’s compressed? (it can but more on that later) think about the moment you stopped caring about the difference in sound between a good mp3 or iTunes download and a cd or record. eventually, the codecs used for digital audio downloads reached a point where for most people they sounded so close to the original that your ears could no longer tell the difference in quality and all of this was able to happen while maintaining a relatively low file size thanks to compression.
for video and filmmaking it hasn’t been as easy to find and create the ideal codec for two main reason:
because your eyes are usually tougher to fool than your ears.
because we don’t just watch our videos after we shoot them, we edit and manipulate them and this causes completely different strains on how a codec is treated.
to better understand these two reasons let’s take a minute and look at how the compression of a video codec is achieved.
a good video codec is a delicate balancing act of video quality, the amount of data transmitted to allow for that quality (which we’ll call bit rate from here on out) and the chroma subsampling ratio used relative to the compression. I know I probably shouldn’t throw around terms like chroma subsampling without giving an explanation so let me try to simply break it down. a video signal is divided into luminance (brightness) and chrominance (colour) and in a perfect world is displayed as 4:4:4 (4 (luma): 4(chroma): 4 (chroma)). the human eye is more sensitive to brightness than it is colour so chroma is usually the area that is cut down the most when compressing video. unless you’re working with something near raw and don’t mind massive files you’ll commonly see 4:2:2 for higher end digital formats (where colour information in both channels are essentially halved) and 4:2:0 for medium to lower end high definition formats (where colour is halved in one channel and almost absent in the other) and 4:1:1 for standard definition formats (where colour is quartered in both channels).
most people shouldn’t visually be able to tell the difference between 4:4:4, 4:2:2, and 4:2:0 when a good codec is used to compress it. but remember earlier when I said it can still matter even if you can’t visually tell the difference? here’s when: it matters if you’re going to either make big changes to your image with extreme colour grading or if you intend to do a lot of post graphics or effects. doing those things can push the limits of lower quality formats leading to the breakdown of the codec where you can start to see ugly macro blocking, softness, or other compression artifacts that are usually hidden.
this means that we generally always want to try and use the best codec possible to shoot and edit our footage because we now know the layout of a codec is essentially: efficiency + bit rate + chroma subsampling = final video quality. that means that unless we are dealing with an insanely efficient codec, it’s usually the higher the bit rate and the higher the chroma subsampling, the better our final image quality should be.
so let’s take a look at some popular codecs and how they stack up.
Codec Colour Space Bit Rate (Megabits/sec)
ProRes 444 4:4:4 330Mbs
ProRes 422 (HQ) 4:2:2 220Mbs
ProRes LT 4:2:2 102Mbs
Avid DNxHD 4:2:2 220Mbs
Canon XF 4:2:2 50Mbs
XDCAM EX 4:2:0 35Mbs
Canon DSLR (gen 1) H.264 4:2:0 44Mbs
Canon DSLR (gen 2) ALL-I 4:2:0 91Mbs
Canon DSLR (gen 2) IPB 4:2:0 31Mbs
Nikon D800 H.264/AVC 4:2:0 24Mbs
AVCHD 4:2:0 24 or 28Mbs (depending on frame rate)
now while the numbers aren’t exactly fair (because some formats like AVCHD are more efficient than their bit rate makes it seem) it should be fairly easy to tell which codecs are less compressed and therefore better. that means in practical use if you’ve got a 5D Mark III for example shooting in the ALL-I format instead of IPB should give you a less compressed image, giving you more room in post. or when transcoding your 7D footage for that effects heavy music video you’re doing you should consider ProRes HQ over LT, to slow the generational break down of your video as you work with it. we typically choose to transcode our DSLR footage based on what we’re doing with it and where it’s going, not every piece necessarily requires huge hard drive eating ProRes files.
now I could have gone super techno-geek on this and dove much deeper into the confusing waters of codecs (I didn’t talk about bit depth at all, or cover what really makes one format more efficient than another for example) but I think this is a good place to leave it for now, more than anything this was intended to give you a brief overview of what a codec is and why the codec in your camera is worth thinking about. for certain jobs it may be worth bypassing the internal codec in your camera with an external recorder, or maybe using a different camera all together. if you take the time and empower yourself with the strengths and weaknesses of the tools you have at your disposal you’ll be better equipped on set and in post to make decisions that will hopefully lead to a better end product.