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
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.pipeline( command )
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:
- Put Carts of Darkness into the DVD drive of my bedroom computer.
- On the command line, run: hbwrap.rb Carts_of_Darkness && ttsender "finished ripping" && eject
- Walk into living room and do some work
- Wait until the stereo says "finished ripping"
- Walk into the bedroom and repeat the process
- ?
- Contemplate purchasing a much much larger hard-drive to hold all of my movies
- Think of a way to playback the movies that is controllable by an NES controller
- 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.
(isn't it legal now to bypass this to backup your own collections and whatnot?)
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!