How to build the ultimate MythTV box
2nd Apr 2009 | 09:00
Custom build great-looking kit to put next to your television set
MythTV is a software project that's so staggeringly complex and supremely capable that we could write a 12-volume encyclopaedia on its use that would still need bi-annual updates. But the software is only half the story.
You may start out using your ordinary desktop machine for MythTV experimentation, but as soon as you get hooked, you're going to want some custom-built kit to put next to your television set.
The problem is that not only do you have to run the usual gauntlet of Linux compatibility, you've also got to consider hardware that works well with MythTV. When you combine this with a requirement for a discreet, quiet case that can fit enough processing power to record and playback multiple television streams, you've got a puzzle almost as complex as the software. And it's a puzzle that we're attempting to solve here, as we pick out the best and most cost-effective components we can find to build the ultimate MythTV box.
MythTV's functionality is split into a front-end and a back-end process. The front-end is far less CPU-hungry, and is responsible for displaying video. The back-end eats resources as it makes multiple recordings and manages your media resources, while sending video to each front-end on your network.
In an advanced setup, both of these processes would run on different machines. This would enable you to have a quiet, low-power device next to the television, and a larger server-type machine secreted somewhere where you can't see or hear it. But this configuration is costly and complicated.
Start with the case
Fortunately, you can also run the front-end and the back-end on the same machine, and that's what we're going to do. The trick is getting the balance right. The best place to start is with the case. Its size and capabilities define which other components you can and can't use, and unfortunately, getting your box to be small and neat is difficult. The smaller your case, the more expensive the bits you put inside them become, and the harder it is to fit everything in.
Your case choices are going to affect what can and can't go inside them. You could opt for a diminutive dual-core Intel Atom machine, for example. But these are still relatively poor performers when compared with a standard desktop. At the moment, the best option is still to use a full-fat processor specification, and to get that into a box you can sit next to your television, you need the case equivalent of a Victorian corset.
These 'corset' cases are common enough that they've spawned their own genre – the HTPC (Home Theatre PC). Each HTPC attempts to cram as much hardware as possible into a box that wouldn't look out of place next to a Hi-Fi, Blu-Ray player or games console. Some will offer an LCD display, or a remote control. But you will always have to trade expansion potential against size. The smaller your case, the less flexible it's going to be.
Getting that compromise right is the first difficult decision you need to make. We went for a Lian Li PC-C37. This is a matt black aluminium case that measures only 9.4cm high, 43.5cm wide and 27.8cm deep. That's bigger than the average set-top unit you buy on the high street, but it's a lot smaller than the average PC.
The height is also going to affect which expansion cards you can fit, as full size cards are too tall for the Lian Li case. A PCI Express riser, for fitting a full-size card at a right angle, is included with our box, but that still limits you to a single expansion. This may limit your options if you want to use a full-size graphics card and an internal television card at the same time.
The front panel is very sparse, with only audio, USB and FireWire connectors placed in the middle for convenience. A 5.25-inch optical drive bay slots into the top right of the panel, and there's room for two 3.5-inch drives within.
The vital thing to get right when buying a case is that it fits the motherboard you want to use. These come in several different form factors, from the standard-size ATX, used by most desktop and server machines, to mini, nano and micro ITX boards used within Apple-TV size computers.
You also need to make sure your case includes a suitable power supply for your motherboard. These are rated according to the number of watts they can output. How much you need depends on how much you're going to plug in. We'd suggest a minimum of 300 watts. But if you know your consumption is going to be less, 200-watt PSUs are quieter and cheaper.
How we built our MythTV box
There are more motherboards to choose from than there are cases, and they're not only specific to your case size, they're also specific to the CPU you want to choose. These days, that's a choice between Intel and AMD. We went with the former, as its multi-core processors are still hard to beat in terms of value for money and performance.
You also have to consider how the various components on your motherboard, such as the onboard sound or SATA controllers, are going to interact with your Linux installation. But the more components you can cram on to to the board, the less you need to worry about expansion or system capabilities. For that reason, we went with a motherboard called the Asus P5N7A-VM. It can accommodate Intel's latest Duo and Quad-Core processors, four sticks of dual-channel DDR 2 memory, and includes Asus Express Gate instant-on Linux for troubleshooting and browsing, but there are two specific reasons why this board is a great choice for an HTPC.
Firstly, it includes an embedded graphics chipset – and not a rubbish one, either. Nvidia's GeForce 9300 GPU is bolted on to the motherboard, and you should be able to expect graphics performance to equal Nvidia's 8400 GPU running on a separate card. And because it's embedded, there's no fan and it doesn't require an expansion slot.
The second reason we've chosen this motherboard is for its connectivity. The onboard graphics can be pumped to your display using either VGA, DVI, HDMI or the shockingly new DisplayPort format. That means you'll be able to simply connect your PC to almost any monitor, television or high definition panel using no more than the correct cable. Excellent connectivity doesn't stop there, though. There's digital optical and analogue audio output, eSATA for external drives, RAID for internal ones, and plenty of USB 2 ports.
You'll also need to think about how you're going to connect the machine to your network. MythTV can still work without a network connection, but it makes things easier if you can manage your machine remotely. Our motherboard sports a speedy Gigabit Ethernet connection.
With the case and the motherboard sorted out, the only decisions left to make are what to attach to the motherboard. You'll need an optical drive for DVD/CD media, and our case takes a standard 5.25-inch model. Smaller cases may require a slimline model – the same as those found in many laptops – and these are more expensive than those with standard dimensions. Of course, if you get a re-writeable drive, you'll be able to archive recordings from MythTV.
Our case has enough room for two 3.5-inch hard drives, which can be configured using RAID for either redundant backup or a performance boost. There are now many drives available with over 1TB of storage, and this should be more than enough for normal use. Standard-definition television takes up around 1GB of space an hour, while high-definition is around 5 or 6GB, depending on the quality of the transmission. With enough space for two drives, you could always upgrade at a later date.
Then there's the CPU. Your choice really depends on your budget, but we'd recommend something moderately capable. We went for the new Intel Core 2 Duo E8400, a processor with two cores clocked at 3GHz. It's a powerful CPU that's great value for money.
To go along with the CPU you'll also need some memory, which is incredibly cheap these days. We went with 2x1GB of quality RAM, but you could easily double that for a little extra performance overhead. Two identical sticks are better than one because they can be used in something called 'dual-channel' mode, a speed enhancement that shares memory access across the two sticks.
Grabbing transmitted television channels is likely to be the most important function for your MythTV box. This means you should spend some time finding the best grabbing solution for your setup. There are three broad approaches: analogue, manual input and DVB.
Analogue - Analogue television transmissions are being phased out, and we wouldn't want to recommend building a new system to receive an old technology. But if this is the only option available to you, look for one of the older terrestrial WinTV devices, or generic cards built around the bt87 chipset. These should work without too much configuration, and MythTV will happily search and tune any channels you're lucky enough to receive.
Manual input - This approach is the only one available if you're using an external set-top-box for television reception. The set-top-box could be a proprietary cable or satellite receiver, for example, and the only way you can get the signal into your MythTV box is by manually capturing the output. It's the MythTV equivalent of using an old video recorder, and it's the most labour-intensive and most restrictive method for recording television.
You need to use a video grabbing device, such as a Plextor ConvertX or the video input on a Hauppauge WinTV 350 card, in combination with an infrared transmitter that changes the channel on your set-top box when MythTV wants to make a recording. This means no-one else can watch another channel at the same time, and if they try, MythTV will record the wrong programme. Serial transmitters, Microsoft's Media Centre Remote transmitter, the Hauppauge PVR-150 bundled device, and generic USBUIRT transmitters are all supported by Mythbuntu and can be used to change channels on your external device.
Digital - DVB is the best quality, the easiest, and by far the most common solution for a trouble-free setup, at least in Europe and Australia. DVB is the digital television broadcast standard, and DVB-compatible hardware will grab an exact copy of the digital television broadcast. This is normally some variant of an MPEG2 stream, which can then be played back without any degradation in quality. And it should theoretically be the same for high definition channels, such as BBC HD broadcast in the UK.
But high-definition is still rather experimental within MythTV, and you should only consider this as a later upgrade option, rather than a working solution.
Freesat vs Freeview - Another advantage to DVB hardware is that MythTV can automatically scan and add channels and the electronic programme guide – used to schedule programmes – is embedded within the transmission. This avoids the extra hassle of configuring an XML channel feed, or purchasing third-party channel data. The downside is that the EPG embedded within a DVB transmission is usually only for the next seven days.
DVB-T for digital terrestrial and DVB-S for digital satellite are both well supported by Linux and MythTV. Which is best will depend on your circumstances and the channels you want to receive. In the UK, for instance, many people can't get digital terrestrial (known as Freeview) transmissions because of their geographical location, leaving DVB-S (known as Freesat) as their only option for digital television reception. The selection of channels on both is broadly similar, but there are significant differences. Channels such as Five Live, Five US and Men & Motors are only available on Freeview, whereas BBC HD is only available on Freesat.
Most DVB-T devices use USB, which can be a problem if you want a self contained box. In that case, we'd recommend keeping one of your motherboard's USB connectors internal, and attaching the USB DVB-T device to the USB port inside the box.
DVB-S devices, on the other hand, are nearly always PCI cards that slot directly into the motherboard. You then need to make sure the card isn't too high for the case. We used the TechnoTrend DVB-S/WinTV Nova-S card (both use the same hardware), as Freeview reception in our cluttered office is rubbish. For DVB-T, we'd recommend its PCI equivalent, the TechnoTrend TT-1500 PCI card that won our Roundup comparison.
Most people don't want to sit in front of the television with a keyboard and mouse on their lap, which makes the remote control you choose almost as important as the case. You may find yourself stuck with the remote bundled with your TV card. Hauppauge devices are particularly good for this, and many include a remote that works faultlessly with Linux and MythTV.
Hauppauge remotes aren't the best-looking, though, so you may want to use something else. A good solution is to use a custom built infra-red receiver on your MythTV box. You can buy these or build them yourself, and when attached to a spare USB port, they enable almost any infrared remote to be programmed to control MythTV. This is particularly useful if your TV remote is of the multi-device variety, because it means you can shoehorn one of its device configurations to control the MythTV box.
Custom receivers can normally transmit infrared signals too, which is convenient if you need to control an external set-top box. At the heart of this ability is Lirc, the open source infrared daemon that MythTV uses as the foundation of its remote control. If you're looking for a slightly esoteric configuration, or trying to get a non-standard remote to work with Linux and MythTV, the Lirc homepage should be the first place you check for compatibility: www.lirc.org
CPU: Intel Core 2 Duo E8400 - Price: £141.90
Motherboard: Asus P5N7A-VM - Price: £93.35
Case & 300W PSU: Lian Li PC-C37 - Price: £148.35
Memory: 2GB Corsair PC6400 - Price: £28.34
Hard drive: 1TB Hitachi Deskstar - Price: £73.72
DVD RW: 22x Samsung - Price: £14.93
Put it all together
When you've got all the hardware together, the next step is to put it all into the box. Even if you have no experience in building your own PC, you should find each step straightforward. These days, PC building doesn't require any particular skill. Just take your time with each step and never force a component into a slot or socket – especially the CPU and memory.
You should also ensure that no electrostatic is transferred from yourself to the delicate components you're fitting, either by grounding yourself to a plugged-in metal case by touching it, or using an earthing wrist strap. And don't forget to let us know how you get on in the comments!
First published in Linux Format, issue 117
Liked this article? Then check out Hack your Linux satellite box and access it online
Sign up for the free weekly TechRadar newsletter
Get tech news delivered straight to your inbox. Register for the free TechRadar newsletter and stay on top of the week's biggest stories and product releases. Sign up at http://www.techradar.com/register