HTPC Guide: Part 4, Set Up Your TV Tuning

By Jeffrey | June 16, 2008


After a very long absence, this guide can now continue!

Now that you have MediaPortal up and running - and are probably have become an expert on it - let’s go through how to get one its main features up and running: TV tuning and recording.

One of the advantages of MediaPortal is that it can be quickly set up to tune channels in all the ways one may want to, including OTA (Over The Air) signals, Cable, and Cable/Satellite through their STB (Set Top Box).

Setting up TV channels through an external set top box can be quite complicated to get working, but I’ll walk you through both options.

We’re going to be doing almost all of this through MediaPortal’s Configuration, so open that up and click on Television.

Decoding Options

The first thing we’ll need to do is set up how the signal’s video and audio will be decoded. You have many options, but if you’ll be watching interlaced video - which you will if your signal is being captured through S-Video or Composite, or through a non-digital tuner - you’ll most likely want to use these options to avoid having a headache-inducing blurry image:

MPEG-2 Video decoder: DScaler Mpeg2 Video Decoder - this is by far the best at de-interlacing video. The image quality won’t be quite as sharp as the ffdshow decoder, but the image won’t be blurry, which is much more important.
Audio decoder: MPA Decoder Filter - I actually use this option for all the audio output options in MediaPortal because it lets me output directly through a digital output without doing any audio processing. However, even if you aren’t using an external receiver for your sound I’d still recommend this option.
Deinterlace mode: Best - Self-explanatory, right?
Default zoom mode: Stretch - If you’re getting any non-HD signal then it most likely will be in 4:3, so we’ll want to stretch it to 16:9, which is the resolution of most widescreen televisions.

I also have Timeshifting set to automatically turn on when entering My TV and the Turn on TV box checked on the bottom right. This will create a slight delay when entering TV in MediaPortal, but will be the most seamless for viewing and recording the signal.

The other options are up to your preference. Here’s what mine look like:

Adding A Tuner Card For Over-The-Air/Cable Signals

You’ll need to add your tuner card to MediaPortal in order to use it, so click the plus sign next to Television and click on Capture Cards.

You can see that I’ve already added mine:

To add yours, click the Add button. A window with your tuner card will appear.

If you’re using an analog tuner card then the Frame size and Frame rate options will probably not be available to you.

You’ll want to make sure the Use this card viewing TV and Use this card for recording TV boxes are checked. You’ll also want to choose a directory to store your TV recordings. Don’t worry about the Crop settings although you might need to adjust those later.

Once that is set up you can move on to the Autotune tab. If you’re getting your signal via a STB and/or through the S-Video/Composite jacks on your tuner card then you should skip the Autotune options. This page is for those who are getting their signal OTA or through a cable jack.

First off, under TV Tuner select your country and the Input Source of your TV signal (Antenna or Cable), then click Scan. This will take a bit as MediaPortal tunes the card to every channel and detects whether a signal is being received. After it is finished all your channels will be available.

You can most likely skip the remaining tabs, unless you will be tuning radio or wanting to adjust the quality of your recordings. I prefer the default (best) options on those tabs, but that’s up to you.

Now you can click OK and your card will now appear on the Capture Cards window. To change the options on the card at any time simply click Edit and that same window will appear as above.

*Note: You can add more than one card to MediaPortal if you want to use multiple tuners.

Now click on TV Channels in the left box. You can see that all of the channels MediaPortal found appear in this window.

You shouldn’t need to mess with this window now, so move on to Recording in the left box.

If you’re wondering why we are skipping the Program Guide option it’s because I will reference it later. The built-in MediaPortal option is not the best way to get a channel guide, in my opinion. However, if you want to use the built-in guide capability, it makes use of SchedulesDirect, a pay service. The choice is up to you.

In this window you’ll most likely only need to change the options on the first tab (Settings), and the only options you might need to adjust are the Start/Stop recording options.

The default time to start and stop a recording are 5 minutes before, and 5 minutes after, respectively. I feel that is too long, so I have mine set to 1 minute, but you can set it to whatever you’d like. Keep in mind that this will add time and filesize to your recordings.

Finally, move on to the TV Post Processing option in the left box. This is where we’ll set up the video decoder (DScaler, as I mentioned above).

Move down the list in available filters, and double-click on DScaler Mpeg2 Video Decoder to add it to the top box. Don’t click on Filter Properties here as it will crash for some reason.

Finally, click the plus sign next to DirectShow Filter Control in the left box, and click on DScaler Video Decoder.

Change the options to how I have it in this image, as I have found these to work the best.

Now click OK on the main Configuration window to save your options and exit. That’s it! Now you can open MediaPortal and being viewing your channels.

However, the guide will still not be functional, so read on for how to set that up.

Adding A Tuner Card For Satellite/Cable Signal Via Set Top Box

This is by far the most complicated procedure I have done in MediaPortal. I had to figure this out completely on my own - part of the reason I’m writing a guide on it - and mostly by trial and error.

