[mythtv-users] MythTV at my place...

Colin McGregor colin.mc151 at gmail.com
Wed Dec 2 20:17:22 UTC 2009

The following is a bit of a ... rant talking about what I have been
working on with MythTV, a script written, a failed software upgrade, a
smooth software upgrade and some hardware changes... all of which are
a bit long... Still, I hope it is still of some interest to all...

KnoppMyth to Mythbuntu

When I first set-up a MythTV box, under Debian it was a PAIN to get
running and worse to keep updated. Then I turned to Knoppmyth, which
made life a lot easier. Sure the updates were infrequent, but things
basically “just worked”. This fall Knoppmyth got renamed LinHES and it
moved from being based on Knoppix to being based on Arch Linux.

As prelude to installing LinHES on my main box I installed it on my
“test” machine, which went as well as I expected. The install was
quick and clean. The only problem I had was an expected one. In the
test box was a Pentium 4 2.4 Ghz and my TV tuner a Hauppauge HVR-1600.
In other words a HDTV  tuner card in a machine I knew to be a bit
underpowered to support it, so, watching live TV meant everybody and
everything stuttered. But basically everything just worked...

Having done an test install on “bare metal” I wanted to upgrade my
“main” MythTV box. I started by running the included KnoppMyth back-up
utility, and then I ran the LinHES upgrade utility. From their things
turned weird... LinHES didn't like my hardware, then there were issues
of restoring the database. After a few hours of fighting with the
software I thought “This is supposed to be fun, what is the lowest
pain route out of here?”. This is when I decided to move to Mythbuntu
an Ubuntu based MythTV installer....

I got a new hard drive, and did a Mythbuntu install. This went well,
then there was the issue of what to do with the old collected TV shows
on the old hard disk.

By default Knoppmyth stores video files in one directory as a number,
a number that consists of the date/time/channel/tuner used to record
for each show. There is also a directory filled with simlinks where
you have human friendly titles (show title – date – time – and episode
name (if available)) linking back to the “real” files. So, what I
wanted to do was copy the video files under the human friendly name to
the Mythbuntu video directory, keeping in mind that the simlink file
pointers would now be wrong.  To manually sort out the change for a
few files would be easy enough, but in my case I was talking over 200
files, far more “busy work” than appealed to me, thus the small script
seen below.

The script below is on several levels ugly, making several assumptions
that while correct in my situation, will not be universally true.
Still this script is a lot less ugly than manually doing over 200 copy
statements... Further, it left me with an easy way to back out of any

The move to Mythbuntu 9.10

When I first installed Mythbuntu this fall I installed version 9.04.
The change to version 9.10 was basicly painless. The only issue I have
with Mythbuntu 9.10 is that some 9.04 utilities that made the set-up
of diskless clients easy have been dropped in 9.10 (grumble).

A MythTV box in 6 hours

My first “serious” MythTV box was built in a Silverstone LC-13
computer case, which like most Silverstone cases is a very nice home
theatre computer case. Then long, strange story I got a Silverstone
LC-14 case for free and I passed the LC-13 case with 1 analog tuner
card on to my Mom who lives near Ottawa. So, mother had a MythTV box
that basically acted as a play toy for me when I was up to visit. The
only  problem with the LC-13 case is that it is too big for my
mother's VCR/DVD cabinet under the TV. So, I've been looking for a
smaller solution.

I has set-up a disk-less client machine in my bedroom with a microATX
motherboard inside Silverstone Sugo SG02 case. My original plan was to
solve the above was to get a second Silverstone Sugo SG02, case,
install a cheap / free used microATX motherboard and for the cost of a
new case I would be set.

