Friday, September 17, 2010

Ripping DVDs and Ubuntu

I've been mucking around now for a while trying to work out the best way to rip and encode DVDs.

I tried using Handbrake for a while to rip and encode, but what I really want is something that just does it in the background. On the mac, RipIt is a great tool for ripping the DVD to the HDD allowing you to go back at your leisure and encode it.

What i really want is a solution that will autorip on DVD tray-close (like RipIt on the mac) and then a cron that will encode. This is a post about how I get on.

First, we'll need to add restricted formats:
  • sudo apt-get install libdvdread4
  • sudo /usr/share/doc/libdvdread4/
Now, install dvdbackup
  • sudo apt-get install dvdbackup
Create a directory to put the ripped DVDs into and enter it and execute the command to rip the DVD:
  • mkdir Ripped
  • cd Ripped
  • dvdbackup -M
You can also use the -F option rather than -M to just get the main feature, but I had bother with using handbrakeCLI to encode after doing that. Also use the -v flag to give a bit more output.

And, to eject, just use the command
  • eject
So, now we need to work out how to do that automatically when a DVD is inserted into the machine. In the perfect world, we'd do that using the terminal only so that it could run flawlessly on a headless server.


We need to install handbrake from a PPA.
  • sudo add-apt-repository ppa:handbrake-ubuntu/ppa
  • sudo apt-get update && sudo apt-get install handbrake-cli
Then, it's a simple hop skip and a jump to a simple CLI command to encode the ripped disc using a preset for "Film"
  • HandBrakeCLI -i 21/ --main-feature -o 21.mp4 --preset="Film"
Amazingly, this encoded the film at, on average, 280fps (granted, I'm running a quad core AMD monster), but still! I'd tried this on the Mac, using the GUI version and was getting an encode with an average fps of about 9!

Sunday, September 05, 2010

Drweb and plesk

I have been getting some really irritating emails for a couple of weeks from Plesk... actually, it's been a bit longer than that, but I just filtered them out via a gmail auto-delete - probably not the best way to deal with the situation!

What's strange it that I didn't even have dr-web installed. A couple of searches on google revealed a helpful page on which suggested that diabling the update call in the drweb-update cron would be helpful.

  • sudo touch var/log/drwebupdate.log
  • sudo joe /etc/cron.d/drweb-update
  • add ">> /var/log/drwebupdate.log" to the line that has
  • save the file...