neilios

My life. Whatever.

neilios header image 2

Choices for Encoding Video with HandBrake

May 13th, 2007 · No Comments

I’m gearing up to transfer some of my video to hard drives in the hopes of someday having a computerized media center for video akin to what I currently do with audio. Video can take a long time to encode using modern compression formats, so it’s going to be a spare-time thing. In any case, I started playing with Buffy Season One and the Macintosh DVD Ripper/Encoder HandBrake and realized that the video needed help. Handbrake had lots of options and I wasn’t sure which to use. So here’s what I’ve figured out.

First off, the DVD is interlaced. Interlacing dates back to the invention of television really and was originally devised for when the electron gun in a CRT couldn’t move fast enough to scan all of the lines on a TV screen 60 times a second. The compromise was to scan every other line 60 times a second so that the entire image is refreshed 30 times a second. Fast forward eighty years and the video on many (all?) DVDs is still interlaced. On a television screen this is often fine, but for watching on the computer you can often perceive the interlacing effects. It’s not entirely fair to show still images from video for a quality comparison as a lot of encoding is designed with motion in mind, however in this case the effects that we’re showing are perceivable in the moving image. Here’s a frame encoded with MPEG4 and the interlacing left alone:

MPEG4 interlaced

Looking at the woman’s hair and the cuff of her sleeve, you should be able to appreciate the striped effect that you get in an interlaced image from a fast-moving scene. In this case, first the odd lines were drawn and then the even ones, but the scene had changed between the odd and even fields. If her hair wasn’t blowing and her sleeve wasn’t moving, then she’d look fine. If you can’t see, click on the image to see a full-sized version.

HandBrake has an option to de-interlace the image and turning this on produces a shot that looks like this:


MPEG4 deinterlaced

The deinterlaced image is quite good and I’d recommend MPEG4 with deinterlacing if you need to do a relatively good job quickly. If you have computer power to spare, consider using H.264, also with deinterlacing turned on, which produces an image like this:


H.264 deinterlaced

Here the difference is more subtle, but look at the darker parts of her hand around her fingers and compare to the MPEG4 image. The MPEG image is blotchier and once you notice this, you see it all over the image. If you’re having trouble seeing this, try right clicking on the image and opening a full-sized version in it’s own window. The difference is actually pretty striking.

The price you pay for this encoding quality is CPU time. A forty minute episode of Buffy took about twenty minutes to encode with MPEG4 and approximately an hour to encode with H.264.

Have fun.

Tags: how-to · technology

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

You must log in to post a comment.