Jan 192010
 

UPDATE 2010-12-27: The latest version of MythTV (0.24) will not work with the instructions in this article. If you want to use XBMC’s builtin myth:// protocol support, you have to stay with MythTV .23. The XBMC devs are working on making XBMC a generic frontend to as many backend DVRs as possible (including MythTV – more info here) so there is hope for the future. In the meantime, you have a couple of different options. You can use Mythbox plugin for XBMC. If you’re on MythTV .24, make sure you get the latest development build, as the stable release only supports the .23 protocol. Run this from linux to get the latest code:

# hg clone https://mythbox.googlecode.com/hg/ mythbox

The other option is to have your XBMC play the recorded files directly, over a drive share. Assuming you’re using a hardware capture card, the files are already in mpeg format, which XBMC can play just fine. They are just named strangely. Read the guide at http://www.mythtv.org/wiki/Mythlink.pl to learn how to make nicely named symlinks directly to your recorded files so that you can browse them in XBMC and play them.


XBMC (formerly the Xbox Media Center) is an amazing cross-platform application for all your media viewing needs. At it’s base, it’s a program to watch video files and dvds, play mp3s, and view pictures. With the plugins and addons from the community, you can stream YouTube, listen to internet radio, sing karaoke, watch TED talks, and much, much more. There is even progress being made on XBMC being a ‘standard’ frontend for a number of different DVR systems. One of those systems is MythTV. XBMC has native MythTV support, which means that, out of the box, XBMC can connect to your MythTV server, view your list of recorded programs, and play them. You can also delete recordings, browse the program guide, and watch live TV (although that feature is pretty experimental). However, as good as XBMC is, configuring it correctly to make it the best it can be for MythTV support can be a little tricky. Here are the steps I have taken to make my XBMC install good enough to score high on the Wife Acceptance Factor.

This howto assumes you have:

  • A working MythTV backend system
  • You’ve configured a MythTV frontend before, preferably on a box different from your backend. This isn’t required, but if you’ve made this work, then your MythTV database is setup correctly to accept remote connections.
  • A box that’s ready to be your MythTV frontend. This howto will assume this is a Windows box, but these instructions work the same for Mac/Linux/XBOX.

Short Version (tl;dr):

  • Install the latest XBMC from xbmc.org. As of this writing, the latest release for Windows is 9.11. Or, if you’re really brave, grab the latest SVN snapshot. NOTE: there is a MythTV-specific bug in version 9.11: if you’re watching a recording that is longer than one hour, after the first hour the skip forward and skip backward will work very intermittently, if at all. This has been fixed in subversion. So if you really need this, use a nightly build.
  • Configure XBMC to hit your MythTV backend, and verify this works
  • Modify the XBMC skin to show the plots of recorded shows
  • Optional: configure a Streamzap remote to work under Windows

Long Version:

Here is my setup:

  • MythTV server running version .21 (yes I know I need to upgrade) on Fedora 8 (again, I know I need to upgrade). IP address is 10.0.0.1 and fully qualified domain name is fileserv.haederfamily.org. It’s a home-built AMD Athlon XP 2400+ with 512MB RAM and 2TB of disk.
  • Frontend system is a MiniITX-based system running Windows XP Pro SP3. This is connected to my 100MB switched home network.

After you successfully install XBMC, run the program to see the default startup screen. The latest versions of XBMC use the skin ‘Confluence’ as the default, so we’re assuming that’s the case here. Other skins work as well, but the modification you need to see the recorded show plot is different depending upon the skin layout.

Go into the Videos section and select ‘Add Source’ from the menu. Hit enter on the name (where is says <None>) and type this:

myth://username:password@10.0.0.1/

where ‘username’ is the username you use to connect to your MythTV mysql database and ‘password’ is the password. If you didn’t change anything from the default MythTV install, this is probably ‘mythtv’ and ‘mythtv’. Hit enter here, and arrow down ‘Enter a name for this media source’. Name it ‘MythTV’ and click ‘OK’. You should now see a ‘MythTV’ in your video sources. Highlight that and hit enter, and if all goes well, you should see a screen like this:

And when you select ‘TV Shows’ it should look something like this:

and when you click “America’s Funniest Home Videos” hopefully you’ll see a list of recorded episodes:

Select an episode, hit enter, and it should start playing.

If it doesn’t, and you get some sort of a popup XBMC-style error, then odds are you have a DNS problem. This plagued me the first time I set this up. In your MythTV server settings, you have to identify the fully qualified domain name of your MythTV server. When you first setup MythTV, this is set to ‘localhost’. You MUST change this in order to get any kind of a MythTV frontend to work on your network. Once you have this set, you need to make sure that the fully qualified domain name for your MythTV server resolves to the correct IP address when you query it from your frontend. So, in my example, I need to make sure that when I ping ‘fileserv.haederfamily.org’ from my Windows XP frontend, it resolves to ’10.0.0.1′. If this is not the case, you must correct your DNS or add entries to your host file in order for this to work. You can’t go any further until you do this.

Once you’re in a position where you can watch recorded episodes, you only have 2 steps left: change the skin so the plots of recorded shows are displayed, and possibly setup a StreamZap remote.

