ETVComskip
Commercial detection and skipping for EyeTV, using a Mac OS X port of comskip (http://www.kaashoek.com/comskip/).
These programs allow users of EyeTV to enjoy commercial-free recorded television
Commercial skipping instructions:
1) run FileWatcher. This process watches the EyeTV Archive directory for changes and processes new shows for commercials. You may wish to make FileWatcher a login item. When new recordings are finished, FileWatcher calls MarkCommercials.sh to scan the recording for commercials and create a commercial marker file (a .plist file in the recordings' directory with the same name as the .mpg file). NOTE: when run as a login item, debugging output goes to the system console.
2) Run ComSkipper.app. This AppleScript will stay running, and wake up periodically to see if EyeTV is playing a recording. If it is, and the recording has a .plist (commercial list) file, the script will wake up more frequently to see if it needs to skip a commercial.
When ComSkipper wakes up, it checks the current playback time. If the playback time is within a commercial gap, ComSkipper tells EyeTV to jump to the end of the gap.
There are many options for tuning comskip, but they are beyond the scope of this document. For details, see http://www.kaashoek.com/comskip/, and links therein.
Note: currently, the executable supplied for comskip is intel-only, as I have no way to test a PPC version, and I'm not sure if additional changes might be needed to comskip to support the PPC architecture. The source to comskip is provided (as required by the GPL) and I welcome reports of success or failure on PPC machines.
Batch scan of existing files:
You may wish to use FileWatcher to scan your entire EyeTV Archive directory and mark commercials in all recordings. This generally needs to be done only once, since in normal operation FileWatcher will automatically scan new shows for commercials.
To scan all files, you'll have to type the following in the Terminal:
/Applications/ETVComskip/FileWatcher.app/Contents/MacOS/FileWatcher all
This will probably take a long while, depending on how many recordings you have.
It is useful to run this command if you think FileWatcher has not been running or has otherwise missed a recording. If the .plist file exists, commercial detection will not be run again, so this will be fast. However, this will merge the markers from the .plist files into the .eyetvr file so that they can be seen by EyeTV. This is very useful for using EyeTV's compacting and exporting features.
Due to a limitation in EyeTV, external changes made to the .eyetvr file made while EyeTV is running are overwritten by EyeTV, so you'll need to quit EyeTV for these changes to be merged in properly. The AppleScript FileWatcher uses to find the EyeTV Archive directory will start EyeTV, so FileWatcher will prompt you to press enter after you've quit EyeTV when run in this mode.
Keep only a certain number of episodes of a series:
A notable missing feature of the EyeTV software is the ability to limit the number of recordings of a series to some set limit. For instance, you might want to limit recordings to the last two nights of the daily news, or the last three episodes of some favorite cartoon for your kids.
EyeTVReaper.scpt is a script which will plug this gap. EyeTVReaper is called by FileWatcher, so there's no extra installation to do. However, you will have to tell the reaper what to do. This is done by editing the file /Applications/ETVComskip/PurgeList.txt. In this file, lines starting with # are ignored as comments, but all other lines should be of the format:
days: pattern
where "days" is the number of days to keep, and "pattern" is a shell glob pattern which matches the title of the series you want to purge. If you don't understand what this means, that's ok; the simplest explanation is to just place a star (*) character before and after some word which is unique among all the shows you record. For instance,
3: Sesame
would limit to three days of Sesame Street.
If more than one word is necessary to uniquely identify a series, place a star * between each word. For instance:
2: NBCNews 2: CBSNews
Note: an earlier version of FileWatcher was an applescript designed to be run as a folder action, but Folder Actions proved to be unreliable under Leopard.
LICENSE: comskip itself is under the GPL, and as required by the GPL, the sources are found in the src directory. The AppleScripts are Copyright (c) 2007 by Jon A. Christopher, and are also placed under the GPL license.