Also, this guide is aimed at North American viewers only, so if you don’t live in that region I apologize, but you’ll have to find another solution.

First things first, here’s what I recommend you get first:

  • Microsoft MCE Remote: I feel it is the best media center remote, anyway, but regardless you’ll need one for how I wrote this guide. You should/may be able to get it work with other remotes, but I can’t verify that.
  • MCE Replacement Plugin 1.0.4.1: Click to download. As its name implies, this plugin will replace MediaPortal’s native support for the MCE Remote with this far better one.
  • MSN XMLTV Scraper 0.63: Click to download. Coded by drlava, this will take the place of MediaPortal’s internal TV Guide capability, which uses the pay service SchedulesDirect, with this free alternative. But more than that, you’ll need it to properly set up your external set top box, and get a guide for your channels.

Before we get started, make sure you have added your tuner card to MediaPortal (read the above portion on that), but don’t Autotune it. You wouldn’t receive any channels anyway, as you’ll need to have your Cable/Satellite Set Top Box (hereafter referred to as STB) connected to your tuner card through the S-Video or Composite jack.

You’ll want to set up your Video and Audio decoding options the same as above, as well.

Also, you’ll need to attach the IR Blasters that came with your MCE Remote to the front of the IR Port on your STB.

I am using the DirecTV D11 STB. Here is what mine looks like, with the IR Blaster attached and the S-Video/Audio cables coming from the back.

Your tuner card should have comparable jacks on the back of it for the proper cables.

Now extract the MCE Replacement Plugin file you downloaded and install it. It will place the proper files where they need to be in your MediaPortal directory.

Finally, extract the MSN XMLTV Scraper file you downloaded. You’ll want to place the files in the xmltv directory in your MediaPortal directory. My folder structure looks like this:

Open up the MSN_XMLTV_scraper_V.63.exe file.

Just so you know, you’ll only need to go through the following options manually one time to set up your channels and guide, after that it will be automatically taken care of. So don’t be dissuaded by the tedious process.

The first time you open the program you’ll be greeted with a blank window.

Put your zip code in the box on the left side, then click Get Providers. All the television providers in your area will now be displayed. Click the check mark next to yours and a tab with that provider will appear on the top. Click on that tab, then go through and select all the channels that you have access to.

This can be a laborious process if you don’t already know what channels you receive. If you don’t, go to your TV and tune each channel one by one and write down its channel number. It’s a tedious process, but the simplest way to find out.

After you have selected all of your channels you need to decide how many days you want channel data for. I have found that it can cause problems to select anything more than 3 days, but you can experiment with it. I would leave Get detailed data selected on 3 days (the max option).

Now go back to the Control tab and click Download Listings. This will take a few minutes if you have a lot of channels. It will take a shorter amount of time from now on after the first scan.

Once it is finished you can close the program. Now open up a Command Prompt and navigate to the xmltv folder - you placed the files there, remember? - and type in this command:

MSN_XMLTV_scraper_V.63.exe /c /d

This will download your TV listings and combine the channel number with the station name. For example, instead of just listing the channel as “NBC”, it will be “5 NBC”, or whatever the channel number is. This is important for using the guide with MediaPortal.

Now you can close Command Prompt and go back to your xmltv folder. There will be an XML file named the same as your provider. For example, mine is named: DIRECTV Salt Lake City(B)DITV770- XMLOut.xml.

Rename that file to TVGuide.xml.

Now open up MediaPortal and click on Plugins on the bottom left side. Scroll through your plugins and make sure the MCE Replacement plugin is activated.

Right click on it and click on Configuration. You’ll want your main options window set up like this:

Click on Configure in the bottom-center and make sure each option tab looks like this:

Now click OK to save and close that window.

Now we need to “teach” your MCE Remote to act like your Cable/Satellite STB remote (which uses the IR Blasters that came with your MCE Remote, so that is why they are important). So click on the IR Commands tab on the top.

You’ll need to add in all of the buttons you want your MCE Remote to control. I have added the Number buttons, as well as the Channel Up/Down buttons and the Select button. Those are the main controls you’ll need to change channels on your STB. However, you can map any MCE Remote button to any button on your STB remote.

To add a command, click on New. I’ll be using the “0″ button as an example. So, type in a name for the command (for example, “0″ for the 0 button), then click on Learn.

Now hold your STB remote in front of your IR receiver, which looks like this:

and press the 0 button. You may have to hold it close to the IR receiver and press it a few times to get it recognized. It will tell you when it has recognized the button, like in this image:

Now click OK and it will add it to the IR Commands window. Repeat this for every button on the remote you want to map. My window looks like this:

Once you have that finished, click on the External Channels button on the bottom. This window will appear:

You can see that the Number and Select buttons are available to map. For each one, click on the command, then in the drop down box on the bottom select which button you just mapped fits which command. For example, click on Digit 0, then in the drop down box select Blast: 0, then click Set. Repeat this for each of the commands.

