Archive:MythTV: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Dteirney
(Added known issue for Guide not working. Usually caused by incorrect username and password.)
>Dteirney
(Updates to streamline some of the content. Updated to include MythBox.)
Line 1: Line 1:
XBMC Media Center includes a Source that can be used to interact with a MythTV backend to:
XBMC Media Center includes a Source that can be used to interact with a MythTV backend to:
* Watch Live TV
* Watch Live TV
* View the program guide
* View the electronic program guide (EPG)
* Play previously recorded TV shows
* Play previously recorded TV shows
Once the MythTV Source has been added, when it is chosen you will be presented with 4 virtual folders.
* '''All Recordings''' - to watch TV shows that have been previously recorded
* '''Live TV''' - to display TV that is currently being aired
* '''Guide''' - to view the EPG for a subsequently chosen channel
* '''Recordings by title''' - to list each series of TV shows that have been previously recorded (only available in SVN)


TODO: Screenshots based on New Zealand Freeview|HD content with the MediaStream skin.
TODO: Screenshots based on New Zealand Freeview|HD content with the MediaStream skin.


== Setup ==
== What is Myth TV ==
 
[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.
 
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).
 
== 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:
To communicate with a MythTV backend, add a new Source from the Videos section. The source should have a URL that looks like:
Line 12: Line 31:
'''myth://username:[email protected]'''
'''myth://username:[email protected]'''


''username'' and ''password'' are the credentials for a user that has access to the MySQL mythconverg database on the MythTV backend. This is used to obtain EPG information from the database when using the '''Guide'''. If and username and password are not supplied a default of ''mythtv'' is used for both. Remember to check that the MySQL database has been configured to allow external connections if XBMC is running on a different machine.
''username'' and ''password'' are the credentials for a user that has access to the MySQL mythconverg database on the MythTV backend.


''i.p.address'' is the IP address of the MythTV backend server. A hostname can also be used. Be sure that the hostname resolves to an IP address on the XBMC machine.
''i.p.address'' is the IP address of the MythTV backend server. A hostname can also be used. Be sure that the hostname resolves to an IP address on the XBMC Media Center machine.


For the myth:// protocol to work, XBMC must be able to resolve the hostname of the MythTV backend to an IP address. This is necessary because of the way the Myth Protocol works. Either the DNS server on the network needs to be able to resolve the hostname, or a static hostname entry is needed on the XBMC machine. This can be done in the /etc/hosts file in Linux or Mac OSX, or in the AdvancedSettings.xml file for the original XBox.
The username and password supplied in the URL are needed to obtain EPG information from the database when using the '''Guide'''. If the username and password are not supplied a default of ''mythtv'' is used for both.


Relating to the DNS resolution issues, the MythTV backend must also be configured with a hostname that will resolve to an IP. The hostname in the MythTV configuration must not be set to localhost or 127.0.0.1 if XBMC Media Center is running on a separate machine.
== Setup in MythTV ==


Once the MythTV Source has been added, when it is chosen you will be presented with 3 virtual folders.
If XBMC Media Center and the Myth TV backend are not running on the same machine:
* '''Live TV''' - to display TV that is currently being aired
* Check that the MySQL database being used by MythTV has been configured to allow external connections.
* '''Guide''' - to view the EPG for a subsequently chosen channel
* The MythTV backend must not be set to localhost or 127.0.0.1. It must be set to either a hostname that will resolve to an IP address on the XBMC machine, or an IP address.
* '''Recordings''' - to watch TV shows that have been previously recorded


== Watching Live TV ==
== Watching Live TV ==
Line 41: Line 59:
There are future plans for a fully interactive EPG similar to that available within the MythTV frontend.
There are future plans for a fully interactive EPG similar to that available within the MythTV frontend.


It is not possible within XBMC to move up and down the channels when playing LiveTV. The new channel needs to be chosen from within the '''Live TV''' listing.
It is not possible within XBMC to move up and down the channels when playing Live TV. The currently playing channel needs to be stopped and the new channel then chosen from within the '''Live TV''' listing.


== Viewing the Program Guide ==
== Viewing the Program Guide ==
Line 53: Line 71:
== Watching Recorded TV Shows ==
== Watching Recorded TV Shows ==


