Video Encoding: Handbrake

HandBrake Logo After ripping the DVDs I’ll be needing to encode them so I can watch them on my various devices. The premier software in this category is the open source Handbrake. There’s versions for Mac OS X, Linux and Windows. I’ve been using Handbrake 0.9.2 for OS X.

Handbrake can encode directly from DVD if they are unencrypted or encrypted with CSS encryption. But Handbrake isn’t a dedicated ripper and feeding Handbrake unencrypted video is recommended for best results. I took the approach of first ripping the DVDs to disk using either Fairmount or AnyDVD. This resulted in mostly problem free files. I did have to re-encode a few files that worked in VLC but locked up iTunes/AppleTV/Quicktime and I had an occasional odd problem. But the failure rate was less than 1%.

The list of supported sources and outputs is listed on the Handbrake web site as:

Supported sources:

* Any DVD-like source: VIDEO_TS folder, DVD image or real DVD (encrypted or unencrypted, but protection methods other than CSS are not supported and must be handled externally with third-party software), and some .VOB and .TS files
* AC-3, DTS, LPCM or MPEG audio tracks


* File format: MP4, MKV, AVI or OGM
* Video: MPEG-4 or H.264 (1 or 2 passes or constant quantizer/rate encoding)
* Audio: AAC, MP3, Vorbis or AC-3 pass-through (supports encoding of several audio tracks)

Handbrake Presets

Handbrake provides a multitude of settings for tweaking the video but also comes with numerous presets which are shown to the left. In my case I was looking for quality and didn’t care too much about file size. I also didn’t care about playing the video on my iPod. I wanted to play the video using iTunes, Front Row and Apple TV but I didn’t want to be locked into that software.

I played around with various bit rates and other settings and watched several test encodes on my computers and TV. For awhile I was considering different settings based on how much I valued the video. Older TV shows or movies I didn’t watch very often would have gotten lower bit rates to generate smaller files. I eventually decided that since file size wasn’t too important to me I’d be better of with one standard setting and since quality was my primary concern I might as well pick a “constant quality rate” (CQR) setting.

The CQR setting is a percentage. I’d be using the x264 encoder and according to people who know (in the Handbrake docs and forums) a setting above 80% doesn’t improve the quality while still increasing the file sizes. This is because the DVDs already use compression and 80% is roughly equivalent to the DVD compression. I ended up picking a setting of 64%. I still couldn’t see a difference between this and a lower setting on my computers and TV but I figure this would allow for some upgrades to my video hardware. Some of my test encodes where at 54% and were “good enough” so I haven’t bothered to re-encode them.

