Mythbuntu

Introduction

I decided to install MythTv on the Linux box to try and get a bit of Personal Video Recorder (PVR) going. I’m using Gutsy 7.10 desktop for this install. I only have terrestrial TV in my room so I won’t be able to test Sky or Cable TV. I have looked into freeview but Eastbourne hasn’t been switched over completely yet.

MythTV + Ubuntu = Mythbuntu

Mythbuntu Logo
I did some research on how to install MythTV ontop of my desktop vanilla install of Ubuntu. The Ubuntu Community Pages came up and it had instructions for all sorts of install scenarios from backend only to full desktop, back and front install. Also there is a MythTV Control Centre which puts all the settings in one place. The only problem I haven’t figured out yet is how to install a MythTV backend on a headless and Xorgless server.

My Hardware

My MythTV hardware are as follows:

I have the Windows and Linux OS on each of the 80GB Segate HDDs. One 320GB Western Digital HDD is mounted as the home directory and the other 320GB is mounted as my storage HDD. The latter will be used to hold the TV recordings. You have to prepare your storage location before you go into the setup. I had contemplated on setting up a NFS file system to serve the records but thought this would only be a temporary install and decided against it.

I chose the Hauppauge 350 because it was a better tuner to the 150 and at the time the 500 Linux drivers were not 100% stable. I had bought the hardware back in 2006 but hadn’t had much luck with it on Dapper Drake (6.04). It is key to get a tuner that is supported by MythTV. It goes without saying that at this point in time nVidia has better Linux drivers than ATI and I am a nVidia fanboy so the graphics card narrowed down. The Fanless option was just to make it quieter because it was going to be in my room. The Microsoft Media Centre remote and IR reciever was probably the best combination at the time. It also worked with Linux but back in 2006 it needed some manual labour to get it to work.

MythTV Architecture

MythTV Architecture

MythTV uses the Client Server hybrid model which means you can have one machine running the backend and multiple front end computers. This means the ideal setup would be a beefy machine hidden in the closet will do the recording, transcording and commercial flagging which is generally CPU intensive or tuner card intensive and small thin clients to run the front end to control the backend. The client computers can be added and removed as needed because it will only need to know where the main server so MythTV can be in every single room in the house as long as there is a network connection.

I say Hybrid because the MythTV backend is clever. You can add up to 4 (as far as I can tell) slave servers which are used to do load balancing when it comes to transcoding and commerical flagging. Other tasks can be passed off to these servers like running custom scripts and filters. This means it’s slightly clustered (not truely because they can’t run independantly). Slave servers can be added and removed independantly but it’s not designed to be done as easily as adding front end clients.

Install & Setup

Mythbuntu Control Centre

It is best to try and set MythTV up with no other programs running and during one sitting. It may lock up form time to time like it did for me scanning for channels. Following the community pages made the install very easy. After installing the control centre using:
apt-get install mythbuntu-control-centre
everything else is automated like the setup of the database and LIRC services for an IR remote. I chose the front and back end install. After it had finished downloading and installing it the setup for the MythTV backend started up. This is where all the settings controlling the server side of MythTV is configured. Again following the Ubuntu Community pages the setup was a breeze.

I did encounter one problem where the terminal kept throwing error messages for accessing the database because I was going to expand my setup I entered the reserved static IP for my linux box. This meant any requests from the front end would be sent to the router and back to the same box instead of using the 127.0.0.1 loopback IP. I was using MySQL database for MythTV and it was configure to only allow local connections. To enable remote access edit the my.cnf config file:
sudo gedit /etc/mysql/my.cnf
Comment out the line
bind-address = 127.0.0.1
with a ‘#’ (hash):
#bind-address = 127.0.0.1
If the MythTV back and front end are setup to use “localhost” or “127.0.0.1” then this step should not be necessary to get it running.

Also it is important to get a good signal. On playback it is very noticable because it gets blown up to fullscreen. Audio pops and hiss’s can be annoying too. I don’t have access to the roof ariel so I had to make do with a boaster ariel which makes BBC2 and Channel 4 not 100% ideal.

TV Guide

MythTV has some built in scripts for download XML type guides called XMLTV. For the UK it uses the Radio Times site. You have to install additional XMLTV grabbers with apt-get:
sudo apt-get install xmltv xmltv-util
To set up the correct channels for the guide was very tedious. The Radio Times has many channels and running the script in the terminal meant going through all of them and marking a “Y” or a “N” for the channels. You have to know the different regional differences like “BBC1 Southern” and “BBC1 South East”. To start this process you have to create a source and get it to scan / update the source. It then goes to the terminal where you have to answer the “Y”s and “N”s but because the setup GUI is ontop of the terminal you have to + it to make it visible or move the terminal to another virtual desktop.

