Myth TV

From Mandriva Community Wiki

Revision as of 12:24, 1 June 2010 by Skiper (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search
MythTV is a home entertainment system that allows you to record TV programs on your hard drive. It also includes modules for web-browsing, news feeds, weather information, and music. Forgot to record your favorite program? You can simply log into your web site, click on the program in the schedule to set up the recording, and your MythTV box will record the program. See more at The MythTV Web Site

Contents

Hardware Requirements

Before you begin, it is required that you have :
  • A motherboard that works with Mandriva
    • Bear in mind that your motherboard must accommodate your chosen CPU, graphics card (PCI-e? AGP?), and video capture card (a free PCI slot).


  • CPU doesn't have to be fast.
    • Be aware that a capture card that does not include an onboard hardware transcoder will require processor cycles from your CPU to do the job. A modest CPU + motherboard should work fine with a capture card that does its own transcoding. Shop around for the price/performance sweetspot you feel comfortable with.


  • A TV Capture card
    • See the MythTV Wiki for a comprehensive list of compatible cards. This is one of the principle devices around which your system will be designed, so it pays to do your homework.
    • As of this writing, ivtv has provided a wide range of drivers for a large number of video capture devices. Still some devices are better supported than others. Users may find satisfaction with external USB devices.
    • While there are a number of capture cards that work well with MythTV, support for high-definition capable cards (the Hauppauge HD PVR series for example) is somewhat spotty as of this writing. Do your homework before purchasing hardware.
    • Most cards come with a remote control of some kind. Other third-party remote units are also available.
    • Don't forget the right cables.
  • A graphics card that has TV-out
    • nVidia versus ATI -- choose your poison.
    • It is important to match the output of your video card with the input of your display. If you're using a Digital TV you should be using a VGA, DVI (HDMI), or Component video connection. If you don't know the ins and outs of these various connections, do some research before you buy.
    • This is another critical component in your Home Theater PC system, but unlike video cards in gaming systems, it doesn't have to be a powerhouse.
  • Quiet fans so that you can hear what's on the TV (20 dB should be quiet enough, Zalman produce quiet fans)
  • Adequate power supply (the quieter the better. Make sure you have an adequate number and type of connections in the supply, form factor, etc.)
  • Optical Drive
    • MythTV has the capacity to interface with popular DVD players in Linux. You might consider a standard def DVD or possibly Blu-ray DVD. Be aware Blu-ray is infested with Digital Rights Management and may never be available to any Linux system.
  • A large-capacity, fast access hard drive
    • Given the cost of hard drives and the relatively large size of video files, this is not where you want to scrimp. Video files recorded at acceptable quality typically run 2 gigabytes per hour. It doesn't take long to fill up a drive if you want to keep a lot of programming on hand.
  • Plenty of RAM (1GB of RAM is affordable and recommended. 2GB of RAM is the most comfortable).
  • A wireless card so you can avoid more cables tangled behind your TV (Streaming video content requires more so consider 802.11n or wired Ethernet).
  • Miscellaneous fasteners, cables, case, mouse, keyboard, and the other stuff any computer requires.

Software Requirements

Prerequisites

Your favorite distro - Mandriva. As of the 2008.1 release, the Penguin Liberation Front provides an excellent set of Mandriva RPM packages for MythTV's frontend and backend. Why PLF? Because playing audio and video content depends on codecs which may be free (as in beer, as in liberty) or not-so-free (encumbered by patents). Working with PLF packages avoids obstacles like free codecs that won't play your content. If freedom is your primary motivation as a Linux user and you shun the not-so-free offerings of the PLF, be aware that there could be difficulty ahead. The dependencies for MythTV are extensive but well satisfied by Mandriva's package manager, however, you will also need to install MySQL, video4l, lirc, and some other packages. Step one is to configure your software repositories for the PLF.

Install From Repositories

Installing and configuring MythTV can seem daunting. It will take work, but there are resources outside this Wiki that will be helpful. Google, the Mandriva user forums, and the MythTV Wiki are your friends.

Necessary Non-MythTV Packages

Begin by installing MySQL. If you are using a Hauppauge® video capture device or any other capture device involving the Conexant CX23415/CX23416 codec chip, you will need to install ivtv drivers including: dkms-ivtv, ivtv-firmware, ivtv-firmware-audio, ivtv-firmware-dec, and ivtv-firmware-enc. These packages are all provided in Mandriva's repositories. Other video capture devices may require other drivers, for example the x11-driver-video-v4l, depending on your device's chipset. Use the lspci command to detect your device and list its chipset. There is more information on the v4l driver page.


Install these packages and reboot. Listing installed modules after the reboot should show you something like this. Notice the ivtv modules are loaded.

lsmod|grep ivtv
ivtv                  131872  0
i2c_algo_bit            6340  3 cx88xx,bttv,ivtv
cx2341x                12004  1 ivtv
tveeprom               14928  3 cx88xx,bttv,ivtv
videodev               27104  4 cx8800,cx88xx,bttv,ivtv
v4l2_common            16128  9 cx8800,cx88xx,bttv,wm8775,cx25840,tuner,ivtv,cx2341x,videodev
v4l1_compat            14308  3 bttv,ivtv,videodev
i2c_core               19360  16 cx88xx,bttv,lirc_i2c,nvidia,wm8775,cx25840,tuner,tea5767,tda8290,
tuner_simple,mt20xx,tea5761,ivtv,i2c_algo_bit,tveeprom,i2c_i801


A directory listing of the /dev directory should include a listing for a /dev/video0 device. If the modules are installed, and if the video capture device is being recognized, once that device is connected to a video source (basic cable for example), a user should be able to access the video stream with a media player. Using VLC, for example, would allow this command:

Image:Konsole.png
[user@computer ~]$ vlc pvr:// :pvr-device="/dev/video0"

to Open VLC and produce an image of whatever /dev/video0 is tuned to. Tuning can be accomplished at the command line with a command like:

Image:Konsole.png
[user@computer ~]$ ivtv-tune -c 6

Which will point your video capture device tuner toward channel 6. Running the command to open VLC reading /dev/video0 as described above should produce a media player window rendering an image of whatever is playing on channel 6.

MythTV Installation/Configuration

MythTV Frontend Main Menu

Here things get fuzzy and the Wiki needs some polish. I installed my system some time ago and in deference to others with more experience in this matter, with the exception of security and routine patches, I have not updated the system. It's still running Mandriva 2008.1 and the same MythTV packages I originally installed. It took me weeks to get this thing running and that's not unusual. Again, once you get the Myth box running do not touch it.

Example setup screen

Next, install the MythTV backend and frontend packages. In fact, open up the package manager and search for "Myth" and just install everything. In my experience, the packages installed MythTV with the right defaults in the right places. Just be aware that the dependencies are numerous and installing everything will take a while.

Another reboot and you should be able to see the Mythbackend process running in the process manager (or run "ps aux|grep mythbackend" as root in a terminal). If not, see if you can start the Mythbackend manually ("service mythbackend start" in a terminal as root). Once it's running, a basic setup is necessary. Run /usr/bin/mythtv-setup to begin. Items like the system's hostname, MySQL server and some others will have to be configured. Most other settings should be left at their default, but if your system isn't working as expected, you will probably need to consult the MythTV wiki here to get it happening. Be aware that if you want a database of channel information (and you will) it will be necessary to subscribe to a service like schedulesdirect.com. It doesn't cost much, and it's worth it.

Mythweb main menu
Sample guide page

The backend will need to scan for channel info which takes time and is not accompanied by feedback on how the scan is going. You simply start the scan and stare at the screen until it reports that it's done. Once you have that, you should install the Mythfrontend (or start it from the kicker menu if it's already installed) and use the mouse+keyboard to watch TV. If the audio is not working correctly, you'll need to look into the MythTV's backend audio configuration.

