Enter Search Query:

Build your own DVR with commercial skip

This guide will walk you through the steps needed to build a TiVo like Digital Video Recorder (DVR) or Home Theater PC (HTPC) that can record your favorite shows and skip commercials automatically. What’s so cool about automatic commercial skip?  It means the ads in your show will be skipped during playback without user intervention. So you never have to push that 30-second skip button or fast forward/rewind through commercials again! Why? Because you love TV and hate commercials…that’s why.

Before I continue, I’d like to give a shout-out to Sage TV and the entire Sage user community! Without you none of this would be possible. To buy Sage TV click here and to donate money to the various creators of Sage Customizations, click here.

To build your own DVR/HTPC you’ll need a quiet and reliable computer, a digital video capture card, some software and a good remote control. Basic digital video cards that work with SageTV (such as the Hauppauge PVR 150) can be found on eBay for as low as $20. The computer doesn’t have to be a computing powerhouse. I got mine from a local PC recycling shop. They had several pellets of these HP computers from a Countrywide liquidation to resell and I picked one up for $80 bucks.

This is the shopping list for the equipment needed in order to build my DVR. Yours may vary depending on the amount of items you already have on hand. I kept track of the cost of these items so that you can estimate the cost of this project beforehand. You can save even more by purchasing many of these items used on eBay. I got my WinTV PVR150 video capture card from eBay for $11 bucks including shipping.
Here is my list of components:

Computer: HP DC7600 ($80)
Video Capture Card: Hauppauge PVR 150 ($11)
Remote Control: ATI Remote Wonder ($15)
IR Blaster: USB-UIRT ($55)
External Hard Drive: Seagate 1TB ($110)
Software: SageTV Media Center 6.5 ($80)
Software: DragonGlobal ShowAnalyzer ($10)
Software: DragonGlobal DirMON (free)
[Step 1] Install hardware and operating system. SageTV supports Windows, Mac and Linux, but since you’ll have to configure lots of components like a USBUIRT (a USB ir blaster device) and a remote control I’d stick with Windows XP because chances are good that you’ll find drivers for all of the hardware you’ll want to use.

[Step 2] Now that you’re done installing Windows XP and configuring the device drivers you’ll need a few updates:

  1. First download & install SP3 plus all security patches.
  2. Make sure you have the latest DirectX and at least .Net Framework installed.
  3. Download and install the latest version of the Java run-time environment from Sun.
  4. I recommend installing gVim (a text editor) or some sort of text editor, uVNC (a remote control utility) and Firefox.

NOTE: Check the Device Manager by right clicking the My Computer icon and choosing Properties, then clicking the hardware tab and device manager button. Any devices that still need drivers or aren’t configured properly will be denoted by the yellow question mark (?).


[Step 3] Now that you’re done with the operating system it’s time to configure the hard drive for your TV recordings. SageTV suggests that you format this drive using 64kilobyte chunks as the allocation unit. This will prevent the disk from getting fragmented over time.
For format your TV recordings drive:

  1. Right click the My Computer icon and choose Manage.
  2. Click Disk Management. Right click the disk you’d like to work with and choose Format. Under Allocation Unit Size choose 64K.

[Step 4] That’s it your system is now ready for SageTV Media Center. If you have not done so already, download the latest version of SageTV Media Center from the SageTV website.

  1. Launch the SageTV Media Center installer (If you’ve purchased the software, have your registration code handy).
  2. Proceed through the installation wizard by selecting the appropriate options and clicking Next as shown in the screen-shots below:
    [nggallery id=21]

