2011-09-19

A few years ago, I decided to rip and organize my entire CD collection. The resulting music files are all on player a small computer, running MPD, and connected to my home stereo. It took me a while, but it was worth it. In a similar fashion (since I am somewhat stuck at home recuperating) I figured now would be a prime time to rip my entire DVD collection. To accomplish this feat, I am using a piece of software called handbrake.

More specifically, I am using the command-line version HandBrakeCLI with a small bit of Ruby code.

The Code

#!/usr/bin/env ruby
require 'open3'
input '/dev/sr0'
title ARGV[0]

#what are the video options?
v_opt "-r 29.97 -b 1200 -2 -T"

#what are the audio options?
a_opt "-E lame -B 128 -R 48 --mixdown stereo"

#what are the source options?
source "--main-feature"
command "HandBrakeCLI -i #{input} #{source} #{v_opt} #{a_opt-o #{title}.mp4"

puts command

Open3.pipelinecommand )

Why the Ruby code?

the Ruby code takes one argument: the name of the movie, and creates a string representing the command I want to use for ripping the DVD.

So then one might ask why not just use the graphical version of handbrake? Good question, I'm glad you asked.
I don't just run the Ruby script ( by the way, I named the script 'hbwrap.rb' ). The script is run with a few other scripts as well. Remember the text to speech thingy from a while ago? Well I run that as part of the command as well.

The process is as follows:

  1. Put Carts of Darkness into the DVD drive of my bedroom computer.
  2. On the command line, run: hbwrap.rb Carts_of_Darkness && ttsender "finished ripping" && eject
  3. Walk into living room and do some work
  4. Wait until the stereo says "finished ripping"
  5. Walk into the bedroom and repeat the process
  6. ?
  7. Contemplate purchasing a much much larger hard-drive to hold all of my movies
  8. Think of a way to playback the movies that is controllable by an NES controller
  9. Write a blog post about the process

Yes, I have already ripped Jaws the Revenge. By accident, I almost ripped The Princess Bride, but I decided to wait until I have time to edit out all of the useless Fred Savage crap that ruined the film. In case you were wondering, The Princess Bride is one of the few instances where the book is worse than the film.

Now quit reading, and go do something something something.

Comments
2011-09-21 jrobb:
nifty, I don't think I have used handbrake before. So this doesn't look like it bypasses that lame DVD protection stuff, does it?

(isn't it legal now to bypass this to backup your own collections and whatnot?)
2011-09-21 jezra:
From what I can tell, my ripping endeavor falls under Fair Use.
2011-09-21 jrobb:
right, yeah it definitely does.
I *think* what I was saying is that I thought handbrake was just a transcoder, not a ripper+transcoder.

it's awesome that it is both!
Name:
not required
Email:
not required (will not be displayed)
Website:
not required (will link your name to your site)
Comment:
required
Please do not post HTML code or bbcode unless you want it to show up as code in your post. (or if you are a blog spammer, in which case, you probably aren't reading this anyway).
Prove you are human by solving a math problem! I'm sorry, but due to an increase of blog spam, I've had to implement a CAPTCHA.
Problem:
4 plus 8
Answer:
required
subscribe
 
2016
2015
2014
2013
2012
2011
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008