Intro to Video Codecs
This is the Mac Pro Podcast 23 from February 2006. It includes a package from the 2006 Sundance Film Festival and a video tutorial called “An Intro to Video Codecs”. Full tutorial transcript below the fold.
There is a lot of talk about codecs these days. We are viewing more and more video content every day . . . from the TiVo to the television, the DVD and digital cable, in iTunes and even on our iPods. But how is this content delivered to the end user?
The word CODEC is a shortening of COder / DECoder (some people say that it stands for COmpressor / DECompressor . . . that works, as well). A codec is how a piece of media is transferred from one medium to another (usually with the removal of bytes for a smaller file size — encoded) and then decoded back to the end user for viewing or listening.
For experimentation with your video and encoding using different codecs, I recommend purchasing Quicktime Pro. Quicktime Pro version 7 costs $29.99 US. The Pro upgrade will allow you to export your video and audio using different codecs, as well as do some simple editing.
Let’s discuss some of the most popular flavors of video content these days:
MPEG-2 is the codec most commonly used for standard DVDs. Some other uses for MPEG-2 include digital cable, satellite, and Digital Video Recorders (DVR’s). MPEG-2 delivers high-quality video with a notable reduction in data size. By the way, The MPEG acronym stands for Moving Pictures Experts Group– the folks who decide on standards for media codecs.
MPEG-4 was debuted to all of us Apple users with the release of Quicktime 6. This codec revolutionized the way we viewed and downloaded video content for the web. MPEG-4 boasts very good quality video with a substantial reduction in data size — great for internet delivery. The audio component of MPEG-4 video is AAC. You may recognize this as the method of delivery for music from the iTunes music store (delivered with the file extension .m4a). AAC audio is, pound-for-pound, smaller in file size than the uber-popular MP3 format, and significantly better in quality for the same data rate.
H.264 took us all by storm with the release of Quicktime 7 and Mac OSX 10.4 Tiger. This codec is based on and an improvement upon the MPEG-4 codec. H.264 gives us arguably our best quality versus file size ratio. And, on top of that, it is very scaleable– it could become the de facto standard for delivery on tiny cell phone screens, to digital satellite programming, all the way up to the new HD DVDs. You are watching a video encoded with the H.264 codec . . . in the standard 320×240 Video for iPod setting in Quicktime.
Prior to the popularity of MPEG-4 and H.264, you probably viewed a lot of Quicktime content on the web encoded with Sorenson 3. This was (and still is) a wonderful-quality codec that was released with Quicktime 5. Before the switch to H.264, all of the movie trailers on Apple’s Quicktime site were encoded this way.
If you were to open a video in Quicktime Pro and choose “Export”, and then “Movie to Quicktime Movie”, you’d see a long list of available options. Quicktime is committed to being very backward-compatible, and we’ll probably never use most of those options except for in rare or specific situations. But here are some key choices that I haven’t discussed yet:
Animation codec is a lossless codec — it can compress without any loss in quality. As its title suggests, this codec is perfect for animation — motion graphics, screen captures, etc. But once you try to throw actual video content into the mix, it will yield giant file sizes. Motion JPEG is another animation-related codec very useful for graphics. I often use the DV/DVCPRO - NTSC setting to encode content for editing in iMovie or Final Cut Pro.
Some notable third-party codecs that are worth mentioning are DiVX and XViD– both are MPEG-4-based and were designed to rival MPEG-2 in quality. A well-encoded DiVX full-length movie can fit onto a standard CD-ROM and look quite good when played back on a television.
So that was a scratch of the surface of video codecs. You might ask why I did not mention the two big players in web-delivered video– Windows Media and Real Video. Probably because neither run natively within the Quicktime environment, and, let’s face it, we’re all Mac geeks here. I want all my video Quicktime-compatible.
[...] I capture the video in a high def frame size, like 720P or 1080P . . . or some other widescreen aspect ratio. For videos that will ultimately be delivered on the web, a high-quality H.264 is generally fine, but it will have to render in Final Cut Pro. Generally it’s easiest to capture to whatever codec you edit in, whether it be HDV, XDCAM, ProRes 422. Often I’ll just use Animation codec — it’s perfect lossless quality that looks great in my edit. For more on codecs go to macmediacast.com and check out our tutorial called an Intro to Video Codecs. [...]