Mythweb guide details

Finally, you'll want to get the remote working, assuming your video capture device shipped with a remote, which most do now days. Of course, you can also control MythTV with the web-based frontend plugin from any computer that can access the Mythbox machine.

Sample TV screenshot with OSD
Onscreen menu


Remote Control

In my case there was the MCE USB remote control. Your equipment may involve a different remote control in which case some of this information will not apply. Problems related to the MCE USB remote control seem to be a result of 1) the fact that it is a relatively new device, and 2) it's designed to work with Microsoft's Media Center Edition of Windows. The remote for my previous Hauppauge PVR-350 was also infrared, but the receiver for it plugged into the Hauppauge card via a 3.5mm jack. The MCE USB remote has, well, a USB connected receiver.


After installing a package called mceusb2 via Mandriva's RPM package manager, this receiver was identified by lsusb and a red light appeared on the receiver when I mashed a button in its general direction. While the hardware appeared to function, I noted that it did not perform as described in various sources discovered in Web searches.


The first step in configuring such a remote is the installation of a program called lircd (linux infrared remote control) and lircd-remotes. This would provide the program interface and configuration files for applications supporting lirc on a Linux computer to respond to an infrared remote control. Lircd-remotes provides configuration files for a variety of remote controls. After installing these packages, a package called irw can be used to test the signal being sent/received by the remote and receiver.


