Difference between revisions of "Xbox Frontend"

From MythTV Official Wiki
Jump to: navigation, search
(Other configuration issues/notes)
m (Installing the MythTV front end: remove dead link)
 
(47 intermediate revisions by 22 users not shown)
Line 1: Line 1:
An Xbox makes a wonderful standard definition MythTV front end due to its reasonably powerful CPU and graphics subsystem.  The menus within MythTV aren't exactly snappy but it's good for the price. Sadly, the Xbox cannot handle decoding HDTV resolution (the CPU isn't ''that'' powerful).
+
{{Warning box|The original Xbox does not have sufficient memory, processor, or graphics performance to make a worthwhile MythTV frontend.}}
 +
 
 +
An Xbox makes an adequate standard definition MythTV front end.  The menus within MythTV aren't exactly snappy but it's good for the price. Sadly, the Xbox cannot handle decoding HDTV resolution (the CPU isn't very powerful).
  
 
== Running Mythfrontend on Linux ==
 
== Running Mythfrontend on Linux ==
Line 11: Line 13:
 
# Install MythTV on Xebian stable (sarge) with pre-compiled binaries - see the [[Xbox_Frontend_on_Xebian_stable]] for more information.
 
# Install MythTV on Xebian stable (sarge) with pre-compiled binaries - see the [[Xbox_Frontend_on_Xebian_stable]] for more information.
 
# Install MythTV on Xebian unstable (sid) with pre-compiled binaries - see the [http://www.xbox-linux.org/wiki/MythTV_on_Xebian_HOWTO MythTV on Xebian HOWTO] for more information.
 
# Install MythTV on Xebian unstable (sid) with pre-compiled binaries - see the [http://www.xbox-linux.org/wiki/MythTV_on_Xebian_HOWTO MythTV on Xebian HOWTO] for more information.
# [[Xbox_Frontend_Compile_with_Released_Source|Compile MythTV using the released source code]]
+
# Compile MythTV using the released source code
 
# [[Xbox_Frontend_Compile_with_SVN|Compile MythTV using the latest SVN snapshot]]
 
# [[Xbox_Frontend_Compile_with_SVN|Compile MythTV using the latest SVN snapshot]]
# [[Xbox Install using E Images]] - Theory is that you can ftp these files to the E: Drive on the xbox and just boot directly into a mythfrontend ready xebian environment.
 
  
 
=== Configuring the MythTV front end ===
 
=== Configuring the MythTV front end ===
  
Section for Configure the Xbox MythTV to talk to the MythTV Backend
+
Section for Configuring the Xbox MythTV to talk to the MythTV Backend
  
 
=== Other configuration issues/notes ===
 
=== Other configuration issues/notes ===
Line 26: Line 27:
 
eg. Overscan
 
eg. Overscan
  
* Had some audio sync issues with MythVideo so I forced mplayer to use alsa. It seemed to do the trick.
 
* To enable mplayer to use lirc be sure to link ~/.mythtv/lircrc to ~/.lircrc. Also you have to add "lirc=yes" to your ~/.mplayer/config file.
 
* To get the pause button to work in MythVideo aka mplayer create a file in ~/.mplayer/ called input.conf. It will let you map out certain keys. A small sample file might look like:
 
 
<pre>
 
RIGHT seek +30
 
LEFT seek -15
 
PGUP seek -600
 
PGDWN seek 600
 
ESC quit
 
p pause
 
i osd
 
[ volume -2
 
] volume 2
 
</pre>
 
 
* If you run Hauppage cards or record to mpeg2 don't try picture in picture. The XBox is just too slow.
 
* If you run Hauppage cards or record to mpeg2 don't try picture in picture. The XBox is just too slow.
 
* The XBox is incapable of doing high definition due to lack of processing power and XvMC.
 
* The XBox is incapable of doing high definition due to lack of processing power and XvMC.
 +
* The XBox is incapable of decoding H.264 broadcasts, even in standard definition, due to CPU constraints.
 
* When using the sample startup scripts on the howto's above it seems to startup two mythfrontends which brings the xbox to a halt.
 
* When using the sample startup scripts on the howto's above it seems to startup two mythfrontends which brings the xbox to a halt.
 +
* The ALSA driver has no access to hardware volume controls. You can get around this by following the directions at [[Xbox Sound]]
 +
 +
== Running XBMC with native MythTV Support ==
 +
The [[XBMC]] (XBox Media Center) is an Open Source project (nothing to do with Microsoft!) that is based on MPlayer. It now also has linux and windows editions.
 +
 +
Native support for the MythTV frontend has been added to XBMC starting with revision 11787. The stable 8.10 release has support for mythtv.
 +
 +
{{Download|http://sourceforge.net/projects/xbmc/files/XBMC%20Source%20Code/Camelot%20-%209.11/xbmc-9.11.tar.gz/download|Download for linux and windows}}
 +
{{Download|http://ftp.yi.se/pub/repository/t3ch/STABLE/XBMC-9.04.1-FIXED-T3CH/XBMC-9.04.1-FIXED-BABYLON-T3CH.RAR|Download for XBox}}
 +
 +
SVN builds may or may not work better if you have trouble. Information on acquiring and installing an SVN build of XBMC can be found on the [http://xbmc.org/wiki/?title=Installation_Requirements  XBMC wiki: Installation Requirements]
 +
 +
=== Features ===
 +
* Currently Supported
 +
** Watch Recordings
 +
** Delete Recordings
 +
** Program Schedule
 +
** Watch Live TV
 +
** Choose to record a program while watching Live TV
 +
 +
* Currently Not Supported
 +
** Commercial Skip
 +
** Schedule recordings for future programs
 +
** Edit Recording Schedules
 +
** Group Recordings by program
 +
 +
=== Add MythTV as a Video Source ===
 +
# Once XBMC is installed and running on your Xbox go to "Videos" and select "Add Source"
 +
# In the "Enter the paths or browse for the media locations." field you will need to enter the properly formatted username, password, and IP information for your mythconverg database.  This information should be prefixed with "myth://" and follow standard linux network access formatting of: "username:password@ipaddress".  For example, if your mythbackend is located on a machine whose ip address is 192.168.1.116 and uses the username "mythtv" and the password "password" you should enter the following: <pre>myth://mythtv:password@192.168.1.116</pre>
 +
# Input a name for this source in the "Enter a name for this Media Source" field.  This name is what will appear in the "Videos" list of XBMC.
 +
# Click on "OK" to add this source to the "Videos" list.
 +
 +
Be careful that your machine to be running XBMC can resolve the hostname used by your mythbackend to an IP address; it may be necessary to edit your hosts file (C:\WINDOWS\System32\drivers\etc\hosts and /etc/hosts for Windows and Unix/Linux respectively). If your mythbackend is on a machine named 'foobar'. You with the same IP address as before, you may need to add the following to your hosts file:
 +
 +
<pre>192.168.1.116    foobar</pre>
 +
 +
And for your video source, enter the following: <pre>myth://mythtv:password@foobar</pre>
 +
 +
=== Deleting programs ===
 +
Delete functionality is available but may not be enabled by default.
 +
# From the main menu of XBMC select "Settings"
 +
# In the "xbox media center Configuration" menu select "Appearance" and scroll down to "View Options"
 +
# Highlight and select the "Allow File Renaming and Deletion" check box near the bottom of this menu dialog.
 +
 +
You should now be able to delete recorded programs.  This is done by highlighting the program you want to delete (from within the "Videos" menu), pressing "info" on the xbox remote control and selecting "delete".
 +
 +
=== Development ===
 +
Adding PVR functionality to XBMC was submitted and approved as a 2008 Google [http://code.google.com/soc/2008/ Summer of Code] project.  [http://code.google.com/soc/2008/xbmc/appinfo.html?csaid=1E4D711B81981410 One of the goals] of this SOC project:
 +
:"My proposal is to bring one aspect which until now has been missed in XBMC to fruition: Digital TV playback & recording scheduling facilities, and specifically, implementing control over the popular MythTV backend."
 +
This should bring most if not all of the MythTV frontend functionality to XBMC.  According to the [http://code.google.com/opensource/gsoc/2008/faqs.html#0.1_timeline official timeline], we may see the fruits of these labors sometime in the fall of 2008.
  
== Running XBMC MythTV Frontend ==
+
=== Troubleshooting ===
The [[XBMC]] (XBox Media Center) is an Open Source project (nothing to do with Microsoft!) that is based on MPlayer.
+
The ip address of your xbox must have permission to access the mysql database. For more info, see: [http://www.mythtv.org/docs/mythtv-HOWTO-6.html Modifying access to the MySQL database for multiple systems]
  
The XBMC MythTV frontend is a Python Script that works in a similar fashion to the original Mythfrontend without the overhead of running Linux or XWindows on your xbox.
+
Remember to check the xbmc log if you are having problems.
 +
If you can see the list of channels, but not watch any, and the log mentions connection or resolving problems, you may need to make an advancedsettings.xml file in the UserData folder with the following contents. <pre>
 +
<advancedsettings>
 +
<hosts>
 +
  <entry name="server">192.168.1.251</entry>
 +
</hosts>
 +
<video>
 +
<defaultplayer>mplayer</defaultplayer>
 +
</video>
 +
</advancedsettings></pre>
 +
replace server with your backend hostname, and give the right IP. This applies even when you specified the IP in the myth:// source line, because it seems to fetch the hostname from the db regardless, and if there is no DNS server it won't find the right IP. Changing the player to mplayer is not necessary, but can help if you get freezing.
  
=== Install XBMC ===
+
== Running XBMC MythTV Frontend Python Script==
There are CD Images (somewhere on the net - due to legal reasons) that will boot in a modded xbox and install XBMC. Or you can use Xebian to transfer the XBMC files onto the C:\ and E:\ drives.
+
The XBMC MythTV frontend is a Python Script that works in a similar fashion to the original Mythfrontend without the overhead of running Linux or XWindows on your xbox. However, the release doesn't work with 0.21 or above (though there may be support in CVS), and has been mostly replaced by the native support.
  
 
=== Install XBMC MythTV ===
 
=== Install XBMC MythTV ===
  
Download and install as per the XBMC MythTV readme.txt instructions.
+
Download the latest version from [http://sourceforge.net/projects/xbmcmythtv SourceForge.net] and install as per the included readme.txt instructions.
  
1. Xbmcmythtv requires that you share your mythtvbackend video recording via Samba.
+
1. Xbmcmythtv requires that you share your mythtvbackend video recording via Samba. xbmcmythtv will fail if Samba is not configured properly, or xbmc cannot connect to the Samba share.  If you have authentication turned on, you may have to specify a URL such as this one:
  If Samba is not set up properly and xbmc can not connect to the Samba share  
+
  smb://usersword@host_or_ip/service
  you have shared out the xbmcmythtv will fail.
+
 
  From xbmcmythtv forum:
+
If you are having issues getting xbmcmythtv to work, verify that you can connect to the Samba share from another computer. Also verify the permissions on the directories are set so that any user can get to the recordings directory.
  ...I can't say for sure what the problem is except that maybe your samba share
+
 
  requires a username and password as part of the path.
+
One setting in the smb.conf that is different than the default is in the "global" section. ''Making the following update is not very secure.''  Edit the /etc/smb.conf, or on openSUSE: /etc/samba/smb.conf, file and in the "global" section near the top add the following line:
  Make your prefix something like smb://usersword@host_or_ip/service.
 
  Also, I would test this with XBMC first and then try to get xbmcmythtv working.  
 
  Don't forget to check the permissions of the directories as well...  
 
 
  One setting that I have in smb.conf that is different than the default is in the global section.
 
  Keep in mind this is not considered very secure:  
 
  Edit /etc/smb.conf and add
 
 
   [global]  
 
   [global]  
  security = share  
+
      security = share  
+
This is an example of a definition of a "mythtv" share. Be sure to update the "path" variable to match your recording storage location.
  Here is the definition of my mythtv share:
 
   
 
 
   [mythtv]  
 
   [mythtv]  
  comment = Television  
+
      comment = Television  
  browseable = yes  
+
      browseable = yes  
  path = /var/video  
+
      path = /var/video  
  public = yes  
+
      public = yes  
  read only = yes  
+
      read only = yes  
  writable = no  
+
      writable = no  
+
Assuming the configuration above was used, the file prefix to the shares would be:  
  My file prefix is:  
+
  smb://%h/mythtv  
   
+
... and the live prefix would be:  
  smb://%h/mythtv  
+
  smb://%h/mythtv  
+
This means that the ring buffer files are created in the same directory as the recorded show .nuv files (i.e. /var/video). Also, the myth database populates the host field in various tables so that %h expands correctly. Some people have had problems with this so I sometimes suggest that they just replace it with the IP of the back end server...Gimblefoot  
  My live prefix is:  
+
 
   
+
Restart samba.
  smb://%h/mythtv  
+
openSUSE run:  /etc/init.d/smb restart
 
  This means that the ring buffer files are created in the same directory as the recorded show .nuv files (i.e. /var/video).
 
  Also, the myth database populates the host field in various tables so that %h expands correctly. Some people have had  
 
  problems with this so I sometimes suggest that they just replace it with the IP of the back end server...Gimblefoot  
 
  Restart samba.  
 
 
    
 
    
 
2. Upload the xbmcmythtv directory and everything below it to your XBMC/scripts directory on your xbox.   
 
2. Upload the xbmcmythtv directory and everything below it to your XBMC/scripts directory on your xbox.   
 
So after you have done this, you should have a XBMC/scripts/xbmcmythtv/ dir on your xbox.
 
So after you have done this, you should have a XBMC/scripts/xbmcmythtv/ dir on your xbox.
  
3. Run the mythtvmain.py script and go into the Settings screen to specify your connection details and paths.
+
3. Run the mythtvmain.py script and go into the Settings screen to specify your connection details and paths. (in versions newer than 0.20.31 mythtvmain.py was replaced by default.py)
   Mythtv host: Edit to mythtv backend ip-adresse
+
   Mythtv host: Enter the hostname / ip-address of your mythtv backend
 
   Mythtv port: Use default setting value
 
   Mythtv port: Use default setting value
 
   Mythtv statusport: Use default setting value
 
   Mythtv statusport: Use default setting value
Line 151: Line 184:
 
       -> TO 'mythtv'@'xbox_ip'
 
       -> TO 'mythtv'@'xbox_ip'
 
       -> IDENTIFIED BY 'mythtv';
 
       -> IDENTIFIED BY 'mythtv';
 +
      AND make sure that mysql is accessible on the network:
 +
      comment out skip-networking in /etc/mysql/my.cnf
 +
      (add a # before it so it looks like: #skip-networking)
 
     Mysql password: Use default setting value
 
     Mysql password: Use default setting value
 
     Paths recordedprefix: Change to mythbackend recordings SMB path
 
     Paths recordedprefix: Change to mythbackend recordings SMB path
 
       smb://h%/mythtv/recordings (smb://h%/SMB_share_name/recording_catalog)
 
       smb://h%/mythtv/recordings (smb://h%/SMB_share_name/recording_catalog)
       One of the thinks I have notice with xbmcmythtv is that you must use ip-adresse
+
       One of the things I have noticed with xbmcmythtv is that you may have to use an ip-address
 
       instead of the variable /%h/ in the recordings and the buffer path in the xbmcmythtv settings screen.
 
       instead of the variable /%h/ in the recordings and the buffer path in the xbmcmythtv settings screen.
 
       From xbmcmythtv forum: The usual reason this does not work is if Myth TV  
 
       From xbmcmythtv forum: The usual reason this does not work is if Myth TV  
Line 174: Line 210:
 
         - not using a version of XMBC MythTV that matches the MythTV backend  
 
         - not using a version of XMBC MythTV that matches the MythTV backend  
 
         - not having samba shared recordings/livetv directory  
 
         - not having samba shared recordings/livetv directory  
 +
        - MySql >= 4.1 Client does not support authentication protocol... http://www.digitalpeer.com/id/mysql
 +
  
Optional installation includes adding a shortcut to the popup menu on the main
+
Optional installation includes Replacing a shortcut on the main
 
XBMC screen:
 
XBMC screen:
  
1. Edit the XBMC/skin/Project Mayhem III/pal/DialogSubMenu.xml skin file (this is a XBMC skin file - not one included with these scripts).
+
1. Edit the XBMC/skin/Project Mayhem III/PAL/Home.xml skin file (use XBMC/skin/Project Mayhem III/PAL16X9/Home.xml if you have a widescreen)(this is a XBMC skin file - not one included with these scripts).<BR>
2. Look for a "SubMenu button" that has the visible attribute set to "no".
+
2. Look for a "<description>My Programs normal push button</description>" (or Pictures, Movies, Music, etc).<BR>
3. Edit the control as follows:
+
3. Edit the control as follows:<BR>
    - set the visible attribute to "yes".
 
 
     - set the label attribute to "My TV".
 
     - set the label attribute to "My TV".
     - set the execute attribute "q:\scripts\xbmcmythtv\mythtvmain.py".
+
     - set the onclick attribute "xbmc.runscript(q:\scripts\xbmcmythtv\default.py)".
4. Reboot xbox or reload skin to show the skin change.
+
4. Reboot xbox or reload skin to show the skin change.<BR>
 +
 
 +
A second optional method would be to place it in the scripts popup menu (the little blue arrow next to the shutdown button).
 +
 
 +
1. Go into your scripts<BR>
 +
2. Select the xbmcmythtv script and push the white button<BR>
 +
3. Select add to favorites.<BR>
 +
 
 +
Broken Link -> An excellent article on this can be found here: http://mahune.org/archive/2005/05/07/mythtv-and-xbox/
 +
 
 +
Broken Link -> [http://72.14.253.104/search?q=cache:w_UrIM0ZbTsJ:mahune.org/archive/2005/05/07/mythtv-and-xbox/+site:mahune.org+mythtv+and+xbox&hl=en&gl=us&ct=clnk&cd=1&client=firefox-a Google Cache of Link]
  
An excellent article on this can be found here: http://mahune.org/archive/2005/05/07/mythtv-and-xbox/
+
Working Link -> [http://web.archive.org/web/20060213024149/http://mahune.org/archive/2005/05/07/mythtv-and-xbox/ Wayback Machine Cache]
  
 
Xbmcmythtv forum can you find here: http://sourceforge.net/forum/?group_id=128346
 
Xbmcmythtv forum can you find here: http://sourceforge.net/forum/?group_id=128346
  
 
== Other guides and sources of information ==
 
== Other guides and sources of information ==
[http://www.controlaltdeleted.com/xbox/xbox_tutorials/myth_tv_related_information/how_to_install_mythtv_on_your_xbox.html Installing MythTV with MythTV-Xbox (MXB) Installer by Dennis Cartier - 0.4.5 seems to be for MythTV 0.18 only] (Good reference, but out of date and the install script is not maintained anymore, which means it doesn't work.)
+
[http://www.controlaltdeleted.com/xbox/xbox_tutorials/myth_tv_related_information/how_to_install_mythtv_on_your_xbox.html Installing MythTV with MythTV-Xbox (MXB) Installer] by Dennis Cartier - 0.4.5 seems to be for MythTV 0.18 only  (Good reference, but out of date and the install script is not maintained anymore, which means it doesn't work.)
  
[http://www.mythtv-xbox.org/phpBB2/viewforum.php?f=2 MythTV Xebian Installation Support forum]
+
[http://mythbox.googlecode.com/ MythBox for XBMC]
  
 
[http://sourceforge.net/projects/xbmcmythtv/ XBMC MythTV Script]
 
[http://sourceforge.net/projects/xbmcmythtv/ XBMC MythTV Script]
  
[http://www.xboxmediacenter.com/ XBMC - XBox Media Center]
+
[http://www.xbmc.org/ XBMC - XBox Media Center]
  
[http://mythfrontend.topcities.com/ MythTV / Xebian guide - for 0.18.1 and upgrading to 0.19]
+
[http://www.xbox-linux.org/wiki/MythTV_on_Xebian_HOWTO MythTV / Xebian guide - for 0.18.1 and upgrading to 0.19]
  
[[Category:HOWTO]]
+
[[Category:Platforms]]
 +
[[Category:Distribution_Specific_Install_Guides]]

Latest revision as of 04:32, 26 January 2011

Warning.png Warning: The original Xbox does not have sufficient memory, processor, or graphics performance to make a worthwhile MythTV frontend.

An Xbox makes an adequate standard definition MythTV front end. The menus within MythTV aren't exactly snappy but it's good for the price. Sadly, the Xbox cannot handle decoding HDTV resolution (the CPU isn't very powerful).

Running Mythfrontend on Linux

Install a Linux distribution

MythTV can be installed on an Xbox by installing a Linux distribution on a modded/softmodded Xbox. One distribution that works well is Xebian - see the [1].

For the purposes of this HOWTO, follow the Xebian HOWTO but ignore the sections on digital audio output and Compiling the ALSA kernel-module.

Installing the MythTV front end

There are several options to install the MythTV front end:

  1. Install MythTV on Xebian stable (sarge) with pre-compiled binaries - see the Xbox_Frontend_on_Xebian_stable for more information.
  2. Install MythTV on Xebian unstable (sid) with pre-compiled binaries - see the MythTV on Xebian HOWTO for more information.
  3. Compile MythTV using the released source code
  4. Compile MythTV using the latest SVN snapshot

Configuring the MythTV front end

Section for Configuring the Xbox MythTV to talk to the MythTV Backend

Other configuration issues/notes

Section for other Xbox configuration issues eg. Digital sound eg. Video quality eg. Overscan

  • If you run Hauppage cards or record to mpeg2 don't try picture in picture. The XBox is just too slow.
  • The XBox is incapable of doing high definition due to lack of processing power and XvMC.
  • The XBox is incapable of decoding H.264 broadcasts, even in standard definition, due to CPU constraints.
  • When using the sample startup scripts on the howto's above it seems to startup two mythfrontends which brings the xbox to a halt.
  • The ALSA driver has no access to hardware volume controls. You can get around this by following the directions at Xbox Sound

Running XBMC with native MythTV Support

The XBMC (XBox Media Center) is an Open Source project (nothing to do with Microsoft!) that is based on MPlayer. It now also has linux and windows editions.

Native support for the MythTV frontend has been added to XBMC starting with revision 11787. The stable 8.10 release has support for mythtv.

Download.png - Download for linux and windows

Download.png - Download for XBox

SVN builds may or may not work better if you have trouble. Information on acquiring and installing an SVN build of XBMC can be found on the XBMC wiki: Installation Requirements

Features

  • Currently Supported
    • Watch Recordings
    • Delete Recordings
    • Program Schedule
    • Watch Live TV
    • Choose to record a program while watching Live TV
  • Currently Not Supported
    • Commercial Skip
    • Schedule recordings for future programs
    • Edit Recording Schedules
    • Group Recordings by program

Add MythTV as a Video Source

  1. Once XBMC is installed and running on your Xbox go to "Videos" and select "Add Source"
  2. In the "Enter the paths or browse for the media locations." field you will need to enter the properly formatted username, password, and IP information for your mythconverg database. This information should be prefixed with "myth://" and follow standard linux network access formatting of: "username:password@ipaddress". For example, if your mythbackend is located on a machine whose ip address is 192.168.1.116 and uses the username "mythtv" and the password "password" you should enter the following:
    myth://mythtv:password@192.168.1.116
  3. Input a name for this source in the "Enter a name for this Media Source" field. This name is what will appear in the "Videos" list of XBMC.
  4. Click on "OK" to add this source to the "Videos" list.

Be careful that your machine to be running XBMC can resolve the hostname used by your mythbackend to an IP address; it may be necessary to edit your hosts file (C:\WINDOWS\System32\drivers\etc\hosts and /etc/hosts for Windows and Unix/Linux respectively). If your mythbackend is on a machine named 'foobar'. You with the same IP address as before, you may need to add the following to your hosts file:

192.168.1.116    foobar
And for your video source, enter the following:
myth://mythtv:password@foobar

Deleting programs

Delete functionality is available but may not be enabled by default.

  1. From the main menu of XBMC select "Settings"
  2. In the "xbox media center Configuration" menu select "Appearance" and scroll down to "View Options"
  3. Highlight and select the "Allow File Renaming and Deletion" check box near the bottom of this menu dialog.

You should now be able to delete recorded programs. This is done by highlighting the program you want to delete (from within the "Videos" menu), pressing "info" on the xbox remote control and selecting "delete".

Development

Adding PVR functionality to XBMC was submitted and approved as a 2008 Google Summer of Code project. One of the goals of this SOC project:

"My proposal is to bring one aspect which until now has been missed in XBMC to fruition: Digital TV playback & recording scheduling facilities, and specifically, implementing control over the popular MythTV backend."

This should bring most if not all of the MythTV frontend functionality to XBMC. According to the official timeline, we may see the fruits of these labors sometime in the fall of 2008.

Troubleshooting

The ip address of your xbox must have permission to access the mysql database. For more info, see: Modifying access to the MySQL database for multiple systems

Remember to check the xbmc log if you are having problems.

If you can see the list of channels, but not watch any, and the log mentions connection or resolving problems, you may need to make an advancedsettings.xml file in the UserData folder with the following contents.
<advancedsettings>
<hosts>
  <entry name="server">192.168.1.251</entry>
</hosts>
<video>
 <defaultplayer>mplayer</defaultplayer>
</video>
</advancedsettings>

replace server with your backend hostname, and give the right IP. This applies even when you specified the IP in the myth:// source line, because it seems to fetch the hostname from the db regardless, and if there is no DNS server it won't find the right IP. Changing the player to mplayer is not necessary, but can help if you get freezing.

Running XBMC MythTV Frontend Python Script

The XBMC MythTV frontend is a Python Script that works in a similar fashion to the original Mythfrontend without the overhead of running Linux or XWindows on your xbox. However, the release doesn't work with 0.21 or above (though there may be support in CVS), and has been mostly replaced by the native support.

Install XBMC MythTV

Download the latest version from SourceForge.net and install as per the included readme.txt instructions.

1. Xbmcmythtv requires that you share your mythtvbackend video recording via Samba. xbmcmythtv will fail if Samba is not configured properly, or xbmc cannot connect to the Samba share. If you have authentication turned on, you may have to specify a URL such as this one:

 smb://usersword@host_or_ip/service

If you are having issues getting xbmcmythtv to work, verify that you can connect to the Samba share from another computer. Also verify the permissions on the directories are set so that any user can get to the recordings directory.

One setting in the smb.conf that is different than the default is in the "global" section. Making the following update is not very secure. Edit the /etc/smb.conf, or on openSUSE: /etc/samba/smb.conf, file and in the "global" section near the top add the following line:

  [global] 
      security = share 

This is an example of a definition of a "mythtv" share. Be sure to update the "path" variable to match your recording storage location.

  [mythtv] 
      comment = Television 
      browseable = yes 
      path = /var/video 
      public = yes 
      read only = yes 
      writable = no 

Assuming the configuration above was used, the file prefix to the shares would be:

smb://%h/mythtv 

... and the live prefix would be:

smb://%h/mythtv 

This means that the ring buffer files are created in the same directory as the recorded show .nuv files (i.e. /var/video). Also, the myth database populates the host field in various tables so that %h expands correctly. Some people have had problems with this so I sometimes suggest that they just replace it with the IP of the back end server...Gimblefoot

Restart samba.

openSUSE run:  /etc/init.d/smb restart 
  

2. Upload the xbmcmythtv directory and everything below it to your XBMC/scripts directory on your xbox. So after you have done this, you should have a XBMC/scripts/xbmcmythtv/ dir on your xbox.

3. Run the mythtvmain.py script and go into the Settings screen to specify your connection details and paths. (in versions newer than 0.20.31 mythtvmain.py was replaced by default.py)

  Mythtv host: Enter the hostname / ip-address of your mythtv backend
  Mythtv port: Use default setting value
  Mythtv statusport: Use default setting value
  Mythtv protocol: Edit to correct Mythtv Protocol Version
      mythProtocolVersion = "8"    # 0.15.1
      mythProtocolVersion = "13"   # 0.16
      mythProtocolVersion = "14"   # 0.17
      mythProtocolVersion = "15"   # 0.18
      mythProtocolVersion = "17"   # ???
      mythProtocolVersion = "19"   # ???
      mythProtocolVersion = "26"   # 0.19
      mythProtocolVersion = "27"   # 0.19 SVN
  Mythtv minlivebufsize: Use default setting value
      Set the XBMC LAN video cache size (Settings -> System -> Cache -> Video Cache - Local Network) 
      to 1024 (not higher than 1536). Xbmcmythtv use this cache setting when the LiveTV start.
      From xbmcmythtv forum: 
      ...you know you don't need to set any cache settings as xbmcmythtv 
      will just grab the settings straight from XBMC and use that. The one set in xbmcmythtv is redundant. Frooby
      ...your live TV issue has to do with your buffer settings in XBMC and xbmcmythtv. 
      You need to lower your Video/LAN buffer XBMC setting down to around 1MB 
      and set the xbmcmythtv min ring buffer size to 700000 bytes.
      The default Video/LAN buffer setting is 4MB so XBMC tries to read 4MB right away from the ring buffer. 
      However, the ring buffer doesn't have 4MB to start with so XBMC thinks it has reached the end of file 
      after 2 seconds of playback. 
      You can fix this in two ways: lower the Video/LAN buffer size or increase the minimum ring buffer size 
      before playback is started. The issue with the first option is that your video playback might be choppy 
      if the value is set too low. The issue with the second option is that the larger the minimum ring buffer size,
      the longer before playback will start. The values I suggested above are what I personally use. 
      They seem to be a fairly good compromise but you can fiddle with the values if you want to experiment...Gimblefoot

  Mythtv tunewait: Use default setting value 
      Time to wait while mythtvbackend tune to channel and record the livetv .mpg file
  Mythtv startpage: Change to the prefered default start page
      [0,"Main"
      [1,"LiveTV"
      [2,"Recorded Shows"
      [3,"Program Guide"
      [4,"Schedules"
      [5,"Upcoming Shows"
      [6,"Settings"
  Mysql host: Edit to mythtv backend ip-adresse
  Mysql port: Use default setting value
  Mysql database: Use default setting value
  Mysql user: Use default setting value
      From http://mahune.org/archive/2005/05/07/mythtv-and-xbox/
      You also need to grant xbmcmythtv access to your MythTV MySQL database.
      shell> mysql --user=root mysql
      mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
      -> ON mythconverg.*
      -> TO 'mythtv'@'xbox_ip'
      -> IDENTIFIED BY 'mythtv';
      AND make sure that mysql is accessible on the network:
      comment out skip-networking in /etc/mysql/my.cnf 
      (add a # before it so it looks like: #skip-networking)
   Mysql password: Use default setting value
   Paths recordedprefix: Change to mythbackend recordings SMB path
      smb://h%/mythtv/recordings (smb://h%/SMB_share_name/recording_catalog)
      One of the things I have noticed with xbmcmythtv is that you may have to use an ip-address 
      instead of the variable /%h/ in the recordings and the buffer path in the xbmcmythtv settings screen.
      From xbmcmythtv forum: The usual reason this does not work is if Myth TV 
      does not populate a fully qualified domain name. XBMC cannot resolve simple host names 
      but it can resolve fully qualified domain names (Gimblefoot). 
   Paths livetvprefix: Change to mythbackend buffer SMB path 
      With Mythtv 0.19 mythtv recordings and buffer path are the same
   Paths localcopypath: Use default setting value
      The catalog E:\videos must exist on the xbox
  

4. On the settings screen, make sure that the connections test successfully then save your settings.

5. You should now be able to use the rest of the buttons on the main menu displayed by mythtvmain.py.

Common problems:

       - mysql database/table permissions 
       - mythbackend on visible ip 
       - not having a recent build of XBMC 
       - not using a version of XMBC MythTV that matches the MythTV backend 
       - not having samba shared recordings/livetv directory 
       - MySql >= 4.1 Client does not support authentication protocol... http://www.digitalpeer.com/id/mysql


Optional installation includes Replacing a shortcut on the main XBMC screen:

1. Edit the XBMC/skin/Project Mayhem III/PAL/Home.xml skin file (use XBMC/skin/Project Mayhem III/PAL16X9/Home.xml if you have a widescreen)(this is a XBMC skin file - not one included with these scripts).
2. Look for a "<description>My Programs normal push button</description>" (or Pictures, Movies, Music, etc).
3. Edit the control as follows:

   - set the label attribute to "My TV".
   - set the onclick attribute "xbmc.runscript(q:\scripts\xbmcmythtv\default.py)".

4. Reboot xbox or reload skin to show the skin change.

A second optional method would be to place it in the scripts popup menu (the little blue arrow next to the shutdown button).

1. Go into your scripts
2. Select the xbmcmythtv script and push the white button
3. Select add to favorites.

Broken Link -> An excellent article on this can be found here: http://mahune.org/archive/2005/05/07/mythtv-and-xbox/

Broken Link -> Google Cache of Link

Working Link -> Wayback Machine Cache

Xbmcmythtv forum can you find here: http://sourceforge.net/forum/?group_id=128346

Other guides and sources of information

Installing MythTV with MythTV-Xbox (MXB) Installer by Dennis Cartier - 0.4.5 seems to be for MythTV 0.18 only (Good reference, but out of date and the install script is not maintained anymore, which means it doesn't work.)

MythBox for XBMC

XBMC MythTV Script

XBMC - XBox Media Center

MythTV / Xebian guide - for 0.18.1 and upgrading to 0.19