Home Theater


Mac Mini-driven Media Center

Ever dream of using a Mac-based system to create an HD movie jukebox?
Here's a checklist for a simple Mac Mini-based Media Center:

BD-ROM external drive MakeMKV blu-ray LaCie Big Disk Mac mini Plex App Mini DisplayPort + USB to HDMI

Due to noise, I recommend putting the big hard drive in another room, perhaps on the other side of a wall, and using the long FW800 cable to connect it to the Mac mini. You can use the BD-ROM with MakeMKV to archive 1080p content from Blu-ray discs using the Mac mini and save them to the LaCie, then use Plex, configured to scan that drive, to play them back.

In essence, this also creates a Mac-based Blu-ray player, with the delay of writing the video data to a hard drive (although a future version of MakeMKV + VLC may work around that), but the advantage is that you can hold the last 30 movies you've archived (like a TiVo). No more previews or Blu-ray advertising, no more long-bootup sequence every time you select a movie, no more counterproductive warnings saying "upgrade your player's firmware otherwise booting takes 2-3 minutes", etc.

My Home Theater

To view high-quality 1080p and multichannel audio content I combine:

  • File server to hold video and audio content
  • Gigabit Ethernet
  • Network streaming
  • Media center user interface
  • Playback of surround-sound audio and HD video to HDMI
My system's original purpose is to present HD content I create from my own HD video camera at a level matching Blu-ray-quality. In early 2010 I figured out how to add content from Blu-ray too. Here is the system, from beginning to end of the data flow.

Blu-ray Disc Looking for a source of high-quality 1080p content available to the public, consumers today don't have much choice: it's simply Blu-ray. We have Time-Warner cable, and its HD is "okay", but the macro-block artifacts from the temporal compression during movement become all too obvious. Most other online sources are at best 720p, so until something with better quality and selection comes along, Blu-ray is the devil with which we dance. Blu-ray disc
BD-ROM External Drive External Slimline USB 2.0 BD-ROM drive at FastMac for $120 (as of January 2010). It's fairly bare-bones, just a simple drive to read data from Blu-ray discs (BD). Since I had no interest in burning to Blu-ray, I looked for an inexpensive BD-ROM drive. BD-ROM external drive
Mac Pro The Mac Pro is my preferred editing platform, so final versions of my HD content is generated here. As for Blu-ray, I find decoding discs to be much easier to do in a setting for using computers, rather than on the couch in front of the TV. A Mac Pro is overkill for simply reading data (takes only 29% CPU on the Mac Pro and works fine using a MacBook), but the horsepower is useful when transcoding data to smaller formats for portable devices such as a laptop, iPad, or iPhone. I originally thought transcoding was required, like in HandBrake, to convert a BD, until I found the right software: Mac Pro desktop
MakeMKV MakeMKV was the link in this chain that I found last. MKV is an open-source format designed to perform a similar function to QuickTime's MooV (or .mov) format: a container for multitrack video and audio data. Just like how MooV can hold MPEG-4, h.264, Cinepak, whatever, MKV can supply a similar function.

The genius of MakeMKV is that it processes as little as possible (only 29% CPU load when processing at 8 MB/s). MakeMKV decrypts the Blu-ray data, saving the unencrypted HD video and multichannel audio content, unchanged, into the MKV format.

The downside of MakeMKV is that it has a GUI only a programmer can love, but this disadvantage is clearly made up by the stunning results of the video and audio delivered downstream.

MakeMKV blu-ray
Gigabit Switch I use a Netgear GS116 Gigabit Ethernet Switch to connect my Macs together, including the Mac Pro, the Mac mini, and the Xserve G5-based file server. I highly recommend using wired Gigabit for this purpose because HD video requires a steady, reliable, and substantial stream of data, and Gigabit allows plenty of headroom here. WiFi is too easily disrupted by otherwise benign traffic or other interference, from neighbors, microwave ovens, etc. I shouldn't have to say that my whole network is behind firewalls, etc., to prevent disruption. Netgear GS116 Gigabit Switch
Xserve G5 We use Mac OS X Server 10.5.8 on an Xserve DPG5 2.3 GHz Compute Node to support Time Machine backups, media serving, and other general storage. If all you are serving is media, this is overkill, but we already have a need for these other functions, so it made sense the consolidate all these capabilities into one device. Previously we used a Power Mac G4/867 but found it inadequate to stream quality HD content, causing choppiness in playback.

