oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Digitizing VHS Tapes with EyeTV
Pages: 1, 2, 3

Automating the Process

I looked at doing this by hand and it seemed likely that if I tried to do it that way, I'd eventually mess up recordings and have to re-record them. It seemed like I should be able to write a small AppleScript program to duplicate the above method; I discovered, however, that the process was actually fairly difficult to do in AppleScript, despite the fact that EyeTV is nicely scriptable. The problem occurs because we have to manipulate files both as Finder entities (paths and aliases) and as Unix entities (directories and symlinks). AppleScript does OK with the Finder side, but it was necessary to use do shell script in various places to get the Unix part to work. Plus, it was also necessary to scan the EyeTV Archive once in EyeTV mode to find all of the recordings, and then do it again in the Finder to find just the real folders (without any already-existing symlinks) so we didn't try to archive stuff that'd already been archived.

The script here handles the basic workflow: find the actual recordings, split them up into DVD-sized chunks, copy them to a user-selected volume, back up the recordings for safety, and then create symlinks for them in the EyeTV Archive, repeating as necessary until we've finished clearing out the archive. Here's the application running.

After some chugging, the application puts up a dialog like this that shows a list of programs (by their real names) that will fit on a single DVD. You can click OK to copy these, or Cancel to skip this set and go to the next set.

Once you've selected the set of recordings, the program prompts you for the name of the DVD to use for the backup. Select a disk here and click OK to proceed (Cancel stops the script).


The Finder then copies the files to the DVD.

Once the copy's done, the program tells you to burn the DVD (you'll have to do this yourself as a separate step), and the insert a new one and name it (so it can be selected in the disk list and symlinked properly when the next set of recordings is backed up).

This is plain old AppleScript, so the user interaction is minimal. Error handling is also minimal, just enough to get this to work and trap the most egregious errors. (I'm working on a much more bulletproof AppleScript Studio version of this which will be available here once it's complete. In the meantime, the proof-of-concept version is available there now.)

For safety, the offloader does not delete the recordings from your hard disk. Instead, it moves them to your Documents folder. Once you've verified that your DVD works OK with EyeTV, you can drag the recordings to the Trash. If there's any problem, you can restore them to your EyeTV Archive simply by dragging them back into it and replacing the "copies" that are there (the symlinks).

Pages: 1, 2, 3

Next Pagearrow