MythTV Ubuntu Installation Guide - Part 2



Introduction

Welcome to part two of my guide on installing MythTV on Ubuntu Linux. It's assumed that you've followed part one and got the basic system working. Now we'll concentrate on some of the additional components.

MythTV Plugins

As well as the core TV functionality, MythTV has a large number of plugins which add features such as music and DVD playback, a web interface and DVD archiving.

As usual with Ubuntu, installing all these features is as easy as...

sudo apt-get update
sudo apt-get install mythplugins

This installs the following packages:

MythWeb

MythWeb is the web interface for MythTV. It's a great way to manage your recordings as the interface is much higher resolution than on your TV. I've even got my system setup so that I can connect to it across the internet and set things to record!

Browse to http://yourhost/mythweb and you should see the MythWeb pages:


MythVideo

MythVideo is used for playing video files which were not recorded by MythTV, such as home videos and downloaded AVI files. It scans your video collection in /usr/lib/mythtv/videos, including all sub-directories. The default path can be changed in Utilities/Setup->Setup->Media Settings->Video Settings->General Settings.

MythDVD

This plays DVDs through the Myth Frontend interface. See the next section on installing restricted drivers if you want to play encrypted DVDs.

Restricted Formats

As with many Linux distributions, Ubuntu likes all software to abide by its open source license terms. However, due to complications with patent and copyright restrictions, proprietary formats and drivers are necessary. This includes MP3s, DVDs, Flash, Java and the like. It is still very easy to get it all working, just follow the instructions on the following page:

Remote Control

Here we'll look at getting the remote control that comes with the Hauppauge Nova-T working using the LIRC package. Contrary to almost everything you'll read on the web, this can be done without compiling LIRC.

Kernel Drivers

The remote control should be recognised by the standard Ubuntu kernel. Check it by running:

cat /proc/bus/input/devices

Look for an entry like this one:

I: Bus=0001 Vendor=0070 Product=9002 Version=0001
N: Name="cx88 IR (Hauppauge Nova-T DVB-T"
P: Phys=pci-0000:00:0f.0/ir0
H: Handlers=kbd event2
B: EV=100003
B: KEY=108fc000 100822 0 0 0 0 18000 4180 4801 9e0000 7bb80 0 10000000

The important bit is the event2 line. This shows us which input device the remote is using. Test it by connecting your infra-red eye, running the following command (change the event device to match your system) and pressing some buttons on your remote:

sudo evtest /dev/input/event2

LIRC

We now need to install lirc - this takes the events from the device and passes them on to the applications:

sudo apt-get update
sudo apt-get install lirc

As usual, we'll give it a quick test. Run the following command in one window...

sudo /usr/sbin/lircd -H dev/input -d /dev/input/event2 -n

...and the following command in another:

irw

Press some buttons and you should see the events displayed in the lircd window.

LIRC Config

LIRC needs some config to tell it how to translate the events from the remote. The best place to find the configuration file for your remote control is on the MythTV WIKI. For example, here's one for the Nova-T 500:

I found a config which works with my Hauppauge Nova-T single tuner remote on Mark Longair's site:

Note: on the latest Nova-T cards, the codes have changed. If you find that your 0-9 keys don't work with the above files, try this alternative config: lircd.conf.2 (Thanks to Claus Holst). Copy it to /etc/lirc/lircd.conf

Copy lircd.conf and hardware.conf into /etc/lirc. lircd.conf maps the keys from the Hauppauge remote into event strings. hardware.conf tells lirc which device to use (such as /dev/input/event2). Once these are installed, lirc should startup automatically after a reboot. irw should give a list of the translated events - run it and press some more buttons:

sudo /etc/init.d/lirc start

irw
000000008001004f 00 1 hauppauge_nova_t_uk
0000000080010050 00 2 hauppauge_nova_t_uk
0000000080010051 00 3 hauppauge_nova_t_uk
000000008001001c 00 OK hauppauge_nova_t_uk
00000000800100ae 00 Back hauppauge_nova_t_uk
00000000800100cf 00 Play hauppauge_nova_t_uk

Now all we need to do is tell the applications how to interpret the lirc events. To do this, the lircrc files needs to be in two locations: ~/.lircrc and ~/.mythtv/lircrc. The best method is to use a symbolic link:

cp lircrc ~/.lircrc
cd ~/.mythtv
ln -s ../.lircrc lircrc

The included config has events for xine as well as mythtv. Run up mythfontend and try it out!

Note: If you have problems with the /dev/input/eventN device changing after each reboot, take a look at how to make the device static on my MythTV Tips page.


Leave a comment.