When choosing '''Recordings''' a list of all recorded TV shows is presented along with:
When choosing '''All Recordings''' a list of all recorded TV shows is presented along with:
* The name of the TV show
* The name of the TV show
* The date that it aired
* The date that it aired


Depending on the XBMC skin being used, and the available Views, the thumbnail for the TV show, the channel and the description may be displayed.
Depending on the XBMC skin being used, and the available Views, the thumbnail for the TV show, the channel name and the description may be displayed.
 
Standard XBMC functionality can be used to sort the recordings by name to get all the shows from a given series shown together, or sorted by date to see the most recent recordings.


TODO: Screenshot
TODO: Screenshot


Using standard XBMC functionality, the recordings can be sorted by name to get all the shows from a given series shown together, or sorted by date to see the most recent recordings.
When choosing '''Recordings by title''' a list of all recorded TV shows with the same title are presented.


The subversion (SVN) release of XBMC also provides a '''Recordings By Title''' virtual folder. When choosing this, a list of all the recorded TV shows grouped by title is shown. This makes it much easier to see what TV show series have been recorded, and then see a list of recorded TV shows in a series sorted by date.
The subversion (SVN) release of XBMC also provides a '''Recordings By Title''' virtual folder. When choosing this, a list of all the recorded TV shows grouped by title is shown. This makes it much easier to see what TV show series have been recorded, and then see a list of recorded TV shows in a series sorted by date.


== Skin Support ==
== Trouble Shooting ==


MediaStream - Episode View
=== Recordings Don't Play ===
 
== Current Projects ==
 
Unified PVR
 
== Trouble Shooting ==


XBox - SD only
For the myth:// protocol to work, XBMC must be able to resolve the hostname of the MythTV backend to an IP address. This is necessary because of the way the Myth Protocol works. The Myth API gets the hostname of the MythTV backend and uses that to play recordings.
Linux - HD
Always turn on debugging and review the XBMC log file.


=== Recordings Don't Play ===
Either the DNS server on the network needs to be able to resolve the hostname, or a static hostname entry is needed on the XBMC machine. This can be done in the /etc/hosts file in Linux or Mac OSX, or in the AdvancedSettings.xml file for the original XBox.


Check the DNS entry. The Myth API gets the hostname of the MythTV backend and uses that to play recordings. XBMC needs to be able to resolve the hostname to an IP address for playback to work. On the XBox, hostname resolution is best handled by adding a using Hosts entry in AdvancedSettings.xml file. On Linux, use the /etc/hosts file.
Double check that the hostname 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.


=== Guide Doesn't Display Anything ===
=== 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.
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.
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 for more information.
See Setup in XBMC for more information.


=== High CPU Usage with H264 Encoded Video ===
=== Audio Plays Out of Sync ===


Depending on the video card and driver being used, there could be significant CPU utilised when playing H264 content.
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.


There is an advanced setting which can be used to reduce the number of CPU cycles used to decode H264 encoded video.
There is an advanced setting which can be used to reduce the number of CPU cycles used to decode H264 encoded video.


The <skiploopfilter> setting in advancedsettings.xml can be used to reduce the CPU utilization by reducing the quality of the output video.
The <skiploopfilter> setting in advancedsettings.xml can be used to reduce the CPU utilization by reducing the quality of the output video. Valid values are -16, 0, 8, 16, 32, 48. The larger the number the more h264 content gets discarded in an effort to save CPU cycles.


Valid values are -16, 0, 8, 16, 32, 48.
Try adding <skiploopfilter>48</skiploopfilter> to the advancedsettings.xml file in userdata.
 
The larger the number the more h264 content gets discarded in an effort to save CPU cycles.
 
=== Audio Plays Out of Sync ===
 