Getting irw to read the remote depended on getting the right lircd.conf file. While there are a number of lirc configuration files provided by lirc-remotes and on the Internet for similar remotes, mine didn't appear to be among them. It turns out this remote is the model 1069 by Phillips (according this information). It took some looking around, but I finally found this document which provided the right configuration for the lirc interface. Once this was in place, irw would correctly report which button I was pushing on the remote control. For example, I press the "1" (numeral one) button on the remote's keypad and irw reports something like:

$ irw
000000037ff07bfe 00 KEY_1 mceusb2

One would normally copy the appropriate lircd.conf to /etc and then the corresponding lircrc file to the .mythtv directory from which MythTV is running, e.g. ~/.mythtv. Problem was, I had no correctly formatted lircrc file. It took a few minutes with a text editor, but I was able to get a lircrc file that corresponded to my lircd.conf file. For example, the entry for the "1" button above appeared in lircrc as:

begin
    prog   = mythtv
    button = KEY_1
    config = 1
end

According to documentation, lirc can be used with applications like VLC to provide remote control. At some point in the future I may look into that. In the meantime, I have started using irkick to configure a few basic buttons on the remote to start applications like the MythTV frontend. With the assortment of plugins available for MythTV I am able to check listings, edit recording schedules and play media either from the Mythbox via the remote control or over the network using a Web browser thanks to the Mythweb plugin.

Conclusion

This material is adapted loosely from my personal wiki which, at least for now, can be accessed right here.


Getting a Mythbox working has been compared to performing a root canal on yourself[1]. But take heart, it can be done and there is help available. Remember the references to Google, the Mandriva user forums and the MythTV wiki at the top of this article. This article is meant to provide a starting point. I hope others can contribute to this information to make it even easier for Mandriva users to get MythTV installed and working.


Below is an account of one user compiling MythTV from source under Mandriva 2005LE. I'm leaving it here, though I don't really know how useful it will be.

Mark_1830 05:28, 31 May 2009 (UTC)

Use the Source (Deprecated)

In the past I used pre-compiled binaries created by Thac but this caused me some rpm headaches when the time came for an upgrade. In the long run, I've found that it's easier to compile MythTV from source.


Download MythTV from the MythTV website


You'll need The latest mythtv(version).tar.bz2 and the latest mythplugins-(version).tar.bz2. The MythTV themes are optional.


Read the online instructions at the MythTV site. There are good Mandrake-specific instructions that cover all you'll need to know. As you can imagine there are a slew of library dependencies, but this should give you most of the ones you'll need:

  • urpmi lib64lame0-static-devel lib64tiff3-devel lib64dvdread3-devel lib64Mesaglut3-devel lib64exif12-devel libtiff-devel libexif-devel libtiff-devel libfaad2_0-devel lib64cdaudio1-devel lib64cdda0-devel lib64oggflac1-devel lib64id3tag0-devel lib64SDL1.2-devel lib64cdda0-devel libfaad2_0-static-devel libfaad2_0-devel


There are probably some dependencies missing from this list, but when you see a compilation error like "could not find header file badger.h" just do a

  • urpmf badger.h


and install the module that the header file lives in, then recompile.

References

    External links

    If you run into trouble subscribe to the support mailing list: http://www.mythtv.org/mailman/listinfo/mythtv-users/

    Personal tools