The MythTV native support for XBMC works very well, but it is lacking some functionality compared to the full-blown MythTV linux frontend. One thing you might notice initially is that when you highlight a recorded episode, you don’t see any plot or episode information. Don’t blame XBMC support; the fault lies with the skin. The plot information for recordings is available through the XBMC MythTV interface, but the skin has to display that data somewhere. It seems that none of the skins available for XBMC (at least not the ones that ship with the ‘official’ release) display this data anywhere. This is a relatively simple fix, and it makes the MythTV experience on XBMC much, much better.

They key lies in the file ViewsFileMode.xml, in the directory XBMC/skin/Confluence/720p. Now, I am not an expert on XMBC skinning, and in fact I got this addition from a posting on the xbmc.org forums. So this works for me, try it, it will probably work for you.

Open up that file in an editor, go to line 163, and insert this block of text:

<!-- plot mod -->
 <control type="textbox">
 <posx>0</posx>
 <posy>10</posy>
 <width>344</width>
 <height>300</height>
 <label>$INFO[ListItem.Plot]</label>
 </control>
<!-- end plot mod -->

The key is the variable $INFO[ListItem.Plot]. This references the ‘Plot’ (or synopsis) or the recorded show. This information is available through the XBMC interface, but the skin does not show it by default. This addition will put the plot information in a 344x300px box in the upper right hand corner of the screen, which seems to be the perfect spot for the Confluence skin. If you don’t want to modify your file, download a copy of mine and replace your ViewsFileMode.xml. REMEMBER: this file gets overwritten everytime you upgrade XBMC, so keep a backup copy!

Once you’ve made this change, restart XBMC and you should see a screen that looks something like this:

And there you go. Plot information for your recordings.

A few questions:

  • Why isn’t this in a skin somewhere by default?
  • What other MythTV variables do I have access to? I’d love to show the length of an episode somewhere, or the episode title. I’m sure that’s documented somewhere, but I can’t see to find it.

Ok, now that that part is done, let’s configure a remote control for XBMC. I prefer the StreamZap remote, which is a remote designed for PCs. The IR receiver has a USB interface, and it works great with Windows and Linux (through LIRC, specifically the lirc_streamzap kernel module). Under Windows, the StreamZap software is responsible for handling keypresses and actions for an application. However, currently the StreamZap software does not ‘natively’ support  XBMC. The basic keys work (arrow keys, OK key, power key) but not much else. In order to really get the StreamZap to work effectively, you need to use a free application called EventGhost. EventGhost will recognize the StreamZap keypresses, and will pass the appropriate command along to XBMC. Rather than walking you through screen shots of how to configure EventGhost, you can just download my EventGhost config file for StreamZap and XBMC. Install EventGhost, run it, select File -> Open, and open my StreamZap.xml file. Then fire up XBMC and try your remote. It should work like a charm!

Note that the default software that comes with the Streamzap Remote will interfere with EventGhost! Make sure you stop that software, remove it from your PC’s startup settings, and then run EventGhost.

