Thursday, January 10, 2013

Introducing dvdcopy, an error-resistant command-line DVD copier

My wife likes watching DVDs a lot, which is why she borrows many from the public library. The problem is that many of those were handled by people who have no clue whatsoever about the proper handling of DVDs, which means that they are in a state ranging from moderately scratched in the best cases to properly scarred in the worst ones... xine or VLC fail miserably to read such DVDs. What's worse is that failures happen right in the middle of DVDs, which is quite frustrating !

That's why I've started quite some time ago to write a small C wrapper around libdvdread to first copy the DVD files onto the disk and then read them from there. It was also an easy solution to copy files to a driveless netbook to watch the DVD there. With time, this project evolved into a neat C++ command-line utility that's able to keep track of badly read sectors and come back to them later.

Today is the 0.0 release of dvdcopy. You can get the tarball there. It follows the standard autoconf dance:

~ ./configure
~ make
~ make install

Using it is as simple as running:

~ dvdcopy /dev/dvd MyMovieDirectory

If everything went fine, you're set, and you can open the directory created with vlc or xine:

~ xine dvd://`pwd`/MyMovieDirectory

(yes, xine needs the full path, I haven't checked with VLC, but from what I remember, you can open DVD directories directly from a menu).

If you're not that lucky and dvdcopy found some bad sectors, try reading again using

~ dvdcopy --second-pass /dev/dvd MyMovieDirectory

I found that in many cases, one or two second passes get all the sectors back. While that wasn't really the intended purpose, the fact that most copy protection schemes (in addition to CSS) are implemented using bad sectors make dvdcopy quite resistant to them.

I have no plan of making a Debian package for it at the time being, but if there is demand for that, I may reconsider. Enjoy !

Wednesday, January 9, 2013

Lots of hard drive accesses with MacOS

Sorry, a post about MacOS again, but this is a problem my boss has been faced with, and judging by what google searches gave us as clues to go on, I thought it would be useful for others to know about this.

So here it is: for a couple of weeks, my boss's Mac had been slowing down very painfully, to the point that he was just sitting in front of it waiting for web pages to show up or applications to start... We tried a whole bunch of things, such as disabling spotlight, dropbox, and even the time machine, but nothing worked. Finally, he had a look at Disk Utility that said that the disk was gone beyond repair. Fortunately, a new colleague suggested to restore from the Time Machine, holding Command-R during startup. It took ages (over a slow network), but now the machine is up again, without any slowing down.