Jump to content

Linux Home Theatre PC


seti

Recommended Posts

Long read...

http://www.extremetech.com/article2/0,1558,1814924,00.asp

Build Your Own Linux Home Theater PC

Linux is one of the most remarkable phenomena in the recent history of personal computing. In some ways, it's similar to the original homebrew PC movement of the late 1970s and early 80s. Equal parts cool kids club and grass roots revolution, Linux in its many different forms has proven itself a force to be reckoned with. A highly configurable OS that can both scale up to big enterprise iron and down to handheld devices, Linux can do almost anything. It even powers the most well-known PVR on the planet, TiVo.

Now that we've heaped that glowing praise on this modern computing wonder, we have to throw a rock or two at it. A number of distributions like Xandros, Linspire, and Lycoris have made very big strides toward making Linux easy to install and use by less technical users who just want to get their stuff done, and not twiddle with source code, .conf files, and kernel modules. Linux has also made some good strides toward being an interesting alternative to Windows Media Center Edition (MCE). But obstacles remain--lots of them.

So, before you embark on trying to build a Linux-based Home Theater PC (HTPC), you have to ask yourself a question: "How much time do I have to dedicate to bringing up a Linux-based HTPC?" If the answer is "not much," then a Linux-based HTPC is probably not something you should build. Assembling the hardware is pretty easy, and the physical assembly process takes a half-hour to 45 minutes. Installing the OS can be a very straightforward affair as well. But installing extra drivers as well as installing and configuring a PVR media application (and its required packages) are not trivial tasks, and the road ahead is laced with hidden potholes.

To paraphrase one forum quote seen during the research phase of this piece: "Buy the beer first, this ain't gonna be easy." But there is some good news here too. Getting a Linux-based HTPC has probably never been easier, though that is admittedly damning with faint praise. So here then is the tale of our ongoing adventure toward building a Linux-based HTPC.

In fairness, we should say that an HTPC has to cover a lot of bases--and cover them well. These include:

* Store music, home movies, recorded TV shows, digital photos

* Play back all these media seamlessly

* Support a wide variety of audio and video codecs

* Play back DVD movies, and look as good as or better than a DVD player

* Support the playback of DRM-encoded purchased/rented movies and music

* Serve this media up to other client machines on the home network

* Have a simple GUI that any family member can use

* Be rock-solid stable 24/7

* Go in and out of sleep states with no difficulty

* Run quietly enough so that its fan noise doesn't interfere with the enjoyment of the content it's serving up