Once you have finished, to make sure it works type in a channel number in the bottom right, and click Test. You should see the IR Blaster you attached to your STB flash with each command being sent, and it should change the receiver to the channel you selected. If not, go through these steps and make sure you followed them correctly.

Now click on OK to save and close the window. Then click OK on the main MCE Replacement Plugin window to save and close that, too. You should now be back at your Plugins window in MediaPortal Configuration.

We’re almost done, don’t worry.

Now click the plus sign next to the Television option. Click on TV Channels. You should have a blank channel listing on the right side. Now click on the Import from TV Guide button on the lower right.

This is one of the reasons it’s important to have the MSN XMLTV Scraper in the xmltv folder, as MediaPortal looks there for the TVGuide.xml file.

All of your channels should now appear!

Now for the final, and worst, tedious process. MediaPortal can’t scan the channels of an external set top box, because the tuner card is not receiving a normal TV signal over the S-Video/Composite cable, but just a plain video cable.

So to get MediaPortal to be able to control your STB you’ll need to set up each channel to point to an external receiver. Here’s how:

Click on a channel, then click Edit, click the last tab - External - in the window that comes up, change Type to Received by external settop box, change the Input to the input that your tuner card is receiving (mine is S-Video, so SVHS), then the channel number for that channel. Here’s what the window looks like:

That’s all you need to change for each channel, so click OK to save the change. In the TV Channels window you should see the channel change to something like 250000/#, where # is the channel number for that channel.

You’ll need to do that for each channel. When you’re finished your window should look something like this:

Hooray - you’re finished! You can now click OK to close MediaPortal Configuration, open MediaPortal, go to TV, and everything should be working, including the guide!

Updating The Guide & Keeping It Updated

Now for the final portion of this longer-than-I-thought section of the guide.

If you read through the section above you can see where I described how to update your channel guide using the MSN XMLTV Scraper utility, which is free, and simple.

Although I included it in my section on getting external set top boxes to work with MediaPortal, the scraper will also work fine for other TV signals, including Cable and Over The Air signals. Just set it up similar to how I described above, and it should work fine for you.

But to keep it updated I have coded a simple batch file that I have run at startup that updates the guide, renames it properly, and updates MediaPortal with it.

You can download my Scraper batch file by clicking here.

To set it up for your system, open the batch file tvguide.bat by right-clicking on it and choosing Edit and changing rename “DIRECTV Salt Lake City(B)DITV770- XMLOut.xml” TVGuide.xml to rename “Your provider file.xml” TVGuide.xml.

Then change the TVGuide Update shortcut I included by right-clicking on it and choosing Properties and change the Target and Start In options to whatever your path to the xmltv folder is.

Now copy that shortcut to the Startup folder in your Start Menu.

Now the Scraper program will update every time you start up Windows, and sync it with MediaPortal automatically.

Just so you’re aware, the channel information the Scraper gets must match with the channel information in MediaPortal or MediaPortal won’t make use of the guide. So if your channel in the guide is named “2 (KUTV) CBS” (without the quotes) then it must be named the same in your TV Channels listing in MediaPortal Configuration.

You can easily change the name of your channels in MediaPortal Configuration by clicking on the channel, then Edit, and changing the name that appears on the first tab of the window that appears.

How It Looks

Video If It In Action

That’s It!

If you have any questions, and I’m sure you will as this is the most complicated section of the guide, feel free to comment below or e-mail me at:

In the meantime, you can skip on over to the next section of the guide: Upscaling Your DVD Movies In Professional Quality

Topics: Guides |

4 Responses to “HTPC Guide: Part 4, Set Up Your TV Tuning”

  1. [...] on to Part 4 where I show you how to set up your TV tuning with MediaPortal (including external set top boxes), followed by Part 5 showing you how to use [...]

    Posted by: Building A Home Theater PC (HTPC) - Part 3 at SavvyGeek on June 16th, 2008 at 3:09 pm
  2. How would you suggest I set up my HTPC for recording other inputs, for example, recording from a VCR player, Wii, or Xbox? And, preferably be able to record on this input line without interrupting a TV recording.

    Posted by: Bryan Schmidt on June 19th, 2008 at 11:59 am
  3. Bryan,

    If you wanted to record that input, any TV card should be able to suffice through the video input, since that’s really the signal that TV cards record. So, for example, you’d plug the Video and Audio cables from your Wii into the TV card instead of your TV, and then “tune” the TV card to the Video input and record.

    If you wanted to be able to record TV input at the same time you’d need either a dual-tuner card or 2 separate cards since they can only record one signal at a time.

    Hope this helps!

    Posted by: Jeffrey on June 22nd, 2008 at 4:48 pm
  4. [...] so you’ve got your television channels working in MediaPortal, but you’re not always wanting to watch the latest episode of Fresh Prince so you pop in a [...]

    Posted by: HTPC Guide: Part 5, Upscaling DVD Video at SavvyGeek on June 27th, 2008 at 12:18 pm


Comments