Another reason to use a separate server is so that the noisy components can be out of earshot of the home theater, and someday we can add multiple Mac-driven HDTVs to the network and stream movies to any of them. The Xserve and its drives are housed in a rack in the garage, protected from dust with an HVAC-standard filter.

Permissions of the Xserve's Share Points are set up so that any guest can load the media directories as read-only, while only an administrator can write to them. An APC Back-UPS ES 750 is battery-backup for the Xserve and its external drives, configured to automatically shut down if battery levels reach 5%. This helps preserve data in case of power failure. In a power outage, this configuration lasts about 15 minutes, more than enough for safe shutdown.

Xserve G5

Xserve G5 in the garage

Drobo Drobo with FireWire 800 for $400 plus 4 * 1 TB SATA drives is the primary storage for Time Machine and general storage. The intent was to store all media on this drive as well. At the moment all the SD content and self-generated HD content is stored here, plus small tests for HD content (e.g., Trailers @ Apple), enough to prove that the Drobo can deliver HD content using the right server. If we weren't already using 2 TB of the 2.7 TB of protected storage, I would put all my content here. I highly recommend putting the Drobo on battery backup. Also keep the Drobo's free space above 5%, otherwise its performance will suffer. Drobo
LaCie 1 TB or Drobo #2 Due to space issues on the first Drobo, I first used my LaCie Big Tisk 1 TB with FireWire 800 to hold the HD MKV files. With Blu-ray-quality movies averaging about 25 GB each, it can hold 30 to 40 Blu-ray-quality movies on this drive. The Drobo holds the "critical" data, while the LaCie's data is not critical because in principle we can always archive the movies again.

Later the number of 1080p movies I wanted to stream was too great for 1 TB, so I bought a second Drobo. Then I put new 4 * 2 TB SATA drives in the first Drobo and applied the liberated 4 * 1 TB SATA drives solely to the 1080p content.

LaCie Big Disk
Mac mini This is a mid-2009 Mac mini 2.26 GHz Intel Core Duo with 2 GB of RAM. I've read that about 2 GHz is enough, and it doesn't hurt to have more RAM. While playing back HD MKVs, top reports 125% CPU consumption.

Also I wrote a simple AppleScript to automatically, after boot and automatic login into a non-admin account dedicated to media, mount the read-only media directories of the Xserve (tell application "Finder" to mount volume "Movies" on server "10.0.1.88"), then wait a few seconds (delay 5) for the mounted filesystems to settle before activating Plex (tell application "Plex" to activate).

Mac mini
Plex Plex App is my current favorite primarily because of HD MKV playback. I really want to use Boxee for its GUI and features, but, testing boxee-0.9.20.10261, boxee-0.9.14.6992, and boxee-0.9.11.5591, all introduce video jitter or jerkiness into HD MKV playback. boxee-0.9.20.10708 almost plays back MKVs without jitter.

So far Plex 0.8.5 is the only Mac media center software I've found can play back HD MKV reliably without jitter (VLC works for testing playback), however Plex 0.8.5 can have minor problems if running for a few days. Watching the growth of Plex's VSIZE measurement via top makes me suspect that Plex has a memory leak. The simple workaround is to quit Plex then reopen it. (No need to restart the Mac.) That proves to me that the Mac mini hardware and OS can handle HD MKV just fine. As soon as I find a version of Boxee that plays HD MKVs smoothly I'm switching back.

Both Boxee and Plex recognize the multichannel Dolby Digital 5.1 and DTS 6.1 that MakeMKV pulls out of the Blu-ray disc and sends it on through the USB digital out or the optical digital out. I have not yet tried the Dolby TrueHD or DTS-HD option, which MakeMKV can extract, because my Denon Receiver cannot decode those newer audio formats. Both apps can be set to be controlled using the standard Apple Remote and have lots of other great features (access to Hulu, video podcasts, etc.).

