MythTV
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.
- MythTV Main Website
- Mythweb wiki entry
- Mythtv:Skipping_Commercials wiki entry
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. (Sometimes 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.
- 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 that you can use (in addition to the media director's own). In this way you can use a webpad or PDA Orbiter as a wireless keyboard/mouse.
- If you do not use NTSC, go to the "General"-->"Next"-->"Global Backend Setup" page. Choose your video standard (NTSC, PAL, etc.). The other default general settings should be fine. Press ESC to return to the Main Myth Setup Menu.
- 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 you have got a DVB-s card, as card type use: DVB DTV TV-Card (v3.x) and select the right frontend (autodetected) below. ATTENTION, Don't forget to set DiSEqC, i set to Universal (Europe). Otherwise you will not be able to tune (at least that was my experience).
- If your card was properly identified, the video device field should be filled in for you. If not, try rebooting the Media Director and repeating. Press ESC to return to the Main Myth Setup Menu.
- Choose "Video Sources" and select your video source. Refer to the Myth user's Manual for details. For DVB-s Transmitted guide only (EIT) is a good start choice. Press ESC to return to the Main Myth Setup Menu.
- Choose "Input connections" to indicate which video source is connected to which input on the capture card.
- Press ESC to exit Myth Setup and return to the LinuxMCE Orbiter screen.
- At this point you will be prompted to run mythfilldatabse. Select "Yes".
- Sadly, as of 0710b3, this command silently fails to run. To fix this problem:
- Open /etc/mythtv/mysql.txt
- Copy the value for DBpasswd from that file.
- Open /home/linuxmce/.mythtv/mysql.txt (this file was created when you tried to run mythfilldatabse earlier and where linuxmce is the user you created when installing ubuntu - assuming CD installation)
- Paste the value you copied earlier into the DBpasswd field
- Save the file and run mythfilldatabase again.
- Go get a coffee
- You will need to do a full reboot of the whole LinuxMCE system (the Core and all Media Directors) before you can watch TV with Myth TV. You may want to setup all the Media Directors at once, therefore, and then do a complete reboot.
NOTE: Do not reboot until the Media Directors have 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 download the guide data.
Troubleshooting
MythTV's Backend doesn't show any tuners
I had an issue where, after adding my information using the setup wizard, the mythbackend process did not show any tuners as being available. This may have occured because I had deleted my PVR-150 devices and re-added them. The issue was simply that LinuxMCE did not fill in the device path for the tuner. The solution was to go in to the "computing" menu and to run MythTV Setup. Once in the MythTV Setup screen, select Tuners and you'll probably see your tuners listed without a device path (for example, "MPG: " instead of "MPG: /dev/video0". Simply go into each tuner and select the proper video device and then exit. You should not have to do anything with the input sources as these would have already been configured by LinuxMCE
Fixing Errors in MythTV Tables
Upon sudden power loss or in some other situations, you may experience odd behavior from MythTV on restart. This includes
- Scheduled recordings not showing in 'Upcoming Recording' in Mythweb
- Inability to record programs from any interface, be it the on-screen orbiter or Mythweb.
- Inconsistencies in the mythconverg table (Advanced Users)
To correct this issue, please take the following steps: Try either of these options:
- 1st we check to see if infact there are problem tables by running this in a shell on the core:
/etc/init.d/mythtv-backend stop mysqlcheck -c -uroot -p mythconverg
- if there are errors the run
mysqlcheck -r -uroot -p mythconverg
occasional this does not fix the problem, then try this
cd /var/lib/mysql/mythconverg /etc/init.d/mythtv-backend stop /etc/init.d/mysql stop myisamchk *.MYI -r
This should correct the issue. In my own testing (golgoj4) after a reboot everything was functioning correctly.
This fix was provided by user Rwilson131 (thanks)
Electronic Program Guide with xmltv
- Read the xmltv channels guide.
MythTV frontend access to LinuxMCE & MD password
LMCE's version of MythTV runs a mythbackend server. As long as your versions are close or exact, you should simply have to put the MythTV frontend PC on the same subnet as the core media subnet (default is 192.168.80.1) when running mythfrontend it will ask you for the masterserver backend ip address or hostname (again the default is 192.168.80.1 or dcerouter), after providing this information, you will most likely be able to connect to your content (I do this all the time from my laptop booted to kubuntu 710, and the mythv-frontend package installed) and I can view my recordings and watch TV live from the tuners.
the latest version of MythTV in LMCE is 0.20.2 fixes, so as long as the version you install is of this variant or package level, you should be able to connect up. If you for whatever reason do not wish to attach the myth frontend pc/laptop to the media subnet provided by the core, you will have to make ammendments to your LMCE firewall from the web admin to allow mythtv to talk to it, or simply disable the LMCE firewall so that the mythfrontend can connect to its address.
PASSWORD
You will also have to go into mythtv setup on the lmce core, and get the username and password for the mythtv mysql user. Otherwise you will not be able to connect to the LMCE master backend.
discussion at http://forum.linuxmce.org/index.php?topic=5180.0
EXPERIMENTAL: Update MythTV to VDPAU version on 0810
I first installed the LinuxMCE standard version of MythTV and got it working and after that I installed the VDPAU version.
If you don't have a Nvidia cvard on the core then you should probably not update the core !!!
Otherwise first update the Core and the the MD doing this
The Avenard repository is no longer used.
*add avenard repository to /etc/apt/sources.list
From http://www.avenard.org/media/Ubuntu_Repository/Ubuntu_Repository.html
- Add the signing GPG key
wget http://www.avenard.org/files/ubuntu-repos/ubuntu-repos.key && sudo apt-key add ubuntu-repos.key && rm ubuntu-repos.key
- Add repository 08.10
echo "deb http://www.avenard.org/files/ubuntu-repos intrepid release" | sudo tee /etc/apt/sources.list.d/avenard.list
apt-get update apt-get install libmyth-0.21-0 libmyth-perl mythtv-backend mythtv-common mythtv-frontend mythtv-transcode-utils pluto-mythtv-player
*update nvidia using the 180.60 packages from avenard
apt-get install nvidia-common nvidia-glx-180 nvidia-180-modaliases
- maybe update alsa to 1.0.20 - I did not do that, but might be that you will have to.
- reboot
- run myth setup and add a profile like describved below "quick FAQ" here
http://www.avenard.org/media/MythTV_%26_VDPAU/MythTV_%26_VDPAU.html
Quick F.A.Q:
Q: My CPU usage is still very high / my computer still can’t play HD videos A: Using VDPAU isn’t automatic, you must create a new TV Playback profile. In mythfrontend, go into Setup -> TV Settings -> Playback -> Playback Profiles. Create a new playback profile VDPAU.
If you have a nVidia < 8600GT or < 9500GT, use the following profile: < W: 1920 H: 720, decoder: VDPAU, renderer: VDPAU, Deinterlacer: Advanced 2X >= W: 0 H: 720, decoder: VDPAU, renderer: VDPAU, Deinterlacer: Temporal 2X
If you have a nVidia >= 8600GT or >= 9500GT, use the following profile: > W: 0 H: 0, decoder: VDPAU, renderer: VDPAU, Deinterlacer: Advanced 2X
With this profile, your CPU usage during playback should be around 5-10%.
- If mythTV hangs offen, please uncheck "Enable Realtime Priority threads" in TV -> General Playback.
- Setup your xorg.conf to 1080i
- Add this to xorg.conf after 'Driver "nvidia"' (maybe not needed !!)
Option "TripleBuffer" "True"
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).
For German Speaking Users - and DVB-C
There is a very nice entry in the MythWiki