Difference between revisions of "MythTV"

From LinuxMCE
Jump to: navigation, search
(Setting up MythTV in LinuxMCE)
Line 15: Line 15:
  
 
*Plug in and boot your Media director.
 
*Plug in and boot your Media director.
# If you have a PVR capture card, such as the PVR250/350 supported by IVTV, or the newer Blackbird cards (cx88), you will need to install the firmware before proceeding.  You can get this from the card manufacturer. Or, you can do an internet search on 'linuxmce.com' 'firmware' to find users that may have posted the firmware for your card. Install the firmware before proceeding with Myth setup.
+
*If you have a PVR capture card, such as the PVR250/350 supported by IVTV, or the newer Blackbird cards (cx88), install any updated firmware available from the manufacturer. (Soemtimes an Internet search for 'linuxmce' and 'firmware' will also locate firmware for your card.)
# Be sure you specified the type of capture card on the LinuxMCE Admin site on the "Wizard/Devices/Media Directors" page.
+
*Make sure the capture card type is specified in [[LinuxMCE Admin Website]]-->Wizard-->Devices-->Media Directors.
 
# For each Media Director, select the 'Computing' button on either the Orbiter that appears on the media director's screen (the on-screen orbiter), or using any other Orbiter which is controlling the same room as the Media Director.  Choose "MythTV Setup".  Myth's setup utility will appear on the Media Director.  If you launched this from an Orbiter other than the media director's own on-screen Orbiter, that Orbiter will display a keyboard & mouse you can use in addition to the media director's own.  Basically you can use web pad and pda orbiters as wireless keyboards/mice.
 
# For each Media Director, select the 'Computing' button on either the Orbiter that appears on the media director's screen (the on-screen orbiter), or using any other Orbiter which is controlling the same room as the Media Director.  Choose "MythTV Setup".  Myth's setup utility will appear on the Media Director.  If you launched this from an Orbiter other than the media director's own on-screen Orbiter, that Orbiter will display a keyboard & mouse you can use in addition to the media director's own.  Basically you can use web pad and pda orbiters as wireless keyboards/mice.
 
# If you do not use NTSC, choose the "General" option, and then "Next" until you get to the "Global Backend Setup" page.  Choose your video standard (NTSC, PAL, etc.).  All other general settings should be fine with their default values.  Press ESC to return to the Main Myth Setup Menu.
 
# If you do not use NTSC, choose the "General" option, and then "Next" until you get to the "Global Backend Setup" page.  Choose your video standard (NTSC, PAL, etc.).  All other general settings should be fine with their default values.  Press ESC to return to the Main Myth Setup Menu.

Revision as of 19:34, 24 May 2008

MythTV is a Linux application which turns a PC (with the necessary hardware) into a personal video recorder, a digital multimedia home entertainment system, and a Home Theater Personal Computer. It is used by LinuxMCE to handle viewing and recording of television.

Setting up MythTV in LinuxMCE

(If you purchased a Media Director with LinuxMCE pre-installed, you can skip steps 2, 3 and 6 below -- they will have been preconfigured.)

  • Plug in and boot your Media director.
  • If you have a PVR capture card, such as the PVR250/350 supported by IVTV, or the newer Blackbird cards (cx88), install any updated firmware available from the manufacturer. (Soemtimes an Internet search for 'linuxmce' and 'firmware' will also locate firmware for your card.)
  • Make sure the capture card type is specified in LinuxMCE Admin Website-->Wizard-->Devices-->Media Directors.
  1. For each Media Director, select the 'Computing' button on either the Orbiter that appears on the media director's screen (the on-screen orbiter), or using any other Orbiter which is controlling the same room as the Media Director. Choose "MythTV Setup". Myth's setup utility will appear on the Media Director. If you launched this from an Orbiter other than the media director's own on-screen Orbiter, that Orbiter will display a keyboard & mouse you can use in addition to the media director's own. Basically you can use web pad and pda orbiters as wireless keyboards/mice.
  2. If you do not use NTSC, choose the "General" option, and then "Next" until you get to the "Global Backend Setup" page. Choose your video standard (NTSC, PAL, etc.). All other general settings should be fine with their default values. Press ESC to return to the Main Myth Setup Menu.
  3. Choose "Capture Cards", "New Capture Card". If you have an ivtv or blackbird/cx88 card, choose "MPEG-2 Encoder card (PVR-250/350)". If you're using the cx88/blackbird driver, change the 'video0' to 'video1'. If your card was properly identified, the video device field should be filled in for you. If not, you may want to try rebooting the media director and repeating. Press ESC to return to the Main Myth Setup Menu.
  4. Choose "Video Sources" and select your video source. Refer to the Myth user's Manual for details. Press ESC to return to the Main Myth Setup Menu.
  5. Choose "Input connections" to indicate which video source is connected to which input on the capture card.
  6. Press ESC to exit Myth Setup and return to the LinuxMCE Orbiter screen.
  7. At this point you will be prompted to run mythfilldatabse. Select "Yes".
  8. Sadly, as of 0710b3, this command silently fails to run. To fix this problem:
    1. Open /etc/mythtv/mysql.txt
    2. Copy the value for DBpasswd from that file.
    3. Open /home/linuxmce/.mythtv/mysql.txt (this file was created when you tried to run mythfilldatabse earlier)
    4. Paste the value you copied earlier into the DBpasswd field
    5. Save the file and run mythfilldatabase again.
    6. Go get a coffee
  9. You will need to do a full reboot of the whole LinuxMCE system, core and all media directors, before you can watch TV with Myth TV. Therefore, you may want to setup all media directors at once and then do a complete reboot.

NOTE: Do not reboot until the media director(s) has had a chance to retrieve the channel data. You can confirm this by choosing the 'TV' button on the Orbiter main menu. This launches MythTV. Then choose "Manage Recordings", "Schedule Recordings", "Program Guide". You should see some program guide data. If you do not, wait a bit so Myth has a chance to pull the guide data.

If you have difficulty with Myth, you can refer to the official Myth site, or use LinuxMCE's support site. If the problem relates to Myth's integration with LinuxMCE, be sure to contact LinuxMCE for support.

Electronic Program Guide with xmltv

If you want to use xmltv to get your program guide information, MythTV,_xmltv_and_channels might be useful.

Programmer's Guide

We have created a DCE Device that wraps the MythTV libraries and can receive commands from other DCE devices and use them to control the TV functionality of the mythtv. Supported functionality at this moment comprises the following: Start TV, Stop TV, Tune to channel, Channel Up, Channel Down. The player uses the same mechanisms that the current (as of 0.16 version) MythTv frontend program uses. So for every mythtv installation that currently works the player should work the same way as the current frontend.

In order to be able to do this we had to change the signature of some methods in a class used by the mythfrontend application. The classes in question is the TV class defined in the libs/libmythtv/tv_play.{h,cpp} files from the mythtv repository. The changes consist in some method and field access changes (made some previously private methods to be public). This was done in order to be able to control the player programatically and avoid putting synthetic events into the playback windows event queue. The changes only affect the headers and are used to compile the player. The binary should run on any machine with a working 0.16 MythTV installation.

Since we needed to have a resizable playback window we had to make some changes in the way the mythtv playback window is created and displayed. The change is a derived class from the MainMythWindow class which knows about resize events and uses them to resize all child objects inside it. The class is available in the plutohome.com svn repository also (in the MythTV Player module).

This module does not work currently with a mythfrontend application running. The module will present itself to the server as another mythfrontend client and it will use one tuner on playback (the same way as a mythtfronted will do).