Archive:Kodibuntu and Archive:MythTV: Difference between pages

From Official Kodi Wiki
(Difference between pages)
Jump to navigation Jump to search
>Gamester17
No edit summary
 
>Fiveisalive
m (Refactor page to note that this will be largely historical way of accessing MythTV in XBMC soon)
 
Line 1: Line 1:
XBMC Live is the XBMC media center software bundled with a embedded operating-system, for that set-top-box felling. XBMC Live also lets you easily boot to the XBMC Live CD in order to demo XBMC for your friends and family on practically any relatively modern computer, (as long as it was manufactured in the last 5-years or so it should meet the XBMC's minimum requirements).
{{XBMC faq toc Inline}}


==What is XBMC Live?==
== What is MythTV ==
XBMC Live is a boot-CD with XBMC working out-of-the-box without touching the users harddrive for demo purposes. Once booted, XBMC Live will also let the user install XBMC complete with embedded operating-system onto a 2GB (or larger) USB-flash-memory-stick for a permanent and dedicated set-top-box style installation of XBMC, currently with Microsoft's Windows Media Center Remote with USB reciever as the default supported controller.


==XBMC Live minimum and recommended hardware requirements==
[http://www.mythtv.org/detail/mythtv MythTV] is a [http://en.wikipedia.org/wiki/Digital_video_recorder digital video recorder] for watching and recording television. MythTV also contains plugins for viewing other home media, similar to what XBMC Media Center provides. MythTV is like a free open source alternative to Tivo and Windows Media Center.
*x86 (Intel/AMD-based) processor computer capable of booting to CD-ROM.
**[http://en.wikipedia.org/wiki/Pentium_4 Intel Pentium 4], [http://en.wikipedia.org/wiki/Pentium_M Intel Pentium M], [http://en.wikipedia.org/wiki/Athlon_64 AMD Athlon 64], [http://en.wikipedia.org/wiki/Opteron AMD Opteron], or newer CPU.
**Very fast modern dual-core processor is required to decode H.264 videos in FullHD (1080p).
**For clarification; XBMC Live does not work on the Xbox game-console.
*[http://en.wikipedia.org/wiki/Radeon ATI/AMD], [http://en.wikipedia.org/wiki/Intel_GMA Intel], or [http://en.wikipedia.org/wiki/GeForce NVIDIA] (recommended) graphic controller which supports [[XBMC for Linux specific FAQ|OpenGL 1.4 or later (2.0 recommended)]].
**[http://en.wikipedia.org/wiki/Radeon ATI Radeon R420] or newer supported, [http://en.wikipedia.org/wiki/Radeon ATI Radeon R600] or newer recommended.
**[http://en.wikipedia.org/wiki/Intel_GMA Intel GMA 950] or newer supported, [http://en.wikipedia.org/wiki/Intel_GMA Intel GMA X3100] or newer recommended.
**[http://en.wikipedia.org/wiki/GeForce NVIDIA GeForce 6-Series] and newer supported, [http://en.wikipedia.org/wiki/GeForce GeForce 8-Series] and newer recommended.
*Optional is to install to a 2GB (or larger) [http://en.wikipedia.org/wiki/USB_flash_drive USB-flash-drive].
**If you like to install XBMC Live to USB then note that it [http://www.u3.com/uninstall/default.aspx can not still have U3 software on it (so uninstall that first)].
**Larger than 2GB is if you have a lot of media as covers are cached on it.


==HOW-TO use XBMC Live==
Some of MythTV's features include:
It is as simple as 1, 2, 3, and if you only plan on using is as a Live CD (not installing to USB) then you can skip step 2.
* Watch and record analog and/or digital TV, including HDTV.
* Pause, skip, and rewind live TV shows.
* Completely automatic commercial detection/skipping, with manual correction via an intuitive cutlist editor.
* Intelligently schedules recordings to avoid conflicts.
* Parental controls to keep your kids out of the good shows.
* Schedule and administer many functions remotely via a web browser.
* Flexible client/server architecture allows multiple frontend client machines to access content served by one or more backend servers (although the most common installation consists of a single computer running both the client and server together).


NOTE! Just to be safe, if you plan on installing to USB then make sure that you first unplug any other USB drives just in case, (as you do not want to risk the chance the patchstick utility to overwrite the data on any other USB drive you might have connected).
This wiki page doesn't contain any information about how to install, setup or configure MythTV. If you need further information about how best to do this, [http://www.mythbuntu.org/ Mythbuntu] is a good place to start. Mythbuntu is a community supported add-on for Ubuntu focused upon setting up a standalone MythTV based PVR system.


# Download the ISO image, burn it just like any ISO image to a CD-R/RW.
== PVR support ==
# If you going to install to USB then first disconnect all USB storage devices that you do not want to install to.
Integrated MythTV support in XBMC is based on the [[PVR]] support that has now been merged in mainline XBMC (as of October 2012). More information can be found on [[PVR]] wiki page. There is a currently a [[PVR/MythTV|MythTV client add-on]] along with support of other PVR backends through [[:Category:PVR add-ons|client add-ons for those backends]].
# Boot your computer on the CD-R/RW and follow the instructions on the screen.
*If you choose to install to USB then make sure that you do not set the permanent storage area to "None" as it will then not save any settings or changes you make after a reboot.
===Username and password to the underlying OS environment===
Username and password to the underlying OS environment is not need by average users of XBMC Live but here they are just in case you want to digg into the (very) advanced possibilities that are avilable:
  Username: '''xbmc'''
Password: '''xbmc'''


==XBMC Live Development==
== Old-style (pre-PVR API) MythTV access ==
Great, so you think that you would like to help with the development or XBMC Live?
{{outdated}}
===Concept===
The idea is to package XBMC for Linux with a stripped version of an existing [http://en.wikipedia.org/wiki/Linux_distribution Linux distribution] as a bootable [http://en.wikipedia.org/wiki/LiveDistro LiveDistro (a.k.a. Live CD)], (the alternative would be our very own custom Linux distribution which is not exactly realistic). By doing this XBMC should be able to be installed onto any [http://en.wikipedia.org/wiki/USB_flash_drive USB flash drive] or harddisk drive using this [http://en.wikipedia.org/wiki/LiveDistro LiveDistro (a.k.a. Live CD)] on the target device. Note that even though a custom version of the [http://en.wikipedia.org/wiki/Linux_distribution Linux distribution], (meaning stripped for XBMC use only), the currently plan is still to try to use a vanilla kernel, (as long as that is possible).
===Operating-System===
XBMC Live 'Atlantis' is currently based on [http://en.wikipedia.org/wiki/Ubuntu_Mobile Ubuntu Mobile (MID Edition)], that is, it is Linux based. The operating-system has completely been hidden away on purpose, the point is to create set-top-box feeling with as close to instant-on boot as possible, (similar to that of a stand-alone DVD-player or video game-console). The end-user should not need to know which operating-system it is running on, or even that it is running on an operating-system at for that matter.


====Optimizing the (perceived) boot time of the XBMC Live distro====
The rest of this page details the old-style [Media Sources|media source]] that can communicates with a '''MythTV''' backend.  While it should still work,
Based on the XBMC Community Forum discussion [http://forum.xbmc.org/showthread.php?t=27571 here (link)] we have started a article here in the XBMC Online Manual wiki on how to [[HOW-TO improve the (perceived) boot time on a general Linux distribution]]. Please refer to that [[HOW-TO improve the (perceived) boot time on a general Linux distribution|wiki article]] and the [http://forum.xbmc.org/showthread.php?t=27571 XBMC Community Forum thread] for ideas and discussion about how to improve the (perceived) startup time of XBMC Live from a cold boot (whether from Live CD, Live USB, or from a harddrive installation of XBMC Live, or any other Linux distro for that matter).
the focus going forward will be accessing the MythTV backend via the PVR client add-on.


===XBMC===
That said, the current support allows you to:
XBMC Live contains [[XBMC for Linux]] compiled with the 'standalone' mode, this enabled certain functions that are not available in normal XBMC for Linux, (or XBMC for Mac, or for Windows), these functions include Power Management, and Network Management.
* '''Navigate All Recordings, Movies and TV Shows separately''' - standard XBMC navigation grouped in a sensible way.
* '''Playback recordings with automatic commercial skip''' - automatic commercial skip during playback that works as you expect with no fuss. Advanced options to help merge poorly flagged commercial breaks as well.
* '''Add recorded Movies to the XBMC library''' - integrate your recorded Movies in MythTV with all your other movies so you can see them all in one place. Standard XBMC functionality with [[scrapers]] supported.
* '''Watch and pause Live TV with direct channel navigation''' - change up or down channel with a single button press, or choose a channel number using the remote keypad.
* '''Look at electronic program guide (EPG)''' - to see what is coming up on each channel
* '''Delete recorded programs after watching''' - one place to watch and delete recorded programs


This limited source support is limited to playback of MythTV recordings. You need to schedule recordings via the new [[PVR/MythTV|MythTV add-on]] or using mythfrontend or mythweb.


[[category:Inner Workings]]
Versions of MythTV up to and including 0.24 are supported in the 11.0 release of XBMC Media Center (Eden). Version 0.25 of MythTV is currently only supported in trunk (see the "libcmyth" section of [[MythTV PVR Addon|the MythTV PVR Addon article]] for details).
[[category:Development]]
 
[[category:Linux]]
The functionality described on this page is for the 9.11 Camelot release of XBMC.
[[category:XBMC Live]]
 
[[category:To-Do]]
=== Setup ===
 
XBMC communicates with mythbackend using the [http://www.mythtv.org/wiki/Myth_Protocol Myth Protocol] and MySQL database queries to the mythconverg database. This requires that the MythTV configuration is checked to ensure XBMC will be able to communicate with MythTV, which depends on whether XBMC is running on the same machine.
 
If you don't intend on using the '''Guide''' then the MySQL related configuration can be omitted. Access to the ''mythconverg'' MySQL database is only used to view the Guide.
 
==== Setup in MythTV ====
 
If XBMC Media Center and the MythTV backend will NOT be running on the same machine:
 
* Check that the IP Address configured in MythTV can be accessed by the XBMC machine. ''The default IP Address for an installation of MythTV is 127.0.0.1 and must be changed so playback will work''
# Run '''mythtv-setup'''
# Select '''General'''
# Check that the '''IP Address''' in '''Local Backend''' section is NOT set to ''localhost'' or ''127.0.0.1''. The IP Address must be resolvable from the XBMC Media Center machine, e.g. 192.168.1.3.
* Check that the MySQL database being used by MythTV has been configured to allow external connections.
** Generally this means ensuring that the ''bind-address'' is ''not'' set to ''localhost'' or ''127.0.0.1'' in ''/etc/mysql/mysql.cnf'' or one of the ''*.cnf'' files in ''/etc/mysql/conf.d/''.
 
To ensure XBMC has proper access to the MythTV mysql database, run the following commands on the mysql server. Replace '''PASSWORD''' or '''xbmc''' with whatever you prefer, but keep the single quotes for syntax.
 
<code>$ mysql -u root -p </code> (enter mysql root password when prompted)
 
<code>mysql> grant SELECT,INSERT,UPDATE,DELETE,CREATE,DROP on mythconverg.* to 'xbmc' identified by 'PASSWORD';</code>
 
If you just want to restrict by IP subnet (in this example, the 192.168.1.x network):
<code>
    $ mysql -u root -p
    mysql> grant all on mythconverg.* to mythtv@"192.168.1.%" identified by "mythtv";
    mysql> flush privileges;
</code>
 
 
It is very important that the '''IP Address''' is set correctly using '''mythtv-setup'''. The Myth Protocol used by XBMC Media Center uses the IP Address configured in the Myth TV backend to determine where to stream the recordings from. So, even if the IP address in the myth:// URL points correctly to the MythTV backend, there can still be playback problems if the correct IP Address isn't also set correctly using mythtv-setup.
 
==== Setup in XBMC ====
 
To communicate with a MythTV backend, add a new ''Source'' from the ''Videos'' section. The source should have a URL that looks like:
'''myth://username:[email protected]'''
This URL needs to be specified manually as many skins don't support the ability to configure a MythTV source.
 
''username'' and ''password'' are the credentials for a user that has access to the MySQL ''mythconverg'' database on the MythTV backend. The username and password supplied in the URL are used to obtain EPG information from the MythTV database when using the '''Guide'''. If the username and password are not supplied a default of ''mythtv'' is used for both. The username and password are not used when watching recordings.
 
''i.p.address'' is the IP address of the MythTV master server. A hostname can also be used, but it must be resolvable to an IP address on the XBMC Media Center machine.
 
When you select the newly added MythTV [[Media Sources|media source]] five folders will be listed:
* '''All Recordings''' - to watch anything that has been recorded all in one folder.
* '''Guide''' - to view the EPG for a channel
* '''Live Channels''' - to display what is currently being aired
* '''Movies''' - to list the movies that have been recorded
* '''TV Shows''' - to list each series of TV shows that have been recorded
 
[[File:MythTV.FolderListing.jpg|800px]]
 
=== Watching Recorded Programs ===
 
==== All Recordings ====
 
After choosing '''All Recordings''' a list of all recorded programs is presented. Standard XBMC functionality can be used to sort by date to see the most recent recordings, or sort by name to get all the shows from a given series grouped together.
 
[[File:MythTV.AllRecordings.jpg|800px]]
 
==== Movies ====
 
After choosing '''Movies''' a list of all the recorded movies is shown.
 
[[File:MythTV.Movies.jpg|800px]]
 
If not all of the movies are shown, e.g. some still display in the '''TV Shows''' section, the Electronic Program Guide (EPG) being used by MythTV might not be very accurate. The EPG describes which programs are Movies and which are TV Shows. Use the [[Advancedsettings.xml#.3Cmyth.3E|<myth><movielength> advanced setting]] to help with this problem. 85 minutes seems to work well.
 
==== TV Shows ====
 
After choosing '''TV Shows''' a list of all the recorded TV shows grouped by title is shown. This makes it easy to see what TV series or one-off programs have been recorded.
 
TODO: Update image.
[[File:MythTV.TVShows.jpg|800px]]
 
After choosing a title, the list of recorded programs with that title is shown.
 
TODO: Update image.
[[File:MythTV.TVShows.BestOfTopGear.jpg|800px]]
 
=== Watching Live TV ===
 
After choosing '''Live Channels''' a listing of the channels used by MythTV is displayed.
[[File:MythTV.LiveTV.jpg|800px]]
 
When a channel is chosen, the currently playing TV show on that channel is shown.
 
It is possible to pause Live TV, but it is not possible to skip.
To move up or down a channel when playing Live TV press the PageUp or PageDown button. Note that channel changes can take some time depending on the tuner hardware and configuration being used by MythTV.
 
=== Viewing the Electronic Program Guide (EPG) ===
 
After choosing '''Guide''' a listing of channels used by MythTV is shown.
 
[[File:MythTV.Guide.jpg|800px]]
 
When a channel is chosen, the listing of upcoming programs on that channel is displayed.
 
[[File:MythTV.Guide.TV3.jpg|800px]]
 
There is a future project to be able to schedule programs to record from the EPG similar to the functionality available in the MythTV frontend.
 
=== Adding Recorded Movies to the Video Library ===
 
Recorded movies can be added to the XBMC [[Video Library]] by setting the '''Content Type''' on the Movies directory and then choosing the appropriate Movie scraper.
 
Once the recorded Movies have been scanned to the Library, you can see and play them via the XBMC Movie Library.
 
'''NOTE:''' be sure to only set the content type for the '''Movies''' folder. XBMC doesn't understand how to add anything other than movies. If you choose a folder containing recorded TV Shows to be added to the library you may end up with all sorts of strange files in your XBMC library.
 
=== Automatic Commercial Skipping ===
 
Commercial breaks that have been flagged in MythTV are automatically skipped as of the 9.11 release (note that the option to turn EDL support on/off has now been removed). Prior to 9.11, automatic commercial skipping can be enabled by turning on [[EDL (commercial skipping) and SceneMarker support|Edit Decision List (EDL) support]] in XBMC Media Center through ''Settings -> Video -> Player -> Enable edit decision lists''.
 
Each commercial break is only skipped once so it's possible to go back into any incorrectly flagged commercial break. Scene markers are also put in at the beginning and end of the flagged commercial breaks to further support navigation.
 
For more information about the configuration that is possible for commercial skipping, see the [[EDL (commercial skipping) and SceneMarker support|Edit Decision Lists]] wiki page.
 
=== Deleting Recorded Programs ===
 
The ability to delete recorded programs can be enabled through ''Settings -> Appearance -> View Options -> Allow file renaming and deletion''.
 
=== Known Problems ===
 
* Need to delete a recording twice for it to be removed if using a MythTV 0.20 backend. Deleting works as expected using a MythTV 0.21 backend.
* Channel changes can take some time when using LiveTV.
 
=== Trouble Shooting ===
 
==== Recordings Don't Play ====
 
For the myth:// protocol to play recordings, XBMC must be able to access the '''IP Address''' configured in the MythTV backend using '''mythtv-setup'''. This is necessary because of the way the Myth Protocol works. The Myth API gets the IP Address configured in the MythTV backend and uses that to stream recordings.
 
If a hostname was used in the IP Address configuration for the MythTV Local Backend, either the DNS server on the network needs to be able to resolve the hostname to an IP address, or a static hostname to IP address entry is needed on the XBMC machine. A static IP address mapping can be set in the ''/etc/hosts'' file in Linux or Mac OSX, or in the ''AdvancedSettings.xml'' file for the original XBox.
 
Even if you haven't used a hostname, it may be worth adding an ''/etc/hosts'' file entry, as it appears that the backend returns a hostname anyway sometimes (see [http://forum.xbmc.org/showthread.php?t=45050&page=3]).
 
Double check that the Local Backend IP Address configured in the MythTV backend is not set to ''localhost'' or ''127.0.0.1'' if the MythTV backend is running on a different machine to XBMC Media Center.
 
==== Guide Doesn't Display Anything ====
 
Check that the username and password supplied in the myth:// URL are a username and password that have access to the mythconverg MySQL database. The guide information is obtained directly from the database.
 
If a username and password have not been supplied in the myth:// URL then the default of 'mythtv' will be used for both.
 
See Setup in XBMC for more information.
 
==== Live TV Doesn't Play ====
 
The '''libcmyth''' library used for to connect to MythTV from XBMC only enumerates the first 16 tuner devices when looking for available tuners. [http://trac.xbmc.org/ticket/4771 Trac - CMyth only enumerates 17 tuners]
 
Depending on what was done when the MythTV backend was setup, it's possible that some Tuner ID's are > 17 in the mythconverg database (especially if tuners were added and deleted several times, or if multiplexing is being used for digital terrestrial tuners).
 
If this is the case, you may be able to see the '''Guide''' and all the stations displayed in XBMC, but XBMC may not be able to select a tuner for live TV playback.
 
This can be resolved by removing all the tuners through '''mythtv-setup''' (so they start at 0 when re-added), and then re-adding them, or reducing the number of multiplexed virtual tuners that are created for each physical digital terrestrial tuner.
 
If a only a green screen displayed but the audio is working fine. Use mythtv's frontend to change the encoder to mpeg4. The settings can be found in "Utilites/Setup- Setup - TV Settings - Recording Profiles - Software Encoders. Select Live TV, and change it's encoder from rtjpeg to mpeg4.
 
==== Audio Plays Out of Sync ====
 
If CPU utilization is close to 100% on any of the CPU cores then there could be audio sync problems.
 
Depending on the video card and driver being used, there could be significant CPU utilized when playing H264 video content. The [[Advancedsettings.xml#.3Cskiploopfilter.3E|<skiploopfilter> advanced setting]] can be used to reduce the CPU utilization by reducing the quality of the output H264 video. Try setting it to 48.
 
=== History of MythTV support in XBMC ===
 
MythTV support in XBMC has been available since ~2004. It started life as a Python script for the original XBox that had functionality added by willing developers over the following years. Eventually the script moved to the current home at Sourceforge, and is now called [http://sourceforge.net/projects/xbmcmythtv/ xbmcmythtv]. In late 2008 another script based solution arrived called [http://code.google.com/p/mythbox/ MythBox].
 
In 2007 support for communicating with the MythTV backend was added directly to XBMC via a Source using the myth:// protocol. This project uses the cmyth library, which was built to use the network based [http://www.mythtv.org/wiki/index.php/Myth_Protocol Myth Protocol] supported by MythTV.
 
In 2009 it is hoped that the [[GSoC - Unified PVR Frontend|Google Summer of Code - Unified PVR Frontend]] project will be available and provide added functionality to the existing myth:// protocol support. More information about the PVR project can be found in the very large [http://forum.xbmc.org/showthread.php?t=2297 MythTV frontend client built into XBMC] forum thread.
 
==== myth:// Source ====
 
The myth:// source was released in early 2007. This project uses the network based [http://www.mythtv.org/wiki/index.php/Myth_Protocol Myth Protocol] to communicate with the MythTV backend. It also accesses the MySQL database directly to get '''Guide''' information.
 
Although the myth:// source doesn't support all the functionality that the xbmcmythtv script supported, it is possible to play recordings, which is all many XBMC frontend systems need to support.
 
The native MythTV frontend client needs to be used to schedule recordings.
 
==== MythTV Python Scripts for XBMC ====
 
MythTV Python Scripts for XBMC that provide a python coded GUI for MythTV interface.
 
==== MythBox Script (Linux/Mac/Windows) ====
 
[http://code.google.com/p/mythbox/ MythBox] was released in late 2008 and is a XBMC script for MythTV that supports the most common frontend use cases:
* Watching recordings with commercial skipping
* Watching Live TV
* Creating and editing recording schedules
* Showing upcoming recordings
* TV Guide
* Tuner and job status
* Fanart and episode meta data from tvdb.com, tvrage.com, themoviedb.org, imdb.com, and Google image search.
* MythTV Backends: 0.21, 0.22, 0.23, 0.23.1
 
==== Myth2XBMC Script (Xbox) ====
 
[http://code.google.com/p/myth2xbmc/ Myth2XBMC] heavily based on the original [http://sourceforge.net/projects/xbmcmythtv/ xbmcmythtv] script and is only tested on the Xbox.
 
==== xbmcmythtv Script (Xbox) ====
 
Support for MythTV in XBMC started with this [http://sourceforge.net/projects/xbmcmythtv/ xbmcmythtv] python script for XBMC on the Xbox. This project communicated with the MythTV mythconverg MySQL database to get information, and played recordings via a Samba share on the MythTV backend.
 
The last official release of the Python script was in May 2007 and supported version 0.20 of MythTV and protocol 34. Various unofficial releases were made available by some of the developers of xbmcmythtv, but appears to no longer be supported on an ongoing basis.
 
==== MythicalLibrarian and MythSExx ====
 
[[MythicalLibrarian]] and [[MythSExx]] are bash scripts which can be run on the MythTV server to create symlinks to the recorded files. The symlinks use the supported XBMC naming conventions so the standard filesystem scrapers can be used to scan recorded MythTV content into the XBMC Movie and TV Show libraries. They also generate the required EDL files to support commercial skip during playback.
 
[[MythicalLibrarian]] handles both TV episodes and Movies whereas [[MythSExx]] only handles TV episodes.
 
== External links ==
 
* [http://www.mythtv.org mythtv.org] - MythTV official website
** http://en.wikipedia.org/wiki/MythTV
* [http://mythbuntu.org mythbuntu.org] - Mythbuntu official website, a Linux distro with MythTV preconfigured
** http://en.wikipedia.org/wiki/Mythbuntu
* [http://adamhaeder.com/wordpress/2010/01/19/how-to-configure-xbmc-as-a-mythtv-frontend/ Walkthrough on how to configure XBMC for MythTV support], including skin modification for episode information, and EventGhost remote control support.
 
[[Category:File Sharing|Sources]]
[[Category:PVR]]

Revision as of 19:05, 17 October 2012

Template:XBMC faq toc Inline

What is MythTV

MythTV is a digital video recorder for watching and recording television. MythTV also contains plugins for viewing other home media, similar to what XBMC Media Center provides. MythTV is like a free open source alternative to Tivo and Windows Media Center.

Some of MythTV's features include:

  • Watch and record analog and/or digital TV, including HDTV.
  • Pause, skip, and rewind live TV shows.
  • Completely automatic commercial detection/skipping, with manual correction via an intuitive cutlist editor.
  • Intelligently schedules recordings to avoid conflicts.
  • Parental controls to keep your kids out of the good shows.
  • Schedule and administer many functions remotely via a web browser.
  • Flexible client/server architecture allows multiple frontend client machines to access content served by one or more backend servers (although the most common installation consists of a single computer running both the client and server together).

This wiki page doesn't contain any information about how to install, setup or configure MythTV. If you need further information about how best to do this, Mythbuntu is a good place to start. Mythbuntu is a community supported add-on for Ubuntu focused upon setting up a standalone MythTV based PVR system.

PVR support

Integrated MythTV support in XBMC is based on the PVR support that has now been merged in mainline XBMC (as of October 2012). More information can be found on PVR wiki page. There is a currently a MythTV client add-on along with support of other PVR backends through client add-ons for those backends.

Old-style (pre-PVR API) MythTV access

Time.png THIS PAGE IS OUTDATED:

This page or section has not been updated in a long time, no longer applies, refers to features that have been replaced/removed, and/or may not be reliable.

This page is only kept for historical reasons, or in case someone wants to try updating it.

The rest of this page details the old-style [Media Sources|media source]] that can communicates with a MythTV backend. While it should still work, the focus going forward will be accessing the MythTV backend via the PVR client add-on.

That said, the current support allows you to:

  • Navigate All Recordings, Movies and TV Shows separately - standard XBMC navigation grouped in a sensible way.
  • Playback recordings with automatic commercial skip - automatic commercial skip during playback that works as you expect with no fuss. Advanced options to help merge poorly flagged commercial breaks as well.
  • Add recorded Movies to the XBMC library - integrate your recorded Movies in MythTV with all your other movies so you can see them all in one place. Standard XBMC functionality with scrapers supported.
  • Watch and pause Live TV with direct channel navigation - change up or down channel with a single button press, or choose a channel number using the remote keypad.
  • Look at electronic program guide (EPG) - to see what is coming up on each channel
  • Delete recorded programs after watching - one place to watch and delete recorded programs

This limited source support is limited to playback of MythTV recordings. You need to schedule recordings via the new MythTV add-on or using mythfrontend or mythweb.

Versions of MythTV up to and including 0.24 are supported in the 11.0 release of XBMC Media Center (Eden). Version 0.25 of MythTV is currently only supported in trunk (see the "libcmyth" section of the MythTV PVR Addon article for details).

The functionality described on this page is for the 9.11 Camelot release of XBMC.

Setup

XBMC communicates with mythbackend using the Myth Protocol and MySQL database queries to the mythconverg database. This requires that the MythTV configuration is checked to ensure XBMC will be able to communicate with MythTV, which depends on whether XBMC is running on the same machine.

If you don't intend on using the Guide then the MySQL related configuration can be omitted. Access to the mythconverg MySQL database is only used to view the Guide.

Setup in MythTV

If XBMC Media Center and the MythTV backend will NOT be running on the same machine:

  • Check that the IP Address configured in MythTV can be accessed by the XBMC machine. The default IP Address for an installation of MythTV is 127.0.0.1 and must be changed so playback will work
  1. Run mythtv-setup
  2. Select General
  3. Check that the IP Address in Local Backend section is NOT set to localhost or 127.0.0.1. The IP Address must be resolvable from the XBMC Media Center machine, e.g. 192.168.1.3.
  • Check that the MySQL database being used by MythTV has been configured to allow external connections.
    • Generally this means ensuring that the bind-address is not set to localhost or 127.0.0.1 in /etc/mysql/mysql.cnf or one of the *.cnf files in /etc/mysql/conf.d/.

To ensure XBMC has proper access to the MythTV mysql database, run the following commands on the mysql server. Replace PASSWORD or xbmc with whatever you prefer, but keep the single quotes for syntax.

$ mysql -u root -p (enter mysql root password when prompted)

mysql> grant SELECT,INSERT,UPDATE,DELETE,CREATE,DROP on mythconverg.* to 'xbmc' identified by 'PASSWORD';

If you just want to restrict by IP subnet (in this example, the 192.168.1.x network):

   $ mysql -u root -p
   mysql> grant all on mythconverg.* to mythtv@"192.168.1.%" identified by "mythtv";
   mysql> flush privileges;


It is very important that the IP Address is set correctly using mythtv-setup. The Myth Protocol used by XBMC Media Center uses the IP Address configured in the Myth TV backend to determine where to stream the recordings from. So, even if the IP address in the myth:// URL points correctly to the MythTV backend, there can still be playback problems if the correct IP Address isn't also set correctly using mythtv-setup.

Setup in XBMC

To communicate with a MythTV backend, add a new Source from the Videos section. The source should have a URL that looks like: myth://username:[email protected] This URL needs to be specified manually as many skins don't support the ability to configure a MythTV source.

username and password are the credentials for a user that has access to the MySQL mythconverg database on the MythTV backend. The username and password supplied in the URL are used to obtain EPG information from the MythTV database when using the Guide. If the username and password are not supplied a default of mythtv is used for both. The username and password are not used when watching recordings.

i.p.address is the IP address of the MythTV master server. A hostname can also be used, but it must be resolvable to an IP address on the XBMC Media Center machine.

When you select the newly added MythTV media source five folders will be listed:

  • All Recordings - to watch anything that has been recorded all in one folder.
  • Guide - to view the EPG for a channel
  • Live Channels - to display what is currently being aired
  • Movies - to list the movies that have been recorded
  • TV Shows - to list each series of TV shows that have been recorded

MythTV.FolderListing.jpg

Watching Recorded Programs

All Recordings

After choosing All Recordings a list of all recorded programs is presented. Standard XBMC functionality can be used to sort by date to see the most recent recordings, or sort by name to get all the shows from a given series grouped together.

MythTV.AllRecordings.jpg

Movies

After choosing Movies a list of all the recorded movies is shown.

MythTV.Movies.jpg

If not all of the movies are shown, e.g. some still display in the TV Shows section, the Electronic Program Guide (EPG) being used by MythTV might not be very accurate. The EPG describes which programs are Movies and which are TV Shows. Use the <myth><movielength> advanced setting to help with this problem. 85 minutes seems to work well.

TV Shows

After choosing TV Shows a list of all the recorded TV shows grouped by title is shown. This makes it easy to see what TV series or one-off programs have been recorded.

TODO: Update image. File:MythTV.TVShows.jpg

After choosing a title, the list of recorded programs with that title is shown.

TODO: Update image. File:MythTV.TVShows.BestOfTopGear.jpg

Watching Live TV

After choosing Live Channels a listing of the channels used by MythTV is displayed. MythTV.LiveTV.jpg

When a channel is chosen, the currently playing TV show on that channel is shown.

It is possible to pause Live TV, but it is not possible to skip. To move up or down a channel when playing Live TV press the PageUp or PageDown button. Note that channel changes can take some time depending on the tuner hardware and configuration being used by MythTV.

Viewing the Electronic Program Guide (EPG)

After choosing Guide a listing of channels used by MythTV is shown.

MythTV.Guide.jpg

When a channel is chosen, the listing of upcoming programs on that channel is displayed.

MythTV.Guide.TV3.jpg

There is a future project to be able to schedule programs to record from the EPG similar to the functionality available in the MythTV frontend.

Adding Recorded Movies to the Video Library

Recorded movies can be added to the XBMC Video Library by setting the Content Type on the Movies directory and then choosing the appropriate Movie scraper.

Once the recorded Movies have been scanned to the Library, you can see and play them via the XBMC Movie Library.

NOTE: be sure to only set the content type for the Movies folder. XBMC doesn't understand how to add anything other than movies. If you choose a folder containing recorded TV Shows to be added to the library you may end up with all sorts of strange files in your XBMC library.

Automatic Commercial Skipping

Commercial breaks that have been flagged in MythTV are automatically skipped as of the 9.11 release (note that the option to turn EDL support on/off has now been removed). Prior to 9.11, automatic commercial skipping can be enabled by turning on Edit Decision List (EDL) support in XBMC Media Center through Settings -> Video -> Player -> Enable edit decision lists.

Each commercial break is only skipped once so it's possible to go back into any incorrectly flagged commercial break. Scene markers are also put in at the beginning and end of the flagged commercial breaks to further support navigation.

For more information about the configuration that is possible for commercial skipping, see the Edit Decision Lists wiki page.

Deleting Recorded Programs

The ability to delete recorded programs can be enabled through Settings -> Appearance -> View Options -> Allow file renaming and deletion.

Known Problems

  • Need to delete a recording twice for it to be removed if using a MythTV 0.20 backend. Deleting works as expected using a MythTV 0.21 backend.
  • Channel changes can take some time when using LiveTV.

Trouble Shooting

Recordings Don't Play

For the myth:// protocol to play recordings, XBMC must be able to access the IP Address configured in the MythTV backend using mythtv-setup. This is necessary because of the way the Myth Protocol works. The Myth API gets the IP Address configured in the MythTV backend and uses that to stream recordings.

If a hostname was used in the IP Address configuration for the MythTV Local Backend, either the DNS server on the network needs to be able to resolve the hostname to an IP address, or a static hostname to IP address entry is needed on the XBMC machine. A static IP address mapping can be set in the /etc/hosts file in Linux or Mac OSX, or in the AdvancedSettings.xml file for the original XBox.

Even if you haven't used a hostname, it may be worth adding an /etc/hosts file entry, as it appears that the backend returns a hostname anyway sometimes (see [1]).

Double check that the Local Backend IP Address configured in the MythTV backend is not set to localhost or 127.0.0.1 if the MythTV backend is running on a different machine to XBMC Media Center.

Guide Doesn't Display Anything

Check that the username and password supplied in the myth:// URL are a username and password that have access to the mythconverg MySQL database. The guide information is obtained directly from the database.

If a username and password have not been supplied in the myth:// URL then the default of 'mythtv' will be used for both.

See Setup in XBMC for more information.

Live TV Doesn't Play

The libcmyth library used for to connect to MythTV from XBMC only enumerates the first 16 tuner devices when looking for available tuners. Trac - CMyth only enumerates 17 tuners

Depending on what was done when the MythTV backend was setup, it's possible that some Tuner ID's are > 17 in the mythconverg database (especially if tuners were added and deleted several times, or if multiplexing is being used for digital terrestrial tuners).

If this is the case, you may be able to see the Guide and all the stations displayed in XBMC, but XBMC may not be able to select a tuner for live TV playback.

This can be resolved by removing all the tuners through mythtv-setup (so they start at 0 when re-added), and then re-adding them, or reducing the number of multiplexed virtual tuners that are created for each physical digital terrestrial tuner.

If a only a green screen displayed but the audio is working fine. Use mythtv's frontend to change the encoder to mpeg4. The settings can be found in "Utilites/Setup- Setup - TV Settings - Recording Profiles - Software Encoders. Select Live TV, and change it's encoder from rtjpeg to mpeg4.

Audio Plays Out of Sync

If CPU utilization is close to 100% on any of the CPU cores then there could be audio sync problems.

Depending on the video card and driver being used, there could be significant CPU utilized when playing H264 video content. The <skiploopfilter> advanced setting can be used to reduce the CPU utilization by reducing the quality of the output H264 video. Try setting it to 48.

History of MythTV support in XBMC

MythTV support in XBMC has been available since ~2004. It started life as a Python script for the original XBox that had functionality added by willing developers over the following years. Eventually the script moved to the current home at Sourceforge, and is now called xbmcmythtv. In late 2008 another script based solution arrived called MythBox.

In 2007 support for communicating with the MythTV backend was added directly to XBMC via a Source using the myth:// protocol. This project uses the cmyth library, which was built to use the network based Myth Protocol supported by MythTV.

In 2009 it is hoped that the Google Summer of Code - Unified PVR Frontend project will be available and provide added functionality to the existing myth:// protocol support. More information about the PVR project can be found in the very large MythTV frontend client built into XBMC forum thread.

myth:// Source

The myth:// source was released in early 2007. This project uses the network based Myth Protocol to communicate with the MythTV backend. It also accesses the MySQL database directly to get Guide information.

Although the myth:// source doesn't support all the functionality that the xbmcmythtv script supported, it is possible to play recordings, which is all many XBMC frontend systems need to support.

The native MythTV frontend client needs to be used to schedule recordings.

MythTV Python Scripts for XBMC

MythTV Python Scripts for XBMC that provide a python coded GUI for MythTV interface.

MythBox Script (Linux/Mac/Windows)

MythBox was released in late 2008 and is a XBMC script for MythTV that supports the most common frontend use cases:

  • Watching recordings with commercial skipping
  • Watching Live TV
  • Creating and editing recording schedules
  • Showing upcoming recordings
  • TV Guide
  • Tuner and job status
  • Fanart and episode meta data from tvdb.com, tvrage.com, themoviedb.org, imdb.com, and Google image search.
  • MythTV Backends: 0.21, 0.22, 0.23, 0.23.1

Myth2XBMC Script (Xbox)

Myth2XBMC heavily based on the original xbmcmythtv script and is only tested on the Xbox.

xbmcmythtv Script (Xbox)

Support for MythTV in XBMC started with this xbmcmythtv python script for XBMC on the Xbox. This project communicated with the MythTV mythconverg MySQL database to get information, and played recordings via a Samba share on the MythTV backend.

The last official release of the Python script was in May 2007 and supported version 0.20 of MythTV and protocol 34. Various unofficial releases were made available by some of the developers of xbmcmythtv, but appears to no longer be supported on an ongoing basis.

MythicalLibrarian and MythSExx

MythicalLibrarian and MythSExx are bash scripts which can be run on the MythTV server to create symlinks to the recorded files. The symlinks use the supported XBMC naming conventions so the standard filesystem scrapers can be used to scan recorded MythTV content into the XBMC Movie and TV Show libraries. They also generate the required EDL files to support commercial skip during playback.

MythicalLibrarian handles both TV episodes and Movies whereas MythSExx only handles TV episodes.

External links