MPEG-2 Program Streams in Handbrake

I’ve a project (up my sleeve – more in a later post) that has a requirement of being able to convert (transcode) MPEG-2 data into H.264

Handbrake is an open source project originally for BeOS (!) but now much more commonly used on Mac OS X that was written to combine a number of open source libraries into a relatively easy to use app to convert DVD’s into H.264 (and MPEG-4) for use in an iPod. Very close to what I need for my project, however it’s fairly firmly focused on working with DVD file structures and not MPEG-2 files (program streams).

So I’ve written some patches that let Handbrake open and process MPEG-2 Program Streams, and as a side effect you can also work (with some restricitions) with the raw .VOB files present on DVD’s (and sometimes emitted from other DVD ‘ripping’ applications).

There are still some limitations :

  • .VOB files have a fixed reported duration of 4 hours – the actual final duration will match the file on disk, the 4 hour value is used to present a value in the Title Duration pop-up menu on the Handbrake UI. If the file is actually longer than 4 hours you’ll only get the first 4 hours I’m afraid
  • Currently only program streams are supported, next on the list is transport streams – this is where the ‘real fun’ is.

Download the patch.

Posted under Handbrake

This post was written by awk on April 10, 2007