This plan went out the window in early November when I got a call that
a family friend would be driving from Thornhill to my mother's place
and could take some equipment with him, if I could have everything
ready in six hours. Since I normally go to my mother's place by VIA
Rail, the not having to carry a MythTV box had a very strong appeal.
So, with the spare parts I had on hand I put together the best MythTV
box I could, starting largely with my diskless bedroom MythTV box.
Added to that box was the Hauppauge HVR-1600 from my test machine (so
the machine will be useable as an oversized digital to analog TV
converter box). Also added was a 320 GB hard disk (for HDTV a modest
size drive, but the best I could free up on short notice).

Just over 6 hours later a DTV capable MythTV box shipped off to
eastern Ontario. Which left me with the question, what do I put in my

A new MythTV box

It used to be when I started building a PC I would always start with
asking which CPU, then what motherboard, the question of what case
fell pretty low on the list of questions. With MythTV box building one
is talking about machines that must fit in a regular household
environment and thus look great, so cases come up fairly early in
planning. On the other hand, anything from a Pentium 4 3.2 GHz on up
can support HDTV, which covers almost all new CPU chips, means CPU
concerns are a modest priority...

The reason I like most Silverstone cases is that Silverstone is in
large part ... standards based. Over the decades, not many PC power
supplies have failed on me, but it has happened often enough that any
case that requires a custom power supply tends to be a non-starter in
my books. I want to be in a situation where if a power supply fails I
can run out to almost any PC clone dealer in Toronto and for $25+ get
a workable replacement. This is where most Silverstone cases succeed
and most Antec cases fail in my books.

So, a good looking, locally available standards based case (just) big
enough to handle a microATX motherboard (the smallest commonly
available multi-vendor motherboard size) lead me to the Silverstone
GD04 case. Slightly smaller than the SG02 case with almost all the
features I liked in the SG02. The case was the most expensive single
part of this new MythTV box. The motherboard was a Asus M4A785-M.

I am sure I'm not the only person who remembers, seemingly yesterday,
dual core CPU chips as exotic, expensive technology and quad core
chips as insanely expensive, totally exotic technology. For this new
machine I bought a dual core CPU ... because it was the least
expensive new CPU I could buy, and a quad core CPU would have only set
me back $40 more... I love how things change...

During the building of the machine I though how absurd it would be to
have my fastest machine just running occasionally in the bedroom, so,
for now at least the analog tuner cards in my LC14 case got moved to
the GD04 case and the new machine is in the living room... The LC14
case is in the bedroom, a bit larger than I am happy with, but it

The oddest bit I ran into in building the new machine was an LG DVD
drive model GH22NS50 that came complete with a Windows rootkit. I
bought the drive because it was the least expensive DVD burner I could
find, and a DVD burner is a DVD burner, right? Seems not. Whenever
there was no disk in the drive, the drive would report a disk named
“Bluebirds”, a disk loaded with MS Windows software (grumble). There
is a Windows program available from the LG website that will remove
this phantom disk, software that I got running under WINE (WINdows
Emulator) under Ubuntu. A minor pain I would have been happy to do

This past fall an someone I know asked if I was done with my MythTV
box and my answer was “sort of”. Point is that there will always be
something that can be tweaked and/or improved by the addition of some
extra time and/or money. So, yes I am more-or-less happy with the
machine at present, but I am not blind to the fact there is room for

Colin McGregor


# /bin/bash
# Get the directory listing and only keep the sim-linked file names

ls -l /media/sdb3/pretty | grep "rwxrwxrwx" > tempfile

# Get rid of the first 49 characters

cat tempfile | cut --bytes=49- > tempfile2

# Create the new script header

echo "# /bin/bash" > script2
echo " " >> script2

# Create copy statements for each file to be copied

cat tempfile2 | awk -F " -> /myth" '{ print("cp /media/sdb3" $2 "
\"/var/lib/mythtv/videos/" $1 "\"" ) }' >> script2

# Wrap up script

echo " " >> script2
echo "chown mythtv /var/lib/mythtv/videos/*" >> script2
echo "chmod 664 /var/lib/mythtv/videos/*" >> script2

chmod 755 script2

cat script2

More information about the mythtv-users mailing list