Check CPU utilization. I was having audio sync problems with 1080i content with LATM AAC audio. AAC is quite CPU intensive (or so I'm told) and my AMD X2 6000+ CPU wasn't quite cutting the mustard combined with the also CPU intensive H264 video content. So, unless you've got a rocketship CPU that's faster than 3.0Ghz try adding <skiploopfilter>48</skiploopfilter> to the advancedsettings.xml file in userdata.


== Known Problems ==
== Known Problems ==
Line 111: Line 119:
Below is a list of known problems that may be encountered when using the XBMC integration with MythTV.
Below is a list of known problems that may be encountered when using the XBMC integration with MythTV.


* Need to delete a Recording twice for it to be removed from the list if using a Myth TV 0.20 backend. Deleting appears to work as expected using a 0.21 Myth TV backend.
* Need to delete a Recording twice for it to be removed from the list if using a MythTV 0.20 backend. Deleting appears to work as expected using a 0.21 Myth TV backend.
* Seeking doesn't work with Live TV. This is related to the way the Myth API streams content. Hopefully this will be resolved in the future.
* Seeking doesn't work with Live TV. This is related to the way the Myth API streams content. Hopefully this will be resolved in the future.


== History of MythTV support in XBMC ==
== 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].
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 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.
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.


=== xbmcmythtv Python Script ===
=== xbmcmythtv Script ===


