random findings by wt8008
RSS icon Home icon
  • MythTV and XBMC Integration

    Posted on May 28th, 2012 wt8008 No comments

    MythTV’s main purpose is to function as a DVR. XBMC’s purpose is geared towards functioning as a media player—to interface the TV with all media stored on the computer, network, or even the internet. Both are designed with a 10-foot user interface for an HDTV, but XBMC’s interface is more polished. XBMC is cross-platform and is officially available for Linux, Windows, and OSX/ATV.

    XBMC has the basic photo, music, and video viewer just like MythTV, but XBMC’s strength is in its add-on capability. Add-ons extend the functionality of XBMC. Many add-ons reformat website data online and display it directly in XBMC. Examples of add-ons are YouTube, Hulu, Netflix, and podcasts networks. It is also useful for bringing internet-only content to the TV. Official add-ons can be directly downloaded within XBMC. The large XBMC community also provides unofficial add-ons, these add-ons can be found on the XBMC forums. One unofficial add-on is xbmc-addons-chinese, which provides an interface to Chinese websites with flash video and live streaming TV channels. There are also add-ons for other international communities. Some add-ons are platform dependent, if they relay on external supporting applications.

    An official add-on is MythBox which provides can access a MythTV backend. It can replace the main features MythTV’s frontend for watching videos and recordings. Watching live TV is also available, but the interface for changing channels is clunky requiring the on-screen tv guide.

    MythTV Integration

    Currently, I use a combined MythTV frontend/backend setup with Mythwelcome to automatically turn on and off my HTPC for recordings. I am also using LIRC with a remote control.

    A simple way to integrate XBMC into such a setup is to allow the user to launch XBMC directly from the frontend. You can add an XBMC menu entry in MythTV’s menu xml file.

    I am using the media center menu theme, so the corresponding menu xml file is located in /usr/share/mythtv/themes/mediacentermenu/mainmenu.xml

       <button>
          <type>MENU_XBMC</type>
          <text>XBMC</text>
          <description>Launch XBMC</description>
          <action>EXEC /usr/bin/xbmc</action>
       </button>

    The advantage of launching XBMC from the frontend is that MythTV will stop responding to LIRC commands until XBMC exits. The LIRC daemon will send the key action to both programs, if you were to open them separately.

    LIRC Setup

    To map the LIRC remote commands to XBMC actions, you edit ~/.xbmc/userdata/Lircmap.xml:

         <remote device="LIRC_Remote_Name">
            <title>GUIDE</title>
            <playlist>BACK</playlist>
            <menu>MENU</menu>
            <info>INFO</info>
            <back>EXIT</back>
            <up>UP</up>
            <down>DOWN</down>
            <left>LEFT</left>
            <right>RIGHT</right>
            <select>OK</select>
            <myvideo>A</myvideo>
            <mymusic>B</mymusic>
            <mypictures>C</mypictures>
            <mytv>D</mytv>
            <back>BACK</back>
            <pageplus>CHUP</pageplus>
            <pagedown>CHDOWN</pagedown>
            <play>PLAY</play>
            <pause>PAUSE</pause>
            <FastFoward>FASTFOWARD</FastFoward>
            <Rewind>REWIND</Rewind>
            <Stop>Stop</Stop>
            <one>ONE</one>
            <two>TWO</two>
            <three>THREE</three>
            <four>FOUR</four>
            <five>FIVE</five>
            <six>SIX</six>
            <seven>SEVEN</seven>
            <eight>EIGHT</eight>
            <nine>NINE</nine>
            <zero>ZERO</zero>
            <select>ENTER</select>
            <skipnext>PGUP</skipnext>
            <skipprevious>PGDOWN</skipprevious>
        </remote>
    

    Smartphones can also function as a remote control using an app. XBMC system settings need to be modified to enable access.

    Final Words

    With the XBMC add-ons, you do not need to record some network shows, because they are available directly in XBMC over Hulu, although the streaming quality is not as good as free OTA broadcasts. For some shows like news, the lower bitrate is acceptable. There are multiple add-ons with link to different US and international TV networks and sites. With the wide selection of add-ons, XBMC is a great addition to an HTPC.

    There is a PPA available with instructions for Ubuntu users.