The RIPINATOR – Semi-automated DVD Ripping

The Ripinator!!!

Motivation:
My fiance and I have a stack of DVDs. They’re dusty and inconvenient. I wanted to rip them to my network storage so I can easily watch them from my Boxee Box. It’s not that I’m lazy, but I hate doing repetative things if I can automate it.

Overview:
I’m using Perl with Win32::SerialPort to control the autoloader. I’m using Win32::DriveInfo to get the volume name of the DVD. I’m using TMDB on the off chance the volumename will pull up the movie. I’m using DVDFab 8 to rip mainmovie to an ISO file. I’m using Handbrake to encode to iPad preset. In my testing, this looks just as good as the ISO file and uses only 20-30% of the space.

To use I batch together either all movies, or all TV shows. I rip my movies into my mapped network drive, V:queue and my TV shows into V:TV_queue
I have my faster computers actually do the encoding. Multiple computers. I map the V: drive to the same fileshare. I encode my movies to V:Encoded and my TV shows to V:TV_Encoded

Requirements-Hardware:

Requirements-Software:

  • Windows
  • Perl
  • Perl Modules – install through Perl Package Manager
    • Win32::SerialPort
    • Win32::DriveInfo
    • TMDB
  • DVDFab 8
  • Handbrake
  • nircmd
  • A big stack of DVDs
  • A large hard drive

Files
traycmds.pl
ripper.pl
ripinator.pl
gripper.pl
encodetv.pl
encodemovies.pl
cmdtest.pl

ripinator.pl
Main program. It requires gripper, ripper, and traycmds. I broke this into multiple pieces to make it easier for me to keep track of.
Enumerates all CD/DVD drives attached to the computer and iterates through them probing the gripper arm to each tray. If a tray is detected, the drive number and drive letter are noted.
It then checks the levels of the bins.
If there are discs in the desginated input bin, it will load them into the drives and start the ripper.pl script
If there are discs done ripping, it will unload them into either the reject bin, or the output bin, depending on the exit code
This will continue until either something crashes, a disc is completely unreadable, or there are no more discs left to rip.

gripper.pl
Description:
Contains subs
Required Setup:
Set COM port on line 218

getVersion()
Returns the version of the autoloader’s firmware
getSerialNumber()
returns the serial number of the autoloader
goHome()
moves the gripper arm to the top of the unit
getStatus()
Queries the autoloader’s status. See command notes for more info
getPosition()
Gets the current position of the gripper arm
getBin($bin)
gets a disc from the specified bin
putBin($bin)
puts a disc in the specified bin
getDrive()
gets a disc from the specified drive
putDrive()
puts a disc in the specified drive
probeTray()
probes the gripper arm to the disc tray, returns drive number
sendCommand()
sends a command to the autloader. see command notes for more info

traycmds.pl
Description:
Contains subs
Required Setup:
Put nircmd in C:nircmdnircmd.exe

@allDVDdrives = closeAllDrives()
Closes all CD/DVD drives. Returns an array of all the CD/DVD drives attached to the computer.
closeDrive($drive)
Closes the specified drive
openDrive($drive)
opensthe specified drive
getVolName($drive)
gets the volume label of the specified drive

ripper.pl
Usage:
perl ripper.pl $drive $tray
Description:
Rips DVD to specified location. makes and removes lock files for ripinator. Looks up TMDB, if available, uses moviename and year for filename, if not, uses volumename.
Required Setup:
Get an API key for TMDB
set $dest_dir where you want ripped DVD ISO files to be stored
set $dvdfab as path to dvdfab.exe
enter TMDB API kay on line 96

cmdtest.pl
Usage:
perl cmdtest.pl !e1C
Description:
Allows sending commands to the autoloader

encodemovies.pl
Usage:
perl encodemovies.pl
Description:
Encodes ISO files to iPad preset m4v with handbrake.
Required Setup:
Set machine name, path to handbrake, source and destination folders.

encodetv.pl
Usage:
perl encodetv.pl
Description:
Encodes ISO files to iPad preset m4v with handbrake. Splits each title into a separate file.
Required Setup:
Set machine name, path to handbrake, source and destination folders.

Back Story:
A few years ago, we had a Rimage DVD production robot at work. I dubbed it Trogdor the Burninator. Rimage had some pretty scummy practices… The ink cartridges are standard HP cartridges, but had a little tag in the label that will keep the software from loading if you don’t buy the Rimage branded cartridges. I’m sure they would have gouged even more if they could think of a way to do it. So we replaced it with a newer, nicer one from Primera. It was an improvement in pretty much every way. I got the old one since no one else wanted it. SCORE!

I took it up as a project again. I had saved the old software from Rimage and was able to get it to run for 30 days between wiping and reloading the computer it was attached to. This was enough time to determine that the connection between the printer and the RAS 13 autoloader was RS232 serial. I sniffed the traffic between long enough to figure out which commands did what, and what replies meant. This is by no means definitive, but it’s enough to use an otherwise useless piece of equipment.

2 thoughts on “The RIPINATOR – Semi-automated DVD Ripping

  1. Hi

    My namne is kenth from Sweden

    i wonder if you can help me to do same you do on Rimage

    i have the same

    offcuse i will pay for it

    /Kenth

    Like

  2. DO you have a way to automate ripping dvd’s using the primera? I have a bravo pro (dual dvd) and 457 movies. I’d love to rip them all without having to buy a new auto-loader such as nimbie. I can’t find anything online about doing this and have searched extensively. Cd’s are no problem

    Like

Leave a comment