Support for MythTV in XBMC started with the [http://sourceforge.net/projects/xbmcmythtv/ xbmcmythtv] Python script. This project communicated with the MythTV mythconverg MySQL database to get information, and played recordings via a Samba share on the MythTV backend.
Support for MythTV in XBMC started with the [http://sourceforge.net/projects/xbmcmythtv/ xbmcmythtv] Python script. This project communicated with the MythTV mythconverg MySQL database to get information, and played recordings via a Samba share on the MythTV backend.
Line 130: Line 138:
Since this project was implemented as a Python script, it is not able to be used in the Linux version of XBMC.
Since this project was implemented as a Python script, it is not able to be used in the Linux version of XBMC.


=== myth:// protocol ===
=== 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.
 
=== MythBox Script (Linux Only) ===


The myth:// protocol was released as a supported Source 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.
[http://code.google.com/p/mythbox/ MythBox] was released in late 2008 and is a Linux only XBMC script for MythTV that supports:
* Watching recordings with commercial skipping
* Watching Live TV
* Scheduling recordings


Although the myth:// protocol doesn't support all the functionality that the xbmcmythtv Python 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.
The code was forked from the initial xbmcmythtv script.


=== PVR frontend ===
=== PVR frontend ===
Line 142: Line 161:
Much more information can be found in the [[GSoC - Unified PVR Frontend|Google Summer of Code - Unified PVR Frontend]] wiki page. MythTV is being used as the first PVR backend that will be supported, with the intention of XBMC being able to communicate with any PVR backend.
Much more information can be found in the [[GSoC - Unified PVR Frontend|Google Summer of Code - Unified PVR Frontend]] wiki page. MythTV is being used as the first PVR backend that will be supported, with the intention of XBMC being able to communicate with any PVR backend.


Note that the vision does not include XBMC providing native support for PVR capabilities. Rather the vision is to leverage the significant amount of existing open source effort that has been put into this area by providing a slick frontend interface.
Note that the vision does not include XBMC providing native support for digital video recorder (DVR) capabilities. Rather the vision is to leverage the significant amount of existing open source effort that has been put into this area by providing a slick frontend interface.


[[category:File Sharing|Sources]]
[[category:File Sharing|Sources]]
[[category:PVR]]
[[category:PVR]]

Revision as of 02:21, 6 February 2009

XBMC Media Center includes a Source that can be used to interact with a MythTV backend to:

  • Watch Live TV
  • View the electronic program guide (EPG)
  • Play previously recorded TV shows

Once the MythTV Source has been added, when it is chosen you will be presented with 4 virtual folders.

  • All Recordings - to watch TV shows that have been previously recorded
  • Live TV - to display TV that is currently being aired
  • Guide - to view the EPG for a subsequently chosen channel
  • Recordings by title - to list each series of TV shows that have been previously recorded (only available in SVN)

TODO: Screenshots based on New Zealand Freeview|HD content with the MediaStream skin.

What is Myth TV

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).

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]

username and password are the credentials for a user that has access to the MySQL mythconverg database on the MythTV backend.

i.p.address is the IP address of the MythTV backend server. A hostname can also be used. Be sure that the hostname resolves to an IP address on the XBMC Media Center machine.

The username and password supplied in the URL are needed to obtain EPG information from the database when using the Guide. If the username and password are not supplied a default of mythtv is used for both.

Setup in MythTV

If XBMC Media Center and the Myth TV backend are not running on the same machine:

  • Check that the MySQL database being used by MythTV has been configured to allow external connections.
  • The MythTV backend must not be set to localhost or 127.0.0.1. It must be set to either a hostname that will resolve to an IP address on the XBMC machine, or an IP address.

Watching Live TV

After choosing Live TV a listing of channels held within MythTV will be presented along with:

  • the name of the channel
  • the currently playing TV show on that channel.

Depending on the XBMC skin being used, and the available Views, the icon for the channel and the description for the currently playing TV show may be displayed.

TODO: Screenshot showing listing in MediaStream.

When a channel is chosen, the currently playing TV show will be displayed.

TBC: Exactly when LiveTV stops recording once the channel is no longer being viewed.

There are future plans for a fully interactive EPG similar to that available within the MythTV frontend.

It is not possible within XBMC to move up and down the channels when playing Live TV. The currently playing channel needs to be stopped and the new channel then chosen from within the Live TV listing.

Viewing the Program Guide

After choosing Guide a listing of channels held within MythTV will be presented. When a channel is chosen, and listing of upcoming TV shows on that channel is displayed.

TODO: Screenshot of a channel around prime time.

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.

Watching Recorded TV Shows

When choosing All Recordings a list of all recorded TV shows is presented along with:

  • The name of the TV show
  • The date that it aired

Depending on the XBMC skin being used, and the available Views, the thumbnail for the TV show, the channel name and the description may be displayed.

Standard XBMC functionality can be used to sort the recordings by name to get all the shows from a given series shown together, or sorted by date to see the most recent recordings.

TODO: Screenshot

When choosing Recordings by title a list of all recorded TV shows with the same title are presented.

The subversion (SVN) release of XBMC also provides a Recordings By Title virtual folder. When choosing this, a list of all the recorded TV shows grouped by title is shown. This makes it much easier to see what TV show series have been recorded, and then see a list of recorded TV shows in a series sorted by date.

Trouble Shooting

Recordings Don't Play

For the myth:// protocol to work, XBMC must be able to resolve the hostname of the MythTV backend to an IP address. This is necessary because of the way the Myth Protocol works. The Myth API gets the hostname of the MythTV backend and uses that to play recordings.

Either the DNS server on the network needs to be able to resolve the hostname, or a static hostname entry is needed on the XBMC machine. This can be done in the /etc/hosts file in Linux or Mac OSX, or in the AdvancedSettings.xml file for the original XBox.

Double check that the hostname 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.

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.

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.

There is an advanced setting which can be used to reduce the number of CPU cycles used to decode H264 encoded video.

The <skiploopfilter> setting in advancedsettings.xml can be used to reduce the CPU utilization by reducing the quality of the output video. Valid values are -16, 0, 8, 16, 32, 48. The larger the number the more h264 content gets discarded in an effort to save CPU cycles.

Try adding <skiploopfilter>48</skiploopfilter> to the advancedsettings.xml file in userdata.

Known Problems

Below is a list of known problems that may be encountered when using the XBMC integration with MythTV.

  • Need to delete a Recording twice for it to be removed from the list if using a MythTV 0.20 backend. Deleting appears to work as expected using a 0.21 Myth TV backend.
  • Seeking doesn't work with Live TV. This is related to the way the Myth API streams content. Hopefully this will be resolved in the future.

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.

xbmcmythtv Script

Support for MythTV in XBMC started with the xbmcmythtv Python script. 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.

Since this project was implemented as a Python script, it is not able to be used in the Linux version of XBMC.

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.

MythBox Script (Linux Only)

MythBox was released in late 2008 and is a Linux only XBMC script for MythTV that supports:

  • Watching recordings with commercial skipping
  • Watching Live TV
  • Scheduling recordings

The code was forked from the initial xbmcmythtv script.

PVR frontend

The future for MythTV support in XBMC is based on the unified PVR frontend support that is envisaged for XBMC Media Center.

Much more information can be found in the Google Summer of Code - Unified PVR Frontend wiki page. MythTV is being used as the first PVR backend that will be supported, with the intention of XBMC being able to communicate with any PVR backend.

Note that the vision does not include XBMC providing native support for digital video recorder (DVR) capabilities. Rather the vision is to leverage the significant amount of existing open source effort that has been put into this area by providing a slick frontend interface.