How-To: Turn Your Mac mini into a DVD Jukebox
Video Format Roundup
If dedicating 4GB or more of your hard drive to a movie doesn’t sound like a good value, consider converting it from the DVD’s standard MPEG-2 to something smaller. You’ll give up a bit of quality and some of your time, but you can turn that 4GB VIDEO_TS folder into a QuickTime file that is seventy-five percent smaller.
Now, if you’re an HDTV enthusiast who enjoys arguing over whether 720p is better than 1080i, it’s reasonable to assume that ‘give up a bit of quality’ isn’t a phrase you’re comfortable with. If so, feel free to buy a nice big hard drive and stuff it full of pure DVD source content. For the rest of us, we’ll take a tour through the video supermarket and see what suits our needs.
There are other advantages to converting your video. In particular, we contend with the lack of a comprehensive video library manager and playback application—there are several applications that do this, but they all wrangle only a subset of the common formats. Similarly, there isn’t a polished application that can suck in your DVD and save off an encoded file that’s usable by the whole family. By centralizing our content into a single, high-quality format, we solve some problems and get eighty percent of the way to a solution on the others. In other words, good times are here with Mac OS X 10.4 and QuickTime 7.
Touring the Video Format Menagerie
Container Formats
If you’ve ever looked at video files, you’ve run across the major container formats: MPEG (.mpg), MPEG-4 (.mp4), QuickTime (.mov), AVI (.avi), and RealMedia (.rm). There exists a smattering of other file types such as Video Object (.vob) inside your DVDs VIDEO_TS folder, Ogg Media (.ogm) and others. Simply put, these standards define how the individual video, audio, subtitle, or other streams mights be packaged inside a single file. A container may contain multiple video streams, multiple audio streams, and different subtitle streams. Container formats say relatively little about the composition of individual streams, aside from identifying which types are permitted in the container. Since QuickTime and MPEG-4 (itself based on QuickTime’s file format) play best on our team, we’ll stick with these.
File/Stream Formats
Stream formats often stand as independent files, aside from the containers outlined above. For audio, there is the common MPEG-1 Level 3 (.mp3) format; others include the MPEG-4 Advanced Audio Codec (.aac, .m4a), Apple Lossless (as used by Airport Express, also .m4a), Dolby Digital Audio Codec 3 (.ac3), Free Lossless Audio Codec (.flac), Audio Interchange File Format (.aiff), and so on. For video, there’s MPEG-2 (.mpeg, .mpg), MPEG-4 Simple Profile (SP), MPEG-4 Advanced Simple Profile (ASP), Windows Media Video (.wmv), Pixlet (.mov) and countless others. These specify how, exactly, your seemingly perfect video or audio can get hacked up into computer-efficient nuggets, stored, and later reassembled into something that more-or-less resembles the original.
Codecs
The file formats for the different streams are handled by codecs—compressor/decompressors. Different file formats and codecs make different trade-offs. Some audio formats/codecs designed for voice transmission (such as PureVoice, which is used on many cell phones), while others like MP3 are designed for music (Suzanne Vega’s “Tom’s Diner”, to be precise). For the MP3 format, two of the many codecs are Fraunhofer and LAME. They each make fully compatible MP3 files, but each makes different decisions on how to preserve quality while reducing size. In video, the popular DivX, XviD, and 3ivx formats are different MPEG-4 codecs, each of which creates either Simple Profile or Advanced Simple Profile files that, again, make different decisions on how to hack up your video. These three codecs also extend the MPEG-4 format, making resulting files incompatible with generic MPEG-4 codecs, yet they remain compatible enough to work in the MPEG-4 container format.
Apple’s bet-the-farm video move is H.264, also known as AVC, which is a subset of the MPEG-4 standard called MPEG-4 Part 10. (Yes, really.) H.264 is a subset—called a layer—of MPEG-4, as are SP, ASP, and AAC. H.264 video files can in turn be packaged inside MPEG-4 containers, QuickTime containers, AVI containers, and a raft of others.
We advocate one path: turning our DVDs into QuickTime or MPEG-4 files, using MPEG-4’s AAC audio format and the new H.264 codec that’s so prominently showcased in QuickTime 7. Why?
H.264 was designed to replace H.263, an older standard that was originally designed for low-bandwidth video broadcasts such as video conferencing. As a result, H.264 is very good at reducing bandwidth while maintaining quality, so if you’re trying to squeeze your video file size, H.264 is a good candidate. (It’s also a perfect candidate for iChat AV’s videoconferencing. Funny, that.)
Don’t believe us? Apple posted an H.264 sample of a CNBC broadcast. The sample is 640x480 pixels, consumes 700kbps of bandwidth, and quite simply looks better than anything off of a standard definition TiVo. 700kbs is well within the reach of almost all U.S. broadband households; theories regarding Internet-based video-on-demand are left as an exercise for the reader.
So why not DivX, XviD, 3ivx, and the others? These are all MPEG-4 codecs, and even popular to the degree that some consumer DVD players can handle DivX content, but there are two downsides to DivX and its cousins:
- DivX isn’t standard MPEG-4. It’s a proprietary variant of MPEG-4. While popular enough that it’s unlikely to go away, the future of HD broadcast, video download, HD-DVD, and a huge range of other distribution media appears to be squarely with standard H.264. We’re building for the future.
- DivX and the others are based on an early MPEG-4 draft that offers fewer mechanisms to achieve high quality at lower bitrates than H.264. DivX works rather well at high bitrates—DVDs compress nicely to 1.5GB or so, but drop below 1GB and the quality quickly degrades. H.264 by comparison, can reduce the size of the basic compression blocks well below that of DivX; this permits high-contrast, fast action to not look like a greek mosaic.
If you’re compressing your video to fit on a CD, H.264 does an excellent job at preserving action sequences and reducing artifacts over every current codec. You’ll see none of the blockiness and stuttering that you may have seen in downloaded video rips.
Where H.264 reveals its compression (you can’t get something for nothing) is in large, low-contrast, slow-moving areas. Virtually all codecs stumble here, but H.264 makes no gains over its predecessors. Fortunately, your typical TV (i.e. non HDTV) is bad at dealing with low-contrast content, and the general nature of NTSC (Never The Same Color) is such that it’ll smush up your video enough that what looks not-so-good on a computer monitor looks just fine on your mom’s TV. Not as good as the original DVD, mind you, but better than what you get out of your TiVo.
H.264 yields far and away the best quality result for the file size, and it’s where Apple will invest all of their effort making it work well. What’s the big trade off? It won’t happen quickly. Each movie takes six hours or more to rip on a Mac mini, but the results are worth it. For your effort, rather than filling your 80GB mini with just the first four seasons of “Good Times”, H.264 lets you have “Good Times”, six seasons of “Sanford and Son”, four seasons of “All in the Family”, eight seasons of “M*A*S*H”, and seven (or is it six?) seasons of “The Avengers”. Good times, indeed.
Another trade-off affects only the HD crowd: H.264 is so processor intensive that a Mac mini can’t push HD content. Apple posted a number of H.264 HD sample files; the 1.42GHz mini averages 12-24 fps with 720p, but rarely leaves the single digits with 1080p. H.264 is built for the future, but the mini is built for today.


