POSTS FOR 2013

Converting Blu-ray and DVD movies to MP4, using Mac OS X, for playback on iPad, Apple TV, Playstation 3, Xbox 360, Roku and other players

Tutorials1311 words7 minutes to read

I often find myself wanting to watch my movies when I’m on-the-go, or sitting at work writing code. I also have one Blu-ray player in the house, and hate having to sit through one unskippable warning or commercial after another.

Because of this, I choose to exercise my fair-use right to format-shift my movies into something more convenient. Making a personal backup of movies you own is in a legal gray-area in the U.S. Historically, this sort of thing fell under fair use law, but the DMCA (1998) makes it illegal to crack the encryption. This is why backing-up CDs is commonplace while backing-up DVDs and Blu-rays is frowned upon. The encryption is where the line is drawn. You’ve been warned!

Hardware

The Mac used for this tutorial is an 17” MacBook Pro (early–2011) with a 64-bit quad-core 2.2 GHz Intel Core i7 processor, 16 GB of RAM, OS X Mountain Lion, and a standard, built-in Superdrive. The external BD-R drive is a Buffalo MediaStation 6X USB 2.0 Portable Blu-Ray Writer.

Backing-up your discs

Pretty much every Mac since the early 2000s has shipped with a DVD drive, so these are easy to come by. For backing up personal DVDs so that they can be format-shifted, RipIt is highly recommended. A license is a paltry $25, and I recommend supporting the developers of this software. Backing up is as simple as inserting the DVD, launching RipIt, and choosing “Rip”. You can expect a rip to take 15–30 minutes, depending on the size of the disc.

For Blu-ray discs, you first need a Blu-ray drive. For backing up personal Blu-rays so that they can be format-shifted, MakeMKV is highly recommended. We won’t be making .mkv files, but it has support for backups. A license is somewhere in the $60-$80 range, and I recommend supporting the developers of this software. Backing up is as simple as inserting the Blu-ray disc, launching MakeMKV, and choosing “Backup”. You can expect a rip to take 45m–1h15m, depending on the size of the disc.

If you’re on Windows, check-out AnyDVD and AnyDVD HD.

Format-Shifting to MP4/H.264/AAC

Video files are a lot more complicated than most people realize. You may have heard words like MKV, MPEG–4, AVI, MP3, AAC and other acronyms.

The short explanation is that every video file is made up of 3 different parts: the video stream, the audio stream, and the container. The audio and video are synced-up (a.k.a., “multiplexed” or “muxed”) and are bundled together into a single file using a container format.

If you want to make yourself a little more educated about this stuff, check out the “Video on the Web” chapter of Dive Into HTML5 by Mark Pilgrim. For this exercise, just know that we want to end up with an H.264 video stream and an AAC audio stream, wrapped up inside an MP4 container.

For this, we’ll use Handbrake. Handbrake will take our personal backups as input, and produce an .mp4 (or .m4v — same thing) file as output.

Handbrake comes with a good set of default settings. If you don’t know what you’re doing, feel free to use those. I’ve tweaked my settings a bit as I prefer higher-quality files at the cost of a larger file size.

See the following screenshots for information on my presets.

The biggest difference between these is that the video bitrate for DVDs is 3,000 kbps while for Blu-rays it’s 10,000 kbps.

To get started, click the Source button in the upper-left corner of the main Handbrake window. Find your backup directory, and choose Open. Handbrake will parse the files and make sure it has a complete backup to work with. If you’re using my presets, choose DVD (480p) if your source is a DVD backup, or Blu-ray (1080p) if your source is a Blu-ray backup. It may also be helpful to check out the Handbrake Quick-Start Guide if you’re new to the tool.

Next, click the Add to Queue button. Once you’ve queued-up all of the movies you want to format-shift, click the Start button. On the reference hardware listed above, DVDs typically take 45m–1h30m to fully encode a new MP4 file. Blu-rays take 4–6 hours. In both cases, Handbrake will leverage as much of your CPU and RAM as possible, so don’t expect to be able to do much with your computer until its done.

With these settings, expect a 480p MP4 to be around 1 GB/hour of video and a 1080p MP4 to be around 5 GB/hour of video. If having a 15 GB copy of Titanic is too much, lower the video bitrate for the Blu-ray (1080p) setting from 10,000 kbps. The lower the setting, the worse the quality, but the smaller the file size.

One more tip: 1080p video has a resolution of 1920×1080. The smaller the screen, the less there is for your eyes to notice, so you can be more forgiving of lower-quality. However, if you’re stretching 1920×1080 across your nice new 55” LED TV, a low-quality file will make your whole movie-watching experience suck. The bigger the TV, the better you want the quality to be.

Metadata and Artwork

Once you have your .mp4 or .m4v file, you’ll want to give it a proper name and add the metadata and artwork to the file. The format I use is <name of movie> (<format>).mp4 (e.g., My Favorite Movie (1080p).mp4).

It’s possible that you may have heard of AtomicParsley, MetaX or MetaZ before. They all suck. Check out Subler instead.

Subler queries The Movie DB for movie data and artwork, and uses TVDB for TV show data. While The Movie DB has a pretty awesome selection of movie artwork, I’m generally unimpressed with the TV show artwork. For that, I use Get Video Artwork and download the iTunes-compatible, square-shaped TV show artwork.

Save your changes, and Subler will write the video metadata and artwork into the file.

Streaming via iTunes

I have an Xbox 360, a Playstation 3, and two Apple TVs at home. I also have an iPad 2, iPad 3 and an iPad mini. Needless to say, I watch a lot of movies and TV shows.

Because the video files tend to be so large, I use an external hard drive attached to my Mac to store the video files. I then tell iTunes where to find the movie by option-dragging the MP4 file from Finder into iTunes’ Movie pane. The option-drag tells iTunes “here’s a pointer to the movie, but don’t copy it onto my built-in hard drive”.

Now it’s time to watch your movie!

  1. As of iOS 5, iPad supports 1080p video. Simply sync the movie to your iPad and watch it on-the-go.

  2. As long as your computer running iTunes and your Apple TV are on the same network and are both configured to use the same Home Sharing account, you should be able to start streaming the movie to your Apple TV right away. (I would always recommend a hard-wired network connection, otherwise a Wireless-N connection. A Wireless-G connection is likely going to require more buffering or have choppy playback.)

  3. To stream to your Playstation 3, you’ll need to be running a DLNA server on your Mac. Medialink ($20) can be installed as a System Preference and automatically serve your iTunes content to your Playstation 3.

  4. To stream to your Xbox 360, you’ll need to be running a similar server which the Xbox understands. Connect360 ($20) can be installed as a System Preference and automatically serve your iTunes content to your Xbox 360.

  5. Since MP4/H.264/AAC is the industry-wide standard for all modern-age video, pretty much any smartphone, tablet, laptop, operating system, and streaming device created since 2004 can play this format out-of-the-box. Even ancient OS’s like Windows XP have been updated to support this format. Go nuts.

Ryan Parman

Ryan Parman is an experienced Software/DevOps/Security engineer, currently living in Seattle. He is the creator of and , patented multifactor-authentication-as-a-service at , and came up with the idea of “serverless, event-driven, responsive functions in the cloud” while at AWS in 2010. Ryan's aptly-named blog, , is where he writes about ideas longer than . Ambivert. Curious. Not a coffee drinker.