Advertisement

How to automatically skip commercials in Windows 7 Media Center

Skipping commercials on a HTPC DVR has been around for a long long time, but it isn't always the easiest thing to setup. And even if you do get it working, there are so many options, it can take some time before you get it working the way you want it. So in the spirt of Windows 7 day, and the fact that the next major version of ShowAnalyzer is being released, we figured we'd write up a how to with a few tips and tricks of our own. We start by downloading and installing the main components; DVRMSToolBox, the DTB Media Center Add-in and ShowAnalyzer, and finish off with some troubleshooting for when things go wrong. So if you use Media Center, click through and never pick up the remote to skip a commercial again.


First we need to download a few small installers that make this work, everything is free except ShowAnalzyer which costs $30. This sounds like a lot, but it is a small price to pay, and besides it is the only automatic show detection software available that supports the new WTV container used in Windows 7. If you are still unsure, try it anyways as there is a fully functional 30 day trial.

Installation options
First we're going to install DVRMSToolBox (DTB for short from here on out) by unzipping the download and doubling click on Setup.exe (not the MSI).
Leave modify permissions checked and click next.
Uncheck Download/Install ShowAnalyzer (that option installs the older version, we want the latest) but leave Run the DTB file watcher as a service checked, otherwise it won't work automatically. Click next a few more times and you should be done.



Next up is the DTBAddin, which is very straight forward, just unzip it and run the MSI for your platform (x86 or x64), next, next next is fine, but a restart is required.


Now lets install ShowAnalzyer, which is also a next, next, next install because all the configurations are done afterwards.
When the installer is done, launch it by going to Start>All Programs>ShowAnalyser Suite>ShowAnalyzer User Interface and then go to Help>Add Registration Key to register it (again you have 30 days to do this).

Now go to Tools>Settings and on the scheduler tab make sure Enable Directory Watcher folder check box is cleared (we use DTBs File Watcher instead). We'll go over more of this later, but for now go ahead and close out of it.

Configuration
First we are going to customize DTB, so lets go to Start>All Programs>DVRMSToolbox and launch DVRMStoMPEGSettings (If you have UAC enabled, it is normal to see the UAC prompt) -- from here we are going to share all of our favorite settings, feel free to configure it however you like though.

We're going to start with the File Watcher tab.


  • The Watched Directories needs to contain your Recorded TV directory, which should be filled by default. You can add more directories, one per line, if you store recordings in more than one folder.

  • Wait Time should be set to 0 if you want recordings to be scanned for commercials while they are still recording, 5 if you'd prefer to wait until the recording is completed. On one hand it is nice to be able to automatically skip commercials while a show is still recording, but on the other it occupies a worker for a much longer time (more on that next).

  • Set the workers to 2, which is how many shows will be scanned at the same time. We found that our dedicated Recorded TV Hard Drive really can't handle more than two workers and let us watch TV at the same time. If you are very sensitive to a lagy UI, you should set this to 1. If you have tons of disks, load up Resource Monitor in Windows and monitor the Average Disk Queue length to see what your box can handle.

  • Towards the bottom, make sure the Log Create and Log Write check boxes are checked, otherwise it can be difficult to troubleshoot when things go wrong. We also checked the automatic cleanup so temp files get deleted, as well as the Include Watched folder (although we don't know what it does). If your Recorded TV directory isn't flat like it is by default in Media Center, then check the Recursive watch check box.


Now on to the Commercial Skip tab.


Before we get into this, lets go over how we want this to work because there are lots of options. When a recorded program is played back, we want the commercials to be skipped automatically without even pressing a button. In the event that the show has not been scanned yet, we just want to watch the show and skip commercials manually. Now in the event that part of a show was incorrectly marked as a commercial -- it does happen on occasion -- what we want to do is simply disable the auto skip altogether and skip 'em manually. If you don't want it to work like that, then by all means don't follow these settings, if you aren't sure how to change the behavior, post in the comments and we'll try to help.

  • Start at the bottom by checking the Auto Skip check box and the Suppress Not Found check box (otherwise anytime you try to watch a recording that has not be scanned, you'll get a nag warning).

  • The main key to achieving our desired results here is setting the preferred keys. Although there really isn't an ideal setting, we find that the Right Key for Auto Skip On and the Left key for Auto Skip Off works the best. This way the only negative side affect is that you can't browse right and left in the Guide while watching recorded TV (you know like a TiVo!).

  • Set everything else here to a D and a number like D3. This basically disable these functions since these keys on the remote aren't used when watching recordings. If you aren't sure what each function does, just mouse over the drop down and read the tool tip.


With DTB configured and our commercial skip preferences in order, we're going to do a little more optimization. There are simply some shows we never want scanned. For example, some channels like HBO and PBS don't even have commercials, so why scan them? While other channels might be DRM'd so ShowAnalyzer cant scan them at all. On top of these examples, there are specific shows, like kid's programming that also don't have commercials, so again, don't waste a worker on it when it could be doing something useful.

Now since DTB expects a commercial's XML file to be created (remember the suppress not found from above?) the best way to do this is to create a blank commercial's file, but to do this selectively we need to use what is called Process Conditioners.


The first step is to So go to Start>All Programs>DVRMSToolbox and launch ProcessingConditionEditor.
Here is what ours looks like -- except Any files is actually at the bottom.


The current version of DTB now supports OR conditions so you can now create one Condition that'll include all the exclusions. Lets start with one everyone can use Don't Scan PBS -- if you aren't watching PBS you are missing out, some great HD on there.
Start off by hitting New Condition on the top right.
Enter in a Description like Don't Scan PBS (leave the name blank, it'll auto fill).
From the Drop Down choose Create an Empty Commercials File
On the right hit Add choose WM/MediaNetworkAffiliation then Contains then in the box type PBS and hit ok.


Now before you exit out of your new condition, lets test it by hitting the Test Conditions button. This will bring up a file picker where you can choose from your recordings to see if they match. Be sure to try both a show that is supposed to match, as well as one that isn't.


This won't want match because it was recorded on ABC


This one is a match.


Finally make sure that the profile Every File is still last, otherwise your conditions will never be tried.

There are lots of metadata variables to choose form here, but be careful. For starters some variables are of different types and can't be compared (numbers vs letters) while others aren't set until after the show is finished recording. So if you deviate away from the example, don't be surprised if a little trial and error is necessary to get them working right. We also find this Metadata editor useful for seeing what is available as well as copying the expected value.

Now as new files are added to the Recorded TV directories they will be picked up and a match will try to be made based on the process conditioners. If not match is found, then the Any Files condition will be a match and the Scan for Commercials profile will be used. In the event you have recordings that are already in the directory, then your best bet is to scan them manually. You can just open up the same ShowAnalyzer User Interface from before and choose file and select the file or folder you want to scan. It'll queue them all up and run them two by two. There are also some customizations that can be done in here to increase the accuracy of the scanning, but honestly we've never tried it ourselves.


When things don't work
Really that is all there is too it, in fact you can pretty much just get away with installing everything and nothing much else. But we found it could be more trouble then it is worth without these customizations. But when things do go wrong you need to know where to look. The main place is in the Windows Event Viewer since we enabled the logs most of this should get logged. But one thing that can also go wrong when you create Process Conditioners is that you mess them up and nothing gets scanned. The best place to start for these troubles is this folder.

C:\Users\Public\DvrmsToolbox\FWLogs

It contains the the File Watcher logs, and will have one log for each show. A log will look like this when it works.

Notice how Don't Scan PBS was a match and then it ran the CreateBlankCommercialsFile profile.