IR Remote Control

After I MythTV was running I tried to get the Microsoft Philips Remote (Model: 1039). This is the “old” model and is supported by MythTV. In the Control Centre it is listed in the remote list but it didn’t work. I tried the new and old settings but both didn’t work. The IR reciever lights up when a key is pressed so it is working.

I had to drop to command line to see if the buttons pressed were being recieved by the computer. With LIRC configuration configured properly (which Control Centre should do) I typed in the following command:
irw
The terminal will not print anything and wait for IR input. Pressing any button on the remote should print the IR value of that button in the command line which in my case it did. This meant the computer was getting the IR signal too. In the end I gave up and kept the USB IR reciever and the Hauppauge WinTV-PVR-350 remote instead. Most of the buttons work but the power buttons do not for example I need to go throught LIRC configuration file to map the button properly. I may cover this in a later post.

Features

MythTV Start Up

After the install and starting up the frontend from the Applications > Sound & Video menu. When it starts up it goes through scaling the images to the screen size. Whilst it usually takes a couple of seconds it is annoying that it does it everytime even if the screen size hasn’t changed. If the frontend was up all the time it would’nt bother me.

The default theme is ugly. It works and does the trick but it’s a grey and orange theme. I quickly changed it to a nicer blue which is somewhat similar to the Windows Media Centre Skin. Even the OSD can be skilled with different alpha (transparency) levels.

The commercial skipping is so good! It works 100% on ITV(Channel 3) but doesn’t 100% work on Channel 4. The BBC channels don’t have adverts during a program.

It works with Compiz Fusion enabled and is to be able to cube to another desktop if it freezes like it did when it was doing a channel scan during the backend set up. A quick kill command sorted it out and started it back up to try again. I have had it locking up the whole computer before but simply hard resetting didn’t cause too many problems for me.

MythTV TV Guide

The T.V guide is pretty standard and similar to the Sky TV interface. The recording scheduling is a lot more flexible than Sky+ (Plus) becuase it can record:

Recording Options

The default time can be set for all shows but can be tweaked individually whilst in the recording setup. Jobs can be set to transcode and do commercial flagging as well and various other settings.

A neat layout not seen before on other PVR systems is the program finder. It lays out all the shows from the XMLTV (which is up to 7 days on Radio Times feed) into alphabetical categories and then you can view the summary as well as set the option to record the shows. The benefit of this layout is that you don’t have to scroll along a timeline to see all the shows.

Rewind MythTV

The usual pause rewind and fastforward functions are built in to the MythTV. There is a 1-3 seconds delay when watching live. The only way you can tell is if you have a normal T.V that you can see or hear in the same room as the MythTV. The lagg doesn’t cause any visual or audio problems. Also it can do the normal DVD playback within MythTV or play video files on the computer.

Plugins

There are loads of plugins for MythTV from DVD archiving to web streaming. The screenshot below shows the weather forecast using a RSS feed.

MythTV Weather

There are a list of plugins inthe control centre so they don’t need to be downloaded, installed, configured manaully.

MythTV Player

MythTV Player

To enable Windows users to view recordings on a Myth server there is the MythTV Player. It’s a simple video player that connects to a backend. It runs very well and does it’s job. Even streaming over a wireless g network it only buffers couple of times for a 30 minute show.

The MythTV Player like it’s title only plays recordings back. It doesn’t not play live TV. I don’t know if it plays partially recorded programs either.

Future

I hope to expand the setup to the living room. I don’t want a massive box sitting in the living room huming when it’s doing it’s thing so a small ITX like computer would be used to stream the content to the TV. The client server architecture of MythTV allows one main backend serving multiple clients. The only caveat to this is getting an network cable from the router/switch to the living room which not all houses have.

Recording Sky or cable TV is also a dream. There are cards for these but the newer ones lack compatible Linux drivers. Freeview is possible but not in the area I am currently living in without a dish and a DVB tuner card.

Mythbuntu Install Community Page
MythTV Player Official Site
Tom’s Hardware article of MythTV

About Danny

I.T software professional always studying and applying the knowledge gained and one way of doing this is to blog. Danny also has participates in a part time project called Energy@Home [http://code.google.com/p/energyathome/] for monitoring energy usage on a premise. Dedicated to I.T since studying pure Information Technology since the age of 16, Danny Tsang working in the field that he has aimed for since leaving school. View all posts by Danny → This entry was posted in Games, Linux, Windows. Bookmark the permalink.

One Response to Mythbuntu

Leave a Reply

Your email address will not be published. Required fields are marked *.

All comments must go through an approval and anti-spam process before appearing on the website. Please be patience and do not re-submit your comment if it does not appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.