Hacking

Adding Live TV to XBMC

It started simply enough. “I would like to watch the olympics on our main television.” After about an hour of cursing at the tv we gave up and contented ourselves to watch the olympics in the kitchen.

We get our TV signal over cable. Although we don’t have a cable TV subscription the broadcast channels are sent unencrypted over the cable line. This works great on our newer Sony TV. It turns out it doesn’t work at all on our older Pioneer TV. After much research I discovered that the Pioneer has an NTSC and ATSC tuner (analog and digital over the air), but not a QAM tuner (cable without a cable box).

The simple solution would be to plug a set of rabbit ears into the Pioneer and call it a day. We probably even have some in the basement. Those of you who know me know that the simple solution is never, ever, the one I go for.

Enter the Hauppauge 2250. Oh yes, we’re adding live tv to our media PC.

DVR / Live TV functionality is experimental in XBMC. It was originally planned for Eden (version 11), but got pushed back to Frodo (verson 12). It’s under active development, and arguably useable, so I decided to go for it.  After 3 days and a ton of reading, I have it more or less working. If that’s not a ringing endorsement, what is?

The latest PVR builds of XBMC are meant to work as front ends to one of a handful of backend “TV servers,” software which will handle the nitty gritty of managing the TV tuner card. This can be either in the same machine as XBMC or on a separate one. For now I’m working locally. I chose MediaPortal as the backend because it runs on Windows and has a reasonably active community.

Step 1 was to install the card and see if I could get it to even come up in Windows Media Center. And it did! The setup wizard found 10 channels on the QAM tuner. A number of channels, including NBC and CBS, were missing. After about an hour of poking at it I decided to move on to my ultimate target, MediaPortal.

MediaPortal has two main parts: the TV Server and the client frontend. The client frontend is another media center program, which I ignored. The TV server runs as a service under windows, and is more or less invisible once you’ve got it running. It’s managed with its own configuration tool separate from the MediaPortal frontend.

With the TV server installed and running, step 2 was to scan for channels. This took about half an hour, and found hundreds of channels – many of which were encrypted. I deleted all the encrypted channels (marked with a red T). This left me with about 100 channels. Many of these were data channels (which gave an error when I tried to preview them) or otherwise uninteresting, so I deleted those as well. The remaining 40ish channels included broadcast and cable public access stations.

Step 3 was to identify each station and get scheduling data. The broadcast stations self-identified, but the call signs they used were sometimes opaque. WHYYDT is pretty obviously the local PBS affiliate, but it took me a fair amount of googling to figure out that RT is the station formerly known as RussiaToday, and is offered by local independent station WYBE.

Step 4! Armed with a list of call signs for each station, I started creating a grabber file for MediaPortal’s WebEPG plugin. In theory, listing data is sent along with the signal and can be picked up by the tuner, but I didn’t have any luck with that. WebEPG lets you get listing data via the internet. I copied the IMDB grabber included with the plugin and added a listing for each station in the following format:

<Channel id=”RT” siteId=”WYBEDT2″ />

The Site ID is generally the station’s call sign, with DT added to the HD digital feeds. Subchannels (e.g. 10.2) usually have a trailing number. So our local NBC affiliate, WCAU, can be found at WCAUDT and its substation NBC Nonstop can be found at WCAUDT2. You can double-check to make sure you’ve got the right ID by going to http://www.imdb.com/tvgrid/2012-08-01/WCAUDT/, replacing WCAUDT with the call sign of your choice. You should see the schedule for that station.

Lastly, I needed to install a plugin for MediaPortal that will allow XBMC to communicate with it called TVServerXBMC.

Whew! That concludes the MediaPortal set up, now on to XBMC!

In order to play with the PVR stuff you need to install one of the experimental PVR builds. I went with Margro’s build which includes the MediaPortal add-on. Setup in XBMC is fairly straightforward: enable the add on and a new option for Live TV shows up in XBMC. Assuming everything’s been set up correctly in MediaPortal your TV stations and listing data will be populated and there you have it: Live TV in XBMC.

There are a few bugs in my set up, which I assume are a combination of errors in my confguration, bugs in the still-under-development software, and features which have yet to be implemented. These include:

  • Deinterlacing problems on some (but not all) HD channels. This is most visible at the edges of moving objects on screen.
  • XBMC/MediaPortal only using one of the two available tuners (meaning I can’t watch one thing while recording another)
  • Visual glitches in XBMC, like text overlapping itself
  • Occasional trouble tuning stations, which is resolved by trying another station and then coming back
  • Occasional video stutter
  • Live TV can be paused/resumed, but not rewound / fast-forwarded

It’s still a work in progress, but it’s getting there! In theory one TV backend can serve all the XBMC frontend clients on the network, so getting that up in running is one of my next steps along with ironing out some of the configuration problems.

 

8 thoughts on “Adding Live TV to XBMC”

  1. I got to say, wish I gone through this at the same time you did. Would have loved to have collaborated. I cant tell you how many hours I have spent crawling all the forums trying to get the live TV setup right. I hope, like myself, you are rightly impressed with your outcome. I’ll be calling Time Warner tomorrow to cancel my cable.

    One question, did you ever figure out how to keep the live tv playback consistently on for all channels. For example, I was able to watch an entire football game last night w/o issue, but this evening, it made it through about 5 minutes of The Voice and then froze and finally returned to the main XBMC menu. I was able to restart, but then the same thing happened again. This issue and the remote losing focus when I’m on the computer are the only two issues I have left to overcome.

    1. I never did sit down to debug the deinterlacing issues. It’s on my to-do list. I’d probably start by using the latest build of whatever flavor of XBMC you’re using… mine is a couple months old now and I really need to get around to updating it.

  2. so let me get this straight

    1) You installed Winodws media Center (WMC) to make sure that you could work with your tuner.
    2) You installed MediaPortal to create a more useful server tool, than what is built into WMC? MediaPortal does not need WMC to run, but does need to know that is can work? Remember that WMC also has a serevr component, and client tool; just like MediaPortal does.
    3) You installed one of the nightly builds of XBMC to have as a new frontend for Media Portal.

    through various tweeking, it all seems to be working.

    Question: is there a XBMC build that uses WMC direct, without the need for MediaPortal?

    1. I don’t know of any xbmc builds that use Windows Media Center as a backend. A list of the currently supported backends can be found here: http://wiki.xbmc.org/index.php?title=PVR

      MediaPortal does not need WMC in any way, I just wanted to check that I had the card drivers installed and working before bothering to download and install Media Portal so I didn’t end up spending hours debugging the wrong thing. WMC has the advantage of already being installed.

  3. I wish this post was just a bit more detailed, it’s been a bit of a struggle since a lot of your steps are very vague. :-S

    I’m currently stuck on “Setup in XBMC is fairly straightforward: enable the add on and a new option for Live TV shows up in XBMC.” Which add-on and where is it located?

    I feel like I’m so close, yet so far. Ha.

    1. This sentence in the post is relevant to your interests:
      “In order to play with the PVR stuff you need to install one of the experimental PVR builds. I went with Margro’s build which includes the MediaPortal add-on. ”
      Links to the appropriate builds for the backend of your choice can be found on the XBMC wiki: http://wiki.xbmc.org/index.php?title=PVR

      1. I did install Margro’s build, I was just looking in the Add-on directory instead of in the Live TV menu item that I didn’t notice had appeared.

        Thanks for the follow-up. Unfortunately, after enabling the MediaPortal add-on, when I try to launch Live TV, I receive the “No PVR clients have been started yet…” error. Blast. As a recent Boxee convert, not knowing much about XBMC, this is quite a challenge. Ha ha ha.

        Thanks for your help.

        1. You know, I do vaguely remember seeing that error, but damned if I can remember what the cause / fix was. Is MediaPortal configured, happy, and running?

          PVR on XBMC is indeed very much a beta at this point, so I feel your pain. The good news is the development is fairly active so if something just isn’t working you can find something else to play with for a bit and in a few weeks you may find it fixed.

Leave a Reply

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