Ripping PS3 compatible MP4s

Posted on Fri 20 November 2009 by alex in geek

There are literally hundreds of scripts and tools for encoding stuff to various compressed video formats. However I was never able to find something that did exactly what I wanted and until recently just did everything from the command line with mencoder. Eventually I got tired of the copy and paste and scripted stuff up which I've pushed onto github.

There are two scripts. The first is rip.py which is designed to automate the task of ripping box sets as much as possible. Originally it spawned the encoder step but that is a very quick way to overload your machine. Syntax is fairly simple:

rip.py -v -m 45 -b 13 -l

Which means rip tracks that are around 45 minutes in length and number them from 13. Create a log file with a list of ripped VOB files. Currently everything is hard-coded to ${HOME}/tmp

The second script is even simpler:

ps3enc.pl /path/to/file

By default it does a automatic guess at crop detection and then a 2 pass encoding of the file into a PS3 compatible .avi. That is then unpicked and re-packaged into an .mp4 file.

By it's very nature it is tailored to my command line sensibilities but I push it to the outside world in case it's useful to someone else. Patches are of course always welcome but don't expect it to grow much beyond it's current scope. About the only thing I'd like to get working properly is handling subtitles for foreign films. It's currently a bit of a black art.

The original "recipe" for the PS3 friendly encode options where gleaned from Carlos Rivero's blog post.