Please leave me feedback on if this worked for you, and any other tips or tricks you have regarding XBMC and MythTV.

  22 Responses to “How to configure XBMC as a MythTV frontend”

  1.  

    Great Article Adam. I've hit that DNS issue. I'm confused about the fully qualified domain though. Exactly where in the backend did you set it?

    •  

      Hi Peter. When you're running mythfrontend, go to Setup -> General. You'll see the area to put your hostname here. If your frontend and backend are the same system, this can be localhost. However, to get a frontend running on a different box, you need to make this a fully qualified domain name. See the reference here: http://www.mythtv.org/wiki/User_Manual:Detailed_configuration_Frontend#General

      Good luck!

      •  

        Hello Adam,
        Thank you for the article and the instructions.
        I followed your instructions and everything work just fine.
        I can see all my recordings using xbmc.
        But I would like to download mythtv recordings directly to my xbmc library so that I can watch on my vista laptop even if I'm connected to the internet.
        Can you help me and tell me how to do that ?
        Thanks,
        chris

        •  

          Hi Chris

          In order to watch your recordings on your laptop when you're not on the network, you'll have to copy over the recorded file and store it on your laptop hard drive. I have this section in my /etc/samba/smb.conf file:

          [recordings]
          comment = Recordings
          path = /recordings
          writable = no

          I can then go to a windows box on my home network and browse to \\mythtvserver\recordings and I see all the recorded show files. They are named cryptically; you might want to look at the program 'mythlink.pl' (should be in the directory /usr/share/doc/mythtv-docs-0.24/contrib/user_jobs/ on your mythbox). It will create human-readable symbolic links in a directory of your choice that symlink back to the actual recordings in your /recordings directory. So if you created those symlinks in, say, the directory /recordings_by_name, then you could share out /recordings_by_name through samba and access the files through that share from your windows devices (since samba will follow symlinks by default).

          Once you can access the files remotely, copy over whatever files you want to a directory on your laptop, then tell xbmc on your laptop that you have videos in that directory and you want it to scan them into the library. As long as the naming convention of the video files matches what you'd find on thetvdb.com (which is where xbmc gets it's lookup information) the recordings should be successfully imported into your xbmc library. The format I use looks like this and works fine:

          community_02x21_paradigms_of_human_memory.avi

          For the show 'Community', season 02, episode 21.

          Or, worst case scenario, you just go to the 'file browser' option in xbmc, browse to the video files, and play them directly from there.

          Good luck!

  2.  

    Great article. Really enjoyed reading it as I am setting up my mediapc box to do the same. Many would appreciate the screenshots you have.

    What happens when you hit the Guide?
    I get a list of the channels, but selecting a channel locks up xbmc and makes it crash. Is it because there is too much information to load? I am running mythbackend and xbmc on the same machine.

    It would also be nice to modify the Aeon skin in xbmc to display the plot information for tv shows.

    Thanks again for the post.

    •  

      Honestly, I never use the guide or the live tv portion of xbmc. I understand that’s it’s very new and probably pretty buggy. My advice for you would be to try some of the nightly builds, I imagine that’s where a lot of the development is taking place right now.

      I’ll take a look at the Aeon skin and see what it would take to make that same modification. I also modded the PMIII skin, I’ll post that here as well.

  3.  

    Honestly, I never use the guide or the live tv portion of xbmc. I understand that's it's very new and probably pretty buggy. My advice for you would be to try some of the nightly builds, I imagine that's where a lot of the development is taking place right now.

    I'll take a look at the Aeon skin and see what it would take to make that same modification. I also modded the PMIII skin, I'll post that here as well.

  4.  

    Hi Adam,

    I think I'm also stuck on the FQDN dns entry issue, I have a mythtv frontend that works fine when playing livetv from my backend machine.
    But I get nothing but a hung XBMC when starting live tv, from that same frontend machine using xbmc.
    Does an entry for myth://username:password@10.1.1.3/ need to be
    myth://username:password@mythbackend/
    with an host entry of 10.1.1.3 mythbackend.
    both are from linux boxes and confused as the fully qualified domain part.
    Where in your mythbackend/frontend does the fqdn get set?

    Thanks if you can clear this up.
    Cheers
    Geoff

  5.  

    Geoff, I too have the hanging XBMC issue (my backend and frontend are on the same machine so there is no host problem).

  6.  

    [...] a bit more involved to get set up, using XBMC as a front end to your MythTV installation might be a solid option. By adding your MythTV as one of the XBMC sources, you have a [...]

  7.  

    Thanks!
    You solved my problem (had a myth-tv back-end and a new xtreamer ultra running xbmc) in less than 60 seconds...

  8.  

    I like XBMC (Mythtv client) with my Raspberry pi (running raspbmc). My wife is actually using this to watch live tv, with a Windows remote. Question: Is there a way to bring up the guide while watching a live channel (in order to switch)? Pressing GUIDE button doesn't work, and pressing windows button to bring up menu (like it does in other mythtv frontends) don't work.

    Any ideas or suggestions would be greatly appreciated...

    Murray

  9.  

    These cushions have become a rage among people because of the beautifying feature that has the power to enliven any boring and dull room.

    When you sit on it, the cushion nicely contours to
    your body, creating one relaxing ride. They are easy to transport and you can easily store them by stacking them.

  10.  

    Exercising: Stringent and laborious exercising is over blown by many diet programs
    today. While some carbs should be avoided the truth is we have a fat
    burning furnace to fuel and the right carbs are the primary energy source for
    this furnace. but pickles are the best for satisfying
    late night cravings.

  11.  

    Hi there, I read your blog like every week. Your
    humoristic style is awesome, keep up the good work!

  12.  

    When training with the best workout routine to gain muscle, it's important to
    have well hydrated cells. Having a good attitude about
    the process is important. Pick one to focus on and stay committed to working on it
    regularly.

  13.  

    If you can handle a quality point-and-shoot camera, and know
    how to tweak its settings to take nice pictures, you are in demand.
    This question is often problematic for most to answer
    honestly, because the obvious answer is individual
    satisfaction. If you decide to change your current landscape on your own, you will receive some benefits that hadn't thought of.

  14.  

    But this isn't true, particularly with green carpet cleaning methods such as hot water
    extraction. For example, before being eligible
    to earn the RCT (Rug Cleaning Technician), the professional must first obtain a CCT or CMT as well as the UFT.
    Dusting has to be done well and very carefully particularly for plush carpets.

  15.  

    I am not sure where you're getting your info, but great topic. I needs to spend some time learning more or understanding more. Thanks for wonderful information I was looking for this information for my mission.

  16.  

    This post is very informative but it took me a long time to
    find it in google. I found it on 14 spot, you should
    focus on quality backlinks building, it will help you to increase
    traffic. And i know how to help you, just search in google
    - k2 seo tips

  17.  

    This article is really a fastidious one it assists new
    net users, who are wishing in favor of blogging.

  18.  

    Hi everyone, it's my firdst visit at this site,
    and post is iin fact fruitful designed for me, keep up postting thewe types
    of articles or reviews.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>