[Step 5] Now that SageTV is installed, you have a few choices on how to get it connected to your Cable/Cable Box/Satellite Receiver. You can use a coax cable from your cable box or connect it to a coax splitter (if you have cable). If you want to record OTA HDTV with an antenna, you’ll want to get capture card capable of receiving ATSC clearQAM TV signals such as the SiliconDust HDHR. You can also your capture card using an S-Video cable to your Satellite or Cable box and record video this way. If you chose this option, you’ll need to install an Ir blaster or USBUirt device to change the channels on your Satellite box.
NOTE: I have a Dish receiver hooked up to my video capture card using an s-video cable. I use the USBUirt device to send remote codes for changing the channels on my Dish receiver.

  1. The following screen-shots show will guide you through the initial SageTV configuration using a Satellite box as the television source.
    [nggallery id=22]
  2. During the SageTV setup you will also need to customize the video recording directory path to match the drive letter of your TV recordings drive (which should have been formatted 64K Clusters).
  3. If you chose to use the USBUirt controller + Any Remote option during the setup you’ll need to go through an extra wizard which will teach SageTV the basic remote control signals for your Satellite (i.e. 0-9 and OK). To do this you’ll need your Dish or cable box remote control pointed very close to the USBUIRT device when prompted.
  4. You may need to specify a larger number of codes. As I said, Dish requires 4 digits per channel so if you want channel 4, it’ll send 0-0-0-4.

You now have the option to use an any old infrared remote control to control the menu in SageTV, you can continue using the mouse & keyboard, or you can use a radio frequency or RF remote like the ATI Remote Wonder II PC remote. I’ve written an article here on how to configure the ATI Remote Wonder II with SageTV. The following steps will guide you in programming your existing infra-red remote control with SageTV:

  1. In the setup, select the Link Infrared/Keystroke to SageTV Command button, choose a command you’d like to program and the press the corresponding button on your remote control while pointing close to your USBUIrt receiver. Cycle through through all the commands you’d like to program (i.e. UP, DOWN, LEFT, RIGHT, FF, REW, PAUSE, PLAY, etc). If you have a lot of extra buttons on your remote it might be helpful to program the DELETE, FF2 and REW2 buttons.
  2. Once you’re done programming your remotes, it’s important that your USBUIRT device is pointed towards your satellite or cable box. This way SageTV can change channels on it.
  3. Once your sources and remote codes are setup you may want do do a bit of testing by watching some live TV and changing the channels a bit to see if the USBUIRT device is functioning correctly and changing the channels on your Satellite or Cable box. For instance, I had to change my USBUIRT device settings to send 4 digits per channel in order to get SageTV to change the channels on my Dish box.

NOTE: If you’ve got problems getting SageTV to communicate with your cable or satellite receiver, here are some tips for troubleshooting:

  1. Make sure the USBUIrt Infrared controller is pointed towards your satellite/cable box.
  2. Go to Setup video sources and try clicking Test Infrared Code while having your TV turned to the Satellite or Cable box source to see if the channels change. This way you’ll see what (if any) remote codes haven’t been programmed properly.
  3. If unsuccessful, try re-learning the Infrared Code.

