Sunday, February 24, 2008

Skip Commercials With a Press of a Button - HTPC How To

no commercialsOne of the most popular features for most HTPC users that you can't do with a cable-box DVR or Tivo is commercial detection and skipping.  It is this one feature alone that helped me convince my family that connecting our computer to our Television was a good idea. 
Why such a big deal?  Imagine you are viewing one of your pre-recorded shows from an hour before and while viewing you get to an annoying commercial.  With a normal DVR you either watch the commercial or you hit the fast-forward button to slowly move over the commercial and then watch for the end of the commercial so you know when to hit the play button.  
With HTPC, commercial-detection you just hit the "skip" button on your remote and it moves to the very end of the commercial just like that.  I'm talking about commercial detection and skipping - after a few years of using a Home Theater PC, commercial skip is a requirement for TV viewing in my house.  Read on & I'll show you how it works on an HTPC and how to set it up.

SageTV is an excellent HTPC software program that transforms your home computer into a powerful, supercharged DVR with many additional features than you would find with your cable or satellite box DVR or even your TIVO.  Commercial detection and skipping isn't built-in to SageTV, but is free and easy to set up.  NOTE:  skipping based on a set time such as 30 seconds is built in to SageTV.  SageTV's Website
We rarely watch commercials any more (except for during sports such as the superbowl) because you can install an add-on that analyzes your recorded shows and marks the start and end point of most commercials so you can quickly skip over the commercials and go straight to the content. 
Here's how it works once installed.  When you hit the play button on your remote control a status bar appears at the bottom of the television screen like this one:
You'll note the dark green portions of the status bar, these are the commercials that were detected.  When you hit the skip button on your remote control (my skip button is mapped to the "right" button on my remote control) it will skip to the next start or end point of the next commercial.  You can skip back the same way with the back button as well.  It works much like the chapters in DVD's with the start and end points of each commercial acting as the chapter marks.
To give you an idea of how commercial skipping works, check out this very-short screencast I made while viewing a SageTV-recorded television show:
In the video I press the play button on my remote to show you the status bar during playback of a show.  Then the show gets to a commercial - at this point I hit the skip commercial button and it goes to the end point of that commercial.  If for some reason the commercial detection was off a little, I can do a rewind or fast forward a few seconds to get to the correct spot.

There are two or three steps to installing commercial detection in SageTV.  In all it should take about 5 minutes to set up:
1.  Commercial Detection Program
First you need to choose one of the commercial detection programs.  The two available are the free, ComSkip program and the $19.98 ShowAnalyzer program.  Both are used by SageTV users and everyone has their favorites.  Comskip can run while a show is recording while ShowAnalyzer can integrate with the Webserver (web-based guide add-on) to customize commercial scans.
2. File Monitor Program
Next, you need a program to monitor your show recordings directory for new recordings.  As soon as a new recording appears in the directory(s) the file monitor program runs your ComSkip (or ShowAnalyzer) program to mark those commercials.  There are two different programs that will do this for you and both are free.  The first one is ComSkip Monitor and the second one is DirMon.
  • ComSkip Monitor - Used with ComSkip.  This program is a little less configurable than DirMon, but it's extremely easy to set up. 
    • First download ComSkip Monitor from HERE
    • Unzip into the directory of your choice.  I put it in "SageTV\SageTV\" directory so it gets backed up when I back up my SageTV installs, but you can put it anywhere on the SageTV PC.
    • Go to the ComskipMonitor directory and run setup.bat (run as administrator)
The Comskip Monitor walks you through the setup where you select your recorded shows directories,
Choose the video file types by inputting their file extensions such as mpg etc.
There are several further configuration options that the setup configuration walks you through.

    • Once you've completed the configuration wizard, and click "Finish" and close the window.
  • DirMon2 - DirMon2 is a very configurable and powerful file monitor program that can be used for monitoring commercial skip files and can be used for other purposes as well.  Read about how to set DirMon2 for SageTV HERE and get the free download at Dragon Global
3. ComSkip Playback Support
Finally, SageTV needs to have the ability to "recognize" the special txt or edl files that were generated by ComSkip to mark the commercials.  You don't need this if you are using the SageMC skin since it is built-in to the SageMC skin itself.  If you aren't using SageMC, you need to download the ComSkip Playback Import HERE and then follow these steps:
    1. Unzip the ComSkip Playback Import program into SageTV.  The df_sageutils.jar goes in the "SageTv\SageTV\Jars\" directory.  All other files from the zip should be placed in the "SageTv\SageTV\STVs\SageTV3\" directory.
    2. Restart SageTV
    3. Load the import by going to Setup -> Detailed Setup -> Advanced, then select "Import SageTV Application Package"

Once everything is installed you can now modify the settings in the default SageTV STV under Detailed Setup>ComSkip Playback Options.

If you're using SageMC, the option page is similar to the standard STV options page.  The main option you can adjust is the Commercial Auto Skip.  Switch this to enabled and it will automatically skip any detected commercials without ever touching the remote. SageMC Comskip Option
You're done.  Go enjoy your HTPC shows commercial-free!
If you find Comskip useful, you might consider showing your appreciation and click the 'Make a Donation' link

Want to get the commercial skip capability with other HTPC software programs?  Here's a few places to find out more for the most popular HTPC software programs:
BeyondTV:  I have to give kudos to Snapstream and their BeyondTV software DVR program, it has commercial detection built-in so there's nothing to configure or set up.  They call this function "smartskip." and it works very well.  I know because I've used it for several years with great success.
Vista Media Center DVRMSToolbox:  CyberNet has an excellent guide on getting started with the freeware, DVRMSToolbox commercial detection add-on which also uses comskip or ShowAnalyzer for commercial skipping.  Read CyberNet's Guide HERE     via Lifehacker
Vista Media Center LifeExtender: LifeExtender is a freeware add-on for Vista Media Center which also uses comskip or ShowAnalyzer for commercial skipping and also cuts those commercials from the file for you.  Get LifeExtender HERE        via InspectMyGadget
GBPVR:  GBPVR uses the ComSkip program with their HTPC software as well.  Read more on the setup at the GBPVR Wiki
MediaPortal with Comskip: Head over to the MediaPortal forums for a how-to on setting up Comskip in MediaPortal
MediaPortal with DVRMSToolbox: Head over to the MediaPortal Wiki for a how-to on setting up DVRMSToolbox in MediaPortal
Mac OSX - There is a Mac OSX port of comskip available at the Google Code Page for use with EyeTV.
MythTV: The MythTV wiki has a how-to on setting up commercial detection with the open-source, Linux HTPC front-end.