If you had to do DVD backups from windows

Say you want to let your grandmother backup her DVDs using her clunky old windows laptop. You want a windows solution that 1) rips the DVDs, 2) copies them to a backup, 3) makes them available for viewing from wherever (e.g. accessible over the internet).

The solution I came up with is as follows:

  • Download cygwin and install rsync. I hadn’t used cygwin for a long time, but basically you download either the 32 or 64 bit version here, then filter for rsync and select it. Cygwin seems to do a good job of only pulling what is necessary.
  • Download HandbrakeCLI. You dont need the full Handbrake installer, just the CLI. You should be able to google for it, but i found it here
  • libdvdcss. This is all over the internet. Just google and ye shall find. You need this to be able to decrypt most DVDs. Just place the DVD dll inside your handbrake folder to enable decss capability.
  • Download VLC. I felt like ripping my DVDs with chapter markers. The best format for supporting this kind of thing seems to be matroska (mkv). VLC natively supports mkv, which is handy if youre viewing these DVDs locally

I then automated the whole thing with the following script:

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
set /p dvdname= Enter DVD Name (no spaces):
set basepath=<localScratchDir>%dvdname%.mkv
set remotedir=<remoteBackupPathDir>/%dvdname%.mkv
FOR /F "tokens=* USEBACKQ" %%F IN (`c:\cygwin64\bin\cygpath %basepath%`) DO (
SET basepathunix=%%F
)
echo Ripping to %basepath%
HandBrakeCLI --main-feature -m -i d: -o %basepath% -e x264 -q 20 -B 160
echo Copying %basepathunix% to backup
c:\cygwin64\bin\rsync.exe -e "/usr/bin/ssh -p <remotePort>" -auvhP %basepathunix%  <remoteUser>@<remoteSite>:%remotedir%
echo.
echo.

if "%errorlevel%"=="0" (
        echo Completed successfully!
)
if not "%errorlevel%"=="0" (
        echo DVD backup did NOT complete successfully!
)
echo Removing %basepath%
del %basepath%

set /p dummy=Press enter to finish

Note some assumptions about this script:

  • You are running 64bit cygwin. If not change from c:\cygwin64
  • You want to push to somewhere offsite. You can just skip the rsync step if you want to go local.
  • Note that I used a custom port in this example; you can remove the -e switch and its argument if you’re using a standard port.
  • This example assumes you have set up ssh keys properly. Meaning you ssh-keygen on your windows box (from your cygwin shell!) then copy your key to the dest machine (perhaps using ssh-copy-id). I don’t allow password authentication, so somtimes its easiest to just ssh into the remote host somewhere that has access, then teamviewer/rdesktop/whatever into your windows box to copy the ~/.ssh/id_rsa.pub file into the ~/.ssh/authorized_keys file.
  • I don’t care about extra content, so im only ripping the main feature.

As for legally accessing your DVDs remotely: you can use one of any methods. I have found PLEX to work well.