Plex App
DisplayPort + USB to HDMI Mini DisplayPort + USB to HDMI supports sending the HD video from the Mac mini's default video port plus up to 6.1 multichannel audio via the Mac mini's USB port and combines them into HDMI. My reciever can accept multichannel audio via the Mac mini's optical output, but I thought this solution was cleaner. Mini DisplayPort + USB to HDMI
Denon A/V Receiver I'm currently using a Denon AVR-4306 from 2006. It has 3 HDMI inputs and full suite of surround-sound support, up to 7.1 speakers, and automatic calibration system using microphone data from multiple listening locations. My "wish list" for my next receiver is for TrueHD and DTS-HD support and more HDMI inputs (just in case!). Denon AVR-4306
65" 1080p Plasma HDTV + Speakers
And there you have it.

Any 1080p movie at your fingertips, like a HD movie jukebox. From Blu-ray's I purchased:

  • Star Trek (30 GB)
  • The Matrix trilogy (19 + 16 + 15 GB)
  • 2001: A Space Odyssey (22 GB)
  • Contact (26 GB)
  • Planet Earth (~15 GB/disc)
  • Wall-E (17 GB)
  • Cars (25 GB)
  • Back to the Future trilogy (28 + 27 + 30 GB)
  • Star Wars double trilogy (39 + 39 + 39 + 37 + 38 + 38 GB)
and more...
Star Trek
For your system, you don't have to do it my way; substitutions are clearly possible.


    Notes:
  •  The MacCast - Interview on the Podcast for Mac Geeks, by Mac Geeks

    The MacCast is the first podcast dedicated to Mac users, made possible only by all the hard work of the great Adam Christianson. I'm glad to join in on the discussion about what is possible with Mac-based home theater. Listen to the online post or access it via iTunes as a podcast.

  • An article in the Economist describes well why, to distinguish 1080p from lower-resolution content, it's necessary to sit sufficiently close. It all comes down to geometry and the visual acuity of the human eye.
  • A calibration image for 1080p useful to see if your home theater system is producing a 1080p image and if your seating position is close enough to see sufficient detail. When viewed at full size, it is interesting, even on a computer monitor, to change your viewing distance and the "1080" squares change between lines and solid squares.
  • I gave a presentation on this subject at the Aerospace Mac Users Group in July 2010.

Serving to Portable Devices

To serve this content to portable devices like the iPad or iPhone, it's usually best to convert it specifically to a format for that device. I put these converted movies into an iPhone folder and an iPad folder each in a separate "Movies" folder. HandBrake does a great job converting these mkv's into formats specifically for those devices. Having these converted movies converted in advance is useful for viewing "on the go" after loading them on the device, but it turned out these also could be served directly within my AirPort network. I use two different methods:

Web Sharing The "poor man's" method to stream video to portable devices is to merely enable Web Sharing (in OS X or OS X Server) and point its share point to the above Movies folder. Therefore Safari on the iPad can list links to these movies at http://10.0.1.88/Movies/iPad/, for example, then a mere tap plays the movie because the server will simply stream the movie via standard web protocols. This is a good "quick and dirty" method for streaming video. In principle this could work for any device allowed on the local WiFi network. Someday perhaps one could build a fancier html5 web app that automatically lists these movies.
Air Video
Air Video is specifically designed to perform this function. It consists of an app on the Mac (free) and an iPhone/iPad app (paid or free limited version). The Mac part serves the video and the iOS app consumes it. Just point the Mac Air Video running on the server to the above Movies folder and you're good to go. Air Video can, in principle, convert other non-Mac video formats on the fly, but since I'm already converting video specifically for iOS devices it's practical just to point Air Video to the iOS-specific versions.

This method is very useful so my son can enjoy Cars or Wall-E on my iPad (of course he quickly learned to use Air Video too), allowing me to watch grown-up movies like Star Trek on my big system. :)

     Air Video Sharing iPad

Future Work

  • Using iOS device to control home theater
  • Audio Streaming
    • control without turning on HDTV
    • consolidation with or synchronization of iTunes libraries
  • Photo server
  • ... and beyond!


Dean E. Dauger holds a Ph. D. in physics from UCLA, where his group created the first Mac cluster in 1998. Dr. Dauger is the award-winning author in multiple American Institute of Physics' Software Contests and co-authored the original, award-winning Kai's Power Tools image-processing package for Adobe Photoshop. Apple, Inc., has hosted Dr. Dauger in scores of HPC seminars across North America to present and consult on designing and applying clusters.

P. S.
ripping = archiving
Blu-ray ripping = Blu-ray archiving



Back to home

Thanks for having a look!



Copyright © 2010-2 Dean Dauger.
Made on a Mac