[Step 6] [Once you’ve got playback, recording and channel codes setup your PVR is ready to start recording shows. Go ahead and add some shows as favorites and see if they record properly. If everything is working, it’s time to configure commercial skipping.

  1. Download the comskip_playback_import.stvi by clicking the link or searching SageTV Forums.
  2. With SageTV shut down, copy the file to C:Program FilesSageTVSageTVSTVsSageTV3 (also make a copy of your SageTV.stv and SageTV.xml files and keep them in a backup directory in case something goes wrong)
  3. Start SageTV and go to Setup->Detailed Setup->Advanced->Import SageTV Application Package (.STVi File), click Select and choose the comskip_playback_import.stvi file. Click Yes to the warning message.

That’s it. Your SageTV is now able to automatically skip commercials in recorded TV shows that have been scanned for commercials using comskip or ShowAnalyzer. The comskip_playback_import.stvi will have installed some additional options in the Setup-Detailed Setup->Customize menu to let you customize how you want to handle any detected commercial segments.

stvi import (2).jpg

[Step 7] Now that you’ve got SageTV configured to recorded TV with detected commercial segments, its time to install our commercial detecting software to mark commercials in your recorded TV content. This requires some 3rd party software. I’ve been using ShowAnalyzer ($10 Registered) and DirMON (free) do handle this task. ShowAnalyzer is an application that scans video files for various cues such as channel icons and screen fades to determine the beginning and end of commercial segments. It records the location of commercial segments (in the video time line) in the form of small text files with the same name as the video file so SageTV can use them later to skip that section.

[Step 8]  The next piece of 3rd party software we need is DirMON. This application watches your video directory for new files. Once a new video file is created it launches an instance of ShowAnalyzer to analyze the video. When ShowAnalyzer is done analyzing the video and generates its text file, DirMON moves on to the next video file in the queue and stops processing video files as soon as every video file has a matching ShowAnalyzer text file to match. You can also schedule ShowAnalyzer to only analyze video during certain hours to conserve CPU time if you have a slower processor that gets bogged down by ShowAnalyzer.
Now that you know what these applications do, lets get them installed and configured:

  1. Download and install ShowAnalyzer (SA).
  1. Once Installed, launch Configure ShowAnalyzer and enter your registered Name and Key.

Download and install DirMON (DM). Launch DirMON and configure it exactly as shown in the screenshots below:

  1. Select the Job Management tab and click New
  2. Under Directories, Add the video recording directory from your SageTV Configuration.
  3. Under Programs to run, enter the exact path to your ShowAnalyzer.exe program file or locate it via the […] button.
  4. Under Target Expressions, enter mpg,dvr-ms
  5. Under Triggers->Must Not Exist, enter txt
  6. Leave all other settings at their default values
  7. Select the Global Settings tab and click Add
  8. Under Cleanup Settings->Directory, enter the video recording directory from your SageTV Configuration.
  9. Under Delete files with these extensions, enter edl,txt
  10. Under When no corresponding file exists…, enter mpg and click OK.
  11. Click the Install button to install the service and then click the Start button to start Analyzing video content.
  12. Click File->Save to save your configuration.

Your SageTV installation and customizations are now complete and recorded TV content should now get automatically analyzed and tagged for commercial segments. SageTV should also now let you automatically skip those marked commercial segments.

Here is a short video demonstrating commercial skipping using some a live TV stream from CNN:

April 11, 2006

Related Posts

11 comments found

Comments for: Build your own DVR with commercial skip

  1. Daniel

    I couldn’t understand some parts of this article Build your own TiVo with Automatic Commercial SKIP, but I guess I just need to check some more resources regarding this, because it sounds interesting.

  2. Pingback: David Vielmetter » Blog Archive » PVR Update: Automatically skip ads and burn shows to DVD

  3. http://www.televisions.me

    Amazing site! love the easy layout

  4. Post author: 
    David Vielmetter

    Tony Hancock writes:

    I see your information on how to skip commercials with SageTV and a PVR. Is there a program that “senses” a commercial so that I could program the TV(PVR) to play something else…another channel or my own homemade commercial for example and then return to the original program when the commercials are complete.


    The program I use for commercial detection is ShowAnalyzer (just google it). It costs $10 dollars and it has the capability of outputting a log file that would indicate the beginning and end of a commercial segment. I guess if you used it to detect commercials in the live stream and then watched that log file with another process you could determine the beginning and end of segments. The problem would be to do this on the fly, but if you had a DVR, and played TV with a bit of a delay it might work. Once scanned for commercials the Showanalyzer puts out EDL or TXT files with markers for the beginning and end (in the video timeline) of commercial segments. You could use this information to splice in your own commercials or video slides at least.

  5. elmoe65

    @David Vielmetter
    Tony have you been able to do what you wanted to do. Skip the ad and play something else?

  6. Pingback: David Vielmetter » HOWTO: DIY HD DVR v2.0

  7. Maria Grimaud

    Linux backups aren’t really a task. A nice backup cron will work for months!

  8. Pingback: Automatically skip ads and burn shows to DVD | David Vielmetter

  9. Pingback: Build your own HD TiVo with Automatic Commercial Skip | David Vielmetter

  10. anthony milone

    will it really work

    1. dvielmetter

      I make no guarantees.

Leave a Reply

Your email address will not be published. Required fields are marked *