* Be able to handle HD music and movie formats, both present and future, with minimal upgrades (okay, maybe we're reaching a bit on this one)

When you stop and think about it, that's an awful lot of functionality for just one machine, but a good HTPC should do all these things with minimal muss and fuss. Off the bat, a Linux-based HTPC won't be able to easily (or legally) play DRM-encoded content, which isn't to say you can't do it. The issue of coming in and out of sleep states points to a bigger issue: Should a PC be in your component rack at all? We think so, simply because no consumer electronics (CE) device can come close to the PC's versatility and configurability. Most of the CE industry's attempts at more powerful devices have been pretty disappointing to date, not to mention very expensive and not very flexible.

DVD playback is a thorny issue, mostly because of the legalities revolving around DeCSS and the use of libraries that embed the questionable cracked Xing decoder key. So we'll avoid the question in general, but there are good Linux-based software DVD players out there. For more information, check out Jon Kent's mini-roundup of Linux DVD players at Linux Journal.

Windows MCE has evolved quite well towards covering these bases, and it includes a remote control specifically designed to drive its UI. But if your goal is a Microsoft-free home, then this is the option of last resort. That said, it's not an option you should rule out. As we stated in Part 3 of this series, we at ExtremeTech are more pragmatists than ideologues. We like Linux just fine. But we're more of the "right tool for the job" school of thought, and despite the heat we knew we'd take for the position, we stated that for gaming you should dual-boot a system between Windows XP and Linux for the optimal gaming experience.

Given the repeated difficulty we've had trying to build a Linux-based HTPC, we've reached the conclusion that a Linux-based HTPC can be a fun project, but don't enter into this endeavor some morning thinking you'll have a glitch-free HTPC by day's end. You're likely in for is a lot of tweaking, twiddling, some frustration, a few choice expletives, and if you're persistent enough, a working HTPC.

The Candidate Applications and Components List

At present, there are really only two media front-ends to consider for a Linux-based HTPC: MythTV and Freevo. Each has its own upsides and downsides, and each requires pretty attentive care and feeding to get working. MythTV is the more integrated of these two packages, and our research for this story showed that Linux users have gotten it running on a number of different distros, including SuSE 9.2 and Red Hat Fedora Core 3.

We've been following with some interest a project/distro called KnoppMyth, which takes the Knoppix distro, and integrates MythTV into it. So when you install KnoppMyth, you get both an OS and the MythTV PVR package with all of its dependencies already taken care of. MythTV relies on the open-source MySQL database for its electronic program guide (EPG) listings, and we've had trouble in the past getting MySQL happily running and MythTV able to talk to it. But to KnoppMyth's credit, we were able (with some hacking and hewing) to get a Linux-based PVR most of the way up and running.

Before we fired up the install disc, there was the small matter of choosing our components. When dealing with Linux and multimedia, go with established hardware with good driver support. There are certain hardware devices that have much better support for Linux, largely coming from community driver development. For instance, full driver support for recent vintage All-in-Wonder cards is a hit-or-miss affair, and because all but the most recent ATI TV tuner cards lack a hardware MPEG-2 encoder, these are probably best avoided as well. What does Linux like? Hauppauge's PVR-250 and PVR-350 cards are supported through the IVTV driver stack, which is rolled into the latest drop of KnoppMyth. For audio, we used a Sound Blaster Audigy 2, though most any Sound Blaster will work for this application.

Here's the load-out for our Linux PVR system:

Component Price

CPU Pentium 4 540 (3.2GHz) $200

Memory 512MB PC3200 DDR SDRAM $50

Motherboard Intel D915PYSL $105

Case Silverstone Lascala SST-LC13-B $100

Graphics Card MSI NX6200TC-TD64E Geforce 6200, (64 MB) $80

TV Tuner Card Hauppauge WinTV PVR-250 $135

Sound Card Sound Blaster Audigy 2 Value $55

Hard Drive Western Digital WD2500JD 250GB S-ATA $135

Optical Drive Lite On show-1213-S DVD+/-R/RW $65

Keyboard/Mouse Logitech Cordless MX Duo $65

Remote Control StreamZap USB Remote $30

TOTAL $1,020

We've found that Nvidia has historically had better graphics drivers for Linux, and while ATI has made some strides in this area, we're going to stick with Nvidia for now. Because the emphasis here is video and not 3D, we were able to go with the more modest GeForce 6200 GPU with a 64MB frame-buffer. There are some other places you can get away with less hardware if you really want to shave your costs down. For starters, you could get a lower-clocked CPU like the Pentium 4 505 (2.66GHz clock), which goes for around $60 less than the 540 we've spec'ed here. However, those extra clock cycles will come in handy when you go to transcode media on this system. You could also repurpose any mouse and keyboard you happen to have lying around, which lowers the price another $65. And the remote control, while very handy, isn't essential for driving the MythTV UI.

The Installation/Configuration

KnoppMyth's documentation states that if your hardware is Linux-compatible, you may not need to install drivers, and as advertised, the hardware we used required no additional driver installations. That said, we couldn't get our USB-based StreamZap remote working, which is supposedly supported under LIRC (Linux Infrared Remote Control).

The base installation process involves all of five steps, where you choose the type of installation you want, enter your username and password, the root password, and confirm that you want to blow away whatever's currently on the hard-disk. After that, the rest of the installation goes along unattended until KnoppMyth is ready to reboot. You then run the myth-tv setup application, which ultimately puts you into this screen:

Now, before you proceed, we suggest using another machine and go to the Zap2It site to set yourself up an account for obtaining XMLTV electronic program guide (EPG) information for free. This is a little tricky, in that you need a Certificate Code. Apparently, projects like MythTV have Certificate Codes, and after a quick Google search we found one that worked. To save you that trouble, it's ZIYN-DQZO-SBUT.

From here, you need to define your video capture card in the Capture Cards section. Since we're using a Hauppauge PVR-250 TV tuner card, you select "MPEG-2 card (PVR-250/350)" from the drop-down list. You also select the default input (TV tuner, S-Video input, composite input). This is obviously important, since you may be feeding a cable/satellite set-top box's output into the Hauppauge card's input.

Next, you need to go into the Video Sources section to create and configure your feed. This config includes getting EPG data from DataDirect (zap2it), as well as whether your incoming feed is broadcast or cable and which country you want EPG data for. When you've finished, just hit Esc and you'll exit from this application. Next, the MythTV configurator incorporates your settings and starts both the MythTV back end as well as the front end. Though we didn't have time to explore it, you can run a MythTV back end on one system, and access it over your home network using the MythTV front end on another box.

Up and Running...Mostly

After our installation, here's what we had working (and not working):

What works:

* Ripping CDs and playing music

* Playing back video and watching TV

* Walking the EPG grid and setting up TV show recording

* Getting the latest weather using the built-in weather module

* Navigating through the media library and playing music and videos and viewing digital pictures.

What doesn't work:

* Commercial, encrypted DVDs won't play unless you load the libraries that enable playback of encrypted content.

* We couldn't bring up the color, brightness, or contrast adjustments for playback during TV viewing. We could adjust these settings for recording, but these are independent of the playback settings.

* StreamZap remote didn't work. (It seemed we needed to tweak the LIRC config file to specify this particular remote control.)

* DRM-protected content won't play on this system (this will require quite a bit of futzing to "enable," and this functionality will in all likelihood be technically illegal).

Getting to this point was actually not too painful. KnoppMyth is a Debian-based distro, built around the Sid code base. It includes the Synaptic package manager that makes installing additional applications very easy, although entries for the newly installed apps aren't created in the desktop menu. We wound up installing the Firefox web browser and the gedit Gnome-based text editor for twiddling .conf files. But we had to launch them from a command line. KnoppMyth's GUI, outside of the MythTV interface, consists of a single set of menus invoked by right-clicking on the desktop.

Final Thoughts/What to Build

At the end of the day, building a Linux HTPC is much more of a software than a hardware exercise. The real devilish details lie in getting KnoppMyth to fire on all cylinders. However, to its credit, the KnoppMyth team has clearly logged some long hours getting this distro whipped into shape, though some rough edges do remain.

Among his many insights, Ghandi once said "You must be the change you wish to see in the world." In a similar vein, the Linux community generally believes that if you don't like something about Linux, fix it/build it/add it yourself. To that end, if we had the time, our own MythTV-focused distro that we'd call ExtremeMyth would have the following additions:

* A MythTV specific menu in the main desktop menu with complete documentation in a GUI-based app (not a man-based text help file)

* A graphical LIRC configuration tool to choose which remote you're using

* A more intuitive video "routing" configuration screen, including an easy way to switch the video output in use

* A GUI-based audio mixer

* A utility (kind of like Synaptic) to show which audio/video codecs are (and aren't) installed

* Firefox and Gedit included, though these are easily obtained via KnoppMyth using the included Synaptic package management tool.

* About every six months or so, we'd also spec out a known good hardware configuration, that if built, would bring up ExtremeMyth with near-zero configuration twiddling.

And so ends our four-part Microsoft-free odyssey. If you wish to make your computing life a Windows-less one, it's very doable, and you will have very able systems on your home network. But as we pointed out in Part 1, a Microsoft-free existence is not without its downsides. In particular, Windows is still really where the PC gaming action is. Applications like Cedega do allow you run a number of Windows games under Linux, but we still recommend having one dual-boot machine on your home network for gaming. You also give up content subscription services that use DRM-encrypted Windows Media formats. If you don't use these services, then there's no real loss here.

Pointer Graphic for FingerlinksClick here to read more Linux articles.

In the final analysis, it comes down to choice, and you should use the platform you want to use. If you want to run an Apple-based home, then get your Mac on and be happy. If Linux is your bag, then load your favorite distro on your home's systems and may the source be with you. But, it may be the case that you actually (*gasp*) like Windows, and have decided that it is your platform of choice. And as far as we're concerned, all three are perfectly valid options. The choice is yours.

Link to comment
Share on other sites

Then you have tried both? I was hoping to find someone familiar with it.

I was think of cost/performance as you you don't have to pay for the OS and a kernel can be compiled to a small custom size which increases performance so you don't need as much machine to run it with. I don't have a home theatre yet but I just thought this was rather interesting. I am building a linux wireless open source security system for my house so after that perhaps I'll work on the HT.

Link to comment
Share on other sites

One of the best distros for Linux is Ubuntu. It is based on Debian, which is far more strict about what goes where on your HD. The nice thing about any Debian distro is that you can install the first release, and upgrade to the newest with just a few keystrokes. Try doing that from Windows 3.0 to XP. It isn't going to happen.

But it is still user surly software. I have been trying off and on to get a multitrack audio app to install and run correctly. It just isn't happening.

For all the stones we can throw at Bill Gates and Microsoft, he (as well as Apple) has made computing easy for the rest of us.

Marvel

Link to comment
Share on other sites

For the absolute performance I wouldn't hesitate getting a Mac G5 with the ATI graphics and just use the built in digital output straight into the reciever. The purchased version of Quicktime (which allows full screen viewing) has the best picture for a dvd viewer program that I've seen so far.

And of course controlling the system would be done with a wireless keyboard and wireless mouse 2.gif

Going the PC route would be very similar.

Link to comment
Share on other sites

On 5/14/2005 5:37:25 PM Marvel wrote:

It is based on Debian, which is far more strict about what goes where on your HD. The nice thing about any Debian distro is that you can install the first release, and upgrade to the newest with just a few keystrokes.

It's good to see Debian has fans even here.

Peter, psg@debian.org

2.gif

Link to comment
Share on other sites

----------------

On 5/14/2005 5:38:01 PM DrWho wrote:

For the absolute performance I wouldn't hesitate getting a Mac G5 with the ATI graphics and just use the built in digital output straight into the reciever. The purchased version of Quicktime (which allows full screen viewing) has the best picture for a dvd viewer program that I've seen so far.

And of course controlling the system would be done with a wireless keyboard and wireless mouse
2.gif

Going the PC route would be very similar.

----------------

ya i know what your thinking....... as i sit in the HT room surfing the web on my new power mac duel g5 twin 2.7 gig, "BILLIONS AND BILLIONS" of ram and hard drive space, i KNOW what your talking about!!

although i went with the nvidia 6800 ultra ddl card, instead or the ati card

(its way faster)...and supports twin HD displays...

well, im once again im tired of the web.... i think ill play around and do a little HD vidio editing (in real time of coarse and in full sceen!!!)

by the way if you decide to do the HD vidio thing get as much drive space as you can afford!!!

22 minutes of non compressed 1080i mini dv takes up about 40 gig of drive space

and by the time you add the transitions and special effects it will eat up over 50 gigs of drive space!!!6.gif

the really amazing thing it that after you run it through the h.264 codec you can get almost 4 hours on a duel layer dvd!!!

jay

Link to comment
Share on other sites

woh there, macs support nvidia cards? If so that's a new one for me, lol. I've got the 6800 on my windows machine and it's an extremely nice card. I just haven't found a good free dvd player for the pc yet that doesn't crap the picture out...I must confess I haven't looked too hard either though 2.gif

Link to comment
Share on other sites

----------------

On 5/15/2005 2:05:41 AM DrWho wrote:

woh there, macs support nvidia cards? If so that's a new one for me, lol. I've got the 6800 on my windows machine and it's an extremely nice card. I just haven't found a good free dvd player for the pc yet that doesn't crap the picture out...I must confess I haven't looked too hard either though
2.gif

----------------

watch the apple web sight. they have a version of quicktime 7 comeing for

the windows based (pc) platform.

the quick time 7 rocks!!!

it will do HD to 480i and it all looks great, in full screen!!

and if you can find software that uses the h.264 you can make your own HD dvd's (i use fcp5)

headed down to the race track to shoot some HD video of VIPER DAYS(we have over 60 full race vipers) they have a 100 mile feature race today. should make for some great footage!!!

jay

Link to comment
Share on other sites

"woh there, macs support nvidia cards? If so that's a new one for me, lol."

Yes. Macs have drivers for NVIDIA cards, some Macs ship with NVIDIA cards by default,other you can customize to have an NVIDIA card installed. Macs and PCs both use PCI and AGP (mostly) for graphics cards, so except for some special exceptions you can just plugin an NVIDIA card into a mac and go.

-M

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...