I encode the audio at 160kps and encode the videos as an MP4 file but I change the extension to .M4V so that iTunes will recognize chapter stops. (There’s a setting in Handbrake to rename the extension automatically. The files also play fine in VLC although there aren’t any chapter stops. I don’t generally use chapter stops but figure they’re nice to have.

All my settings for video and audio are shown in the screen shots below, click the thumbnails to see them full size. My chapter and advanced settings are still at their defaults. These settings resulted in a file size between 185 and 250MB for 15 minutes with most videos being around 200MB per 15 minutes.

Handbrake Video Settings Handbrake2

I’ve only had a few minor problems with Handbrake. As I mentioned some of my encodes had to be redone. The most common were videos that worked fine with VLC but not in any Apple product. There was less than a handful of problems of any type and they were solved by re-encoding. I didn’t have to re-rip or change any settings so it appears to be just “one of those things”. But it does mean I check all my videos in QuickTime rather than VLC or MediaInfo Mac. There was one DVD that encoded with a 14 hour playtime even though it was only about 2 hours. The solution here was to drop the last chapter, which was only 1 second in actual length.

I’ve also encountered a few Handbrake crashes, usually when using the file open dialog to either select the source files or destination location. This typically happen after many file opens in a session but wasn’t consistent. It was annoying when setting up a night of encodes only to have it crash near the end. So I began to skip changing destination file names and stick with the default, renaming the file when it’s done. Handbrake default to the source directory name when creating the output files so I’ve been making the directories match the file name I want.

HandBrake can create video files greater than 4GB but since 4GB is the maximum size supported by many players I haven’t enabled this feature. This means HandBrake crashes for me when it reaches 4GB. When this happens I set it to encode a file of 4GB and let it figure out the bitrate to achieve that. This has been very rare and only when the source files are approaching 4 hours.

Ripping is CPU intensive and it’s the one thing that affects speed. My iMac rips faster than my mac Mini. While there’s a lot of things that affect performance I estimate roughly 45 minutes of ripping per hour of content on my iMac. This flips on my Mac Mini which takes about one hour to rip 45 minutes of content. I never sit around waiting for a rip to finish, rather they get queued up and run overnight or when I’m otherwise not using the computer. My Mac Mini also serves as a media computer but if I was looking for something to dedicate to ripping I’d look for a cheap windows PC with the fastest CPU I could afford rather than buy a Mac Mini to dedicate to ripping. (Having said that, I haven’t tried the Windows version of Handbrake).

The Bottom Line

The bottom line is Handbrake is the only ripper I looked at and it hasn’t given me a reason to look elsewhere.

Of Browsers & Operating Systems

There were a couple interesting events in the world of site statistics for this site (it’s a very small world).

Windows climbed to the top of list for operating systems used by visitors to this site and as of now 50% of all visitors is are on Windows. Since it’s launch OS X has always held the top spot. This was mainly due to the large amount of traffic my post about replacing Windows Home Server disks attracted. That was a bit of an anomaly and OS X traffic in the last couple of days is back above Windows traffic.

The other event was the release of Firefox 3. Firefox has always been the leading browser for visitors to this site and they stayed around the typical 43% or so. But what was interesting is that since it’s release it’s now the most used Firefox version among visitors and the second most used version among all browsers with 26% of all visitors using Firefox 3, behind Safari 3 at 30%. Not bad for a browser out less than a week.

WHS: Disk Management Add-In & Power Pack 1

Philip Churchill, on his MS Windows Home Server Site, is reporting that the Windows Home Server Disk Management Add-In may have compatibility issues with the upcoming WHS Power Pack 1 update and shouldn’t be used with it.

I’ve mentioned before that I use the disk management add-in so wanted to pass this along. Although I’ve yet to install Power Pack 1 because it’s still in beta form.

DVD Ripping Software: Fairmount & SlySoft AnyDVD

AnyDVD Logo I’ve been looking at two pieces of software to rip my DVDs as part of my Video on Demand project. They are pretty much polar opposites. One is free (open source/GPL license) while the other is commercial. One is for Windows and the other is for the Mac.

Fairmount is Open Source for the Mac that is included in the download for DVDRemaster. DVDRemaster is a commercial product that does not have to be installed (and I haven’t installed it). Fairmount does require that the VLC Video Player is also installed. VLC is also Open Source.

The Fairmount product page outlines it’s basic operation:

    * A disc is inserted by the user.
* FairMount receives a notification about the new disc.
* If the disk is a video dvd, the original disk is unmounted.
* It then starts a local web server (which is only accessible by the local host), to serve the decrypted image.
* The decrypted image is then mounted using Apple’s tool (hdiutil).
* When the user ejects the image, the web server is stopped, and the original disc is ejected.

The Fairmount screen is shown below:

Fairmount Screen

Once Fairmount has opened the drive it appears in Finder as a mounted DMG (disk image) file. Files can be copied using drag & drop.

I had good success using Fairmount but there were several DVDs that it couldn’t handle. Also, while I can’t prove it was Fairmount, I did have considerable system instability issues on my iMac after using it for awhile. I’ve since stopped using it on my iMac and it’s been stable since. I’ve also used it on my Mac Mini and it’s been stable there, although that machine typically gets shut down daily and only runs a few different apps.

For the DVDs that Fairmount couldn’t handle I’ve been able to use AnyDVD from SlySoft which is commercial software for Windows. I’ve used the 21 day evaluation version which doesn’t save settings between sessions but is otherwise fully functional. In the 21 days I evaluated the software there have been three updates to fix issues or handle new DVD copy protection schemes. I’ve been running AnyDVD under Parallels on my Mac (a Windows XP vm) and haven’t had any problems. I also haven’t encountered any DVDs that it hasn’t been able to rip.

The AnyDVD settings screen and DVD ripping screen is shown below. Files can also be copied using drag & drop.



I haven’t done any precision tests but ripping using AnyDVD seems faster than Fairmount although each can take an hour or more depending on the DVD.

AnyDVD is 49 Euros direct from SlySoft. They are currently running a 20% off promotion (listed as ending June 22nd but already extended once). There’s also a version for ripping high-def DVDs although I didn’t look at that.

Bottom Line

Since I have a large number of DVDs in my personal library that I want to rip and have already encountered some problems with Fairmount I will probably buy AnyDVD during the promotion. It’s handled all DVDs I’ve thrown at it and it’s obviously kept up to date.

The pattern I’ve fallen into is I have Fairmount on my Mac Mini but not on the iMac. I pop into the bedroom room (where the Mac Mini is) every hour or so and swap the DVDs. This has resulted in a relatively stable system. The only other things I do on the mac Mini are encoding and watching video.

I’ve been using AnyDVD on my iMac (under Parallels). This doesn’t add any noticeable overhead over Parallels itself so I can rip DVDs while I’m working at my iMac as long as I don’t need the resource parallels is using. I’m typing this blog post now in Windows Live Writer while a DVD is being ripped. Neither CPU or memory usage in the VM is stressed.

There’s also MacTheRipper which is a classic DVD ripper for the Mac. MacTheRipper Version 2.6.6 is still free but it is a couple years old. I had more problems with MTR than I did with Fairmount although it was fine for older DVDs. There is a MacTheRipper 3 but this requires going through a donation process in order to get it and future updates are dependent on the level of donations being sufficient. Register in the forums to find out about version 3.

If I Have the Space the Files Will Come

Screenshot showing disk status Another screenshot showing disk usage It seems there’s never enough space. I just added an additional terabyte of space to my Windows Home Server recently and already I’d eaten that up and added another 500GB through the eSATA connection. Prior to expanding the disk I had cleaned up old files and had nearly a terabyte free. Clearly I was out of control. If I have the space there’s no reason to use restraint.

The solution was simple and non-technical. I’d been ripping and encoding DVDs and rather than deleting the ripped files once encoded I kept them in case I later found a problem with the encoding. Heaven forbid I have to pull out the DVD and re-rip it. So now I quickly test the encode when it’s done and then delete the source files. If I find a problem down the road I’ll pull out the original DVD.


So now that things are cleaned up the 500GB external drive is gone and I’m back to 1.3TB free.

Replacing Windows Home Server Disks

Since I decided to start ripping my video library to disk I quickly realized my Windows Home Server would run out of space in fairly short order. I had four 500GB drives in it already so there weren’t any bays free, I’d have to replace one or more drives. The sweet spot for hard drive prices seems to be with 750GB drives these days. But the price of 1TB drives are also dropping, so I got two Western Digital Caviar WD10EACS 1GB drives, which actually cost less than the 500GB drives I bought earlier this year. (And will probably cost even less next week) The drives are marketed as “green” because they use less power. I figure they’re a good idea for a machine left on all the time. I’d be replacing two of the existing 500GB drives so I’d pick up another terabyte in total.

I cleaned up the files and have 900GB free so I should have enough space to replace the drives one at a time without turning off file duplication. Being the cautious type I start off by rebooting the Home Server and waiting for it to indicate the disks were balanced. Then I run through the following steps to replace the hard drives.

  1. Run the drive removal wizard for the first drive. In this case it’s the drive in bay #4. The wizard tells me that no files, folders or backups will be lost. I confirm the drive removal and the process begins. This drive takes about 3 hours to prepare, during which time the WHS isn’t accessible.
  2. Once the removal wizard is finished the LED on the drive bay glows purple. I pop out the drive and install the new one. This process is just like adding a new drive once the old physical drive is removed.
  3. I add the new drive to the storage pool using the Windows Home Server console.
  4. I reboot the WHS and copy some files up to it to make sure everything is OK. I wait an hour or so and make sure the disk activity dies down. (I use the Windows Home Server Disk Management Add-In to track disk usage.)
  5. Then I run the drive removal wizard for the second drive, this time the one in bay #3. Since this drive was nearly full it takes about 4 hours to prepare the drive.
  6. Once the removal wizard is finished the LED on the drive bay glows purple and I replace the drive.
  7. I give the server one last reboot to make sure everything is fine.

A couple of the wizard and console screens are shown below. The initial drive removal wizard screen is a bit ominous and implies I’m responsible for insuring I have enough space otherwise I’ll lose files. But once the wizard finishes it’s done the calculations itself and confirms that no files or backups will be lost.


Once the drive removal wizard is finished the drive will be listed as a “Non Storage Hard Drive”. Then once the new drive is inserted it will also be listed as a “Non Storage Hard Drive”.

Server Storage Screen in the Management Console after drive replacement

The Disk Management Add-In screen in the management console shows both new drives and the disk activity as files are copied to them.

Disk Management Screen after the drive upgrades