RefBan

Referral Banners

Tuesday, February 5, 2013

How to Watch and Record Live TV on Your XBMC Media Center

February 5th, 2013Top Story

How to Watch and Record Live TV on Your XBMC Media Center

By Whitson Gordon

How to Watch and Record Live TV on Your XBMC Media CenterBuilding a media center is a killer way to watch or stream your favorite movies and TV shows, but if you miss being able to watch live TV—and record it so you can watch it later—you can turn your XBMC box into a personal video recorder (PVR) with just a bit of setup. Here's what you need to do.

XBMC 12 Frodo finally brought official PVR support to our favorite media center software, and it integrates very nicely. It still takes a bit of setup to get running though, so we're here to detail all the steps involved for your XBMC media center. If you don't have one yet, check out our guide to building one and setting everything up before continuing.

The Advantages (and Disadvantages) of Turning Your Media Center into a PVR

First things first: putting together a DIY PVR can be useful, but it won't be quite the same as having a TiVo or other commercial DVR in your house.

The main advantage of adding PVR functionality to your media center is that you can then do anything you want with your recordings. You can add them to your regular XBMC library, put them on your phone or tablet for watching later, or do anything else you so desire. It can also much cheaper than buying a separate DVR, depending on what you're recording (cable users will probably have to spend more). You can also customize your list of channels, which is nice, so you don't have to see channels you don't like if you don't want to.

The disadvantage to setting up a PVR this way is that it just doesn't work as well as a dedicated product. There are a lot of different TV tuners and PVR applications out there, but your experience won't be quite as smooth and seamless as it would be on a dedicated product. For example, on our main test machine, things worked fairly well, but changing channels is noticeably slower than on a regular TV, picture quality can vary a lot (depending on your device and the codecs you use), and you may even experience the occasional freeze or crash. PVR support in XBMC is still very young, so this will definitely improve over time, but it's unlikely you're going to get the same experience you do on a device made for PVR.

Overall, I'd say my experience has definitely been a positive one though. I bought a very cheap TV tuner and have been able to watch and record TV right from my home theater PC for much less than any other device, which is pretty awesome, and being able to have everything available from the XBMC interface is pretty great. The more you experiment with different programs and setups, though, the better experience you're going to get, so let's get started.

Step One: Install a TV Tuner Card

How to Watch and Record Live TV on Your XBMC Media CenterIn order to get live TV on your home theater PC, you'll need to install a TV tuner card. We've talked about this before, so we won't go into a ton of detail here, but do a little shopping and then poke around the forums for the different PVR apps to see which ones will work best for your needs. In our box, we're using the simple and cheap Hauppauge HVR-1250. It isn't the most feature-filled around, but it works well for watching and recording simple over-the-air signals (though it can only do one at a time). Once you've bought your TV tuner, install it into your computer and be sure to download the latest drivers before you continue.

Step Two: Install Your PVR Backend

You'll need two different pieces of software to run your PVR: a backend and a frontend. In this case, our frontend—the program from which we watch live TV and control our recordings—is going to be XBMC via an add-on. The backend is the program that actually interfaces with your TV tuner, decodes the signal, and does the recording. Some backends come with their own frontends built-in, but allow you to use another frontend instead, like XBMC. You have a lot of choices depending on your operating system, but here are the instructions for two of the easier backends around.

Windows Users: NextPVR

For Windows, we recommend NextPVR because it's easy to setup, and comes highly recommended. Here's what you need to do:

  1. Download and install NextPVR. You'll also want to download the latest patch files from here to ensure everything runs smoothly—just drag the files into your NextPVR program files folder.
    How to Watch and Record Live TV on Your XBMC Media Center
  2. Start up NextPVR. Right-click anywhere in the window to access its settings.
  3. In the left-hand sidebar, click on Devices, then select the one you want to use (for example, your ATSC tuner if you're using an antenna, or your QAM tuner if you're using cable). Click the Configure button.
  4. Click Scan and wait for it to find all your channels. When it's done, it'll say "Scan Complete" and you should have a full list of available channels.
  5. Go to "Recording" in the left sidebar and set the folder where you want recordings to be stored. You can also tweak other settings here. We recommend checking the "Background Recording" box as well.
  6. Go to Misc in the sidebar and set your Live TV buffer folder.

That should be everything you need to get started. Head to "Live TV" to try watching TV. If you don't get any picture or sound, you likely need to use a different decoder to get things working well.

How to Watch and Record Live TV on Your XBMC Media CenterTo change your decoder, open up NextPVR's settings and go to "Decoders." The decoders you want to worry about will depend on your device. For example, my HVR-1250 uses MPEG-2 and AAC to stream and record TV, so the MPEG-2 and AAC codecs are the ones I needed to change. You may find other codecs in the respective dropdown menus on this settings pane, but if you don't (or if none of the available ones work well), you'll need to download a new one and try it out.

This is the more arduous part of the process. Different codecs are going to work well for different people, so you'll have to experiment. A good place to start would be the SAF codec pack for NextPVR, though you can install and try other codecs too (check the NextPVR forums for suggestions based on your equipment). Keep trying different codecs until you find one that gets you the picture quality, smoothness, and sound that you want, and then continue to step three.

Linux Users: Tvheadend

Tvheadend is a simple backend for Linux that is very easy to install, and can be managed from a web interface—which means you can manage your recordings from any computer in the house, without even entering XBMC. Here's how to install it on an Ubuntu-based system:

  1. Run the following three commands, one after the other, to install Tvheadend:
    sudo add-apt-repostory ppa:adamsutton/tvheadend
    sudo apt-get update
    sudo apt-get install tvheadend
  2. As Tvheadend installs, it will prompt you to create a username and password for its web interface (which you'll use to manage the program). Create one as instructed and continue the installation.
    How to Watch and Record Live TV on Your XBMC Media Center
  3. When it's done, open up your browser and head to http://localhost:9981. Alternatively, you can access it from another computer by heading to http://192.168.0.11:9981 (where 192.168.0.11 is the IP address of the machine on which Tvheadend is installed). Enter your username and password when prompted.
  4. You should be greeted with the Tvheadend web interface. First, click the Configuration tab, then click the TV Adapters tab under that. From the dropdown menu on the left, pick your TV tuner.
    How to Watch and Record Live TV on Your XBMC Media Center
  5. Click the "Add DVB Network by Location" button. Choose your location and the type of signal you're looking for. For example, if you're hooked up to an over-the-air antenna, you would choose the ATSC option, and if you have cable, try the Cable Standard option.
  6. Click the "Add DVB Network" button on the left to continue. Now, look to the box on the right. At the bottom, you should see a line that says "Muxes Awaiting Initial Scan." This will slowly drop to 0 as it scans channels. When it finds channels, the number under "Services" will increase.
  7. When "Muxes Awaiting Initial Scan" reaches 0, you should have a number of Services scanned and ready to go (if not, try a different signal type or make sure your tuner is working). Click "Map DVB Services to Channels" to finish the channel scanning process.

Tvheadend doesn't have its own frontend for watching TV like many backends do, so to test if your setup worked, you'll have to continue to step 3 and try it out in XBMC.

All Users: Experiment

We've picked these two options because they make good choices for beginners due to their easy setup. However, every backend program is different, and there's very little consensus over which is "best" or even the most stable (just search for any two backends on the XBMC forums and you'll find much debate). So, if you don't like the first one you try, download another one and see if it works better for you. It's a long process of trial and error, but the more you experiment, the more likely you are to find something that works for you.

Step Three: Set Up XBMC's PVR Add-On

Once you've ensured your backend is running correctly, it's time to integrate it with XBMC. This step is pretty easy. Make sure you're running the latest version of XBMC (known as 12, or "Frodo"), and then:

How to Watch and Record Live TV on Your XBMC Media Center

  1. Open up XBMC and head to Settings > Add-Ons > Disabled Add-Ons. Head to PVR Clients, and select the one for your program (in this case, either NextPVR or Tvheadend). Choose Enable.
  2. Next, go to Configure. Most of the default settings should work fine here, but if your backend has a username or password, type those in now. If your backend supports Timeshifting (rewinding or pausing live TV), enable it under the "Advanced" tab.
  3. Go back to XBMC's Settings and choose Live TV. Under General, check the Enabled box, and tweak any other settings you want here. I generally like to go to Playback and uncheck Start Playback Minimized.
  4. If you go back to the main menu, you should see a new section called "Live TV" where you can watch shows, see an episode guide, and set up recordings. Congratulations! You've got XBMC working as a PVR.

You may still have to do some experimentation here to find out the settings that work best for your specific hardware and software, but for the most part, you should be good to go. Try watching or recording a show from XBMC, tweak your episode list from the Live TV settings, and enjoy.

Going Further

This is a pretty basic setup, but you can do a lot more with your PVR once you get it set up, such as:

How to Watch and Record Live TV on Your XBMC Media CenterFind a Better Programming Guide: The electronic programming guide (or EPG for short) you start with is probably pretty lacking at this stage. The best way to improve it is by setting up an EPG grabber, which will download a high quality episode guide and save it as an XMLTV file to which you can point your backend. Schedules Direct comes very highly recommended, and is only $25 a year (well worth the price), but what you use will depend on your country. Check out NextPVR's EPG section in the wiki for more info, and if you're using Tvheadend, poke around the forums for more information on how to set up an episode guide.

Skip and Remove Commercials: You may also want to download a program like Comskip that automatically finds and skips commercials for you. Check out this page on the NextPVR wiki or this page on Tvheadend's wiki for more information on how to set that up. You can even set it up to remove commercials from your video files altogether.

Again, this is just the beginning. There are a lot of cool things you can do with your DIY PVR, so once you're all set up, check out the XBMC forums (as well as the forums for your respective backend) for more ideas and support. But for now, kick back with a cold one and enjoy some live TV. You've earned it.

Click to view Number of comments

No comments: