Home arrow Game Systems arrow Xbox arrow Building Home Theater PCs 21 March 2010  
Main Menu
Home
News
Forums
Downloads
Contact Us
Search i-hacked
Become a Member
- - - - - - -
Computer Components
Consumer Electronics
Electronic Projects
Game Systems
Cell / Phone
Car / Home
Misc
- - - - - - -
Info and Contests
Reviews
About
Login Form





Lost Password?
Latest Edge
Advertisement
Privacy Policy
Vote for us in Top 100 Security Sites
Click here to Vote!
Newsflash
Building Home Theater PCs Print E-mail
Written by Syngress Publishing   
Saturday, 05 February 2005

The following is an complete tutorial from the book "Hardware Hacking: Have Fun While Voiding Your Warranty" by Syngress Publishing.

An oversimplified definition of a home theater PC (HTPC) is a customized computer that connects to your entertainment system and is used to play video and audio information. A more complete definition could include discussions about specific functions, such as DVD playback, video capture, CD ripping, and many others. We cover these functions in this chapter, but for now let's just say that there are as many different types of HTPCs as there are HTPC builders. Examples of commercial, pre-built HTPCs include TiVo, ReplayTV, and networked DVD players. So if you don’t see exactly what you’re looking for among the examples in this article, fear not. A little ingenuity and a lot of research can show you the way.

This article covers a slightly different kind of hacking than many of the other chapters in this book. Other hacks in this book cover ways to make a piece of hardware less restrictive than originally intended or to modify a product to make it do something it wasn't intended to do. To be sure, some HTPC hacks have those aspects, depending on what you are doing. However, if you turn into a full-blown HTPC enthusiast, chances are excellent that you will not be saving money over what you would buy off-the-shelf to perform similar functions. If you’d like to go the inexpensive route, there are ways to do so, but that’s less often what HTPC builders are after.
Hacks in this Chapter…
  • Before you Begin: Research and Plan
  • The Components of an HTPC Project
  • Building a Windows HTPC
  • Building a Linux HTPC
  • Further Hacking and Advanced Topics



Generally, most HTPC projects feature two central themes:

  • Control
  • Aesthetics

The HTPC hackers who are after control are typically concerned with flexibility. Maybe they want more hard disk space than can be bought in a stock unit. Maybe they are concerned that they won’t be able to play newer video files when the formats are updated. Whatever the concern is, HTPC control hackers have a goal of creating an HTPC that incorporates the desired functions they want and that those functions work the way they want them to.

The aesthetics aspect is also very interesting. Most of you reading this book will be familiar to some degree with case modding, the art of carving up your computer case to make it more personalized and appealing. Aesthetic HTPC building is related but different. Usually, the idea with an HTPC is to not make it look like a computer. Many of the HTPC cases on the market are designed to look like high-end AV equipment. You might be hard pressed to spot a well-done HTPC in a rack of other AV gear. Often the cases are horizontal (think back to the old “mini-desktop”-style cases), are silver or black, have hidden drives, and in some cases, have just a power button for visible front controls.

Given the massive number of combinations of features, hardware devices, operating systems, and control devices, it is impossible to comprehensively cover HTPCs in one chapter. Couple the enormous breadth of knowledge available with the evolution speed of HTPC-related topics, and it becomes apparent that trying to cover everything is hopeless. Rather, in this chapter we cover terminology and technology as it exists today and where it might be going tomorrow and demonstrate some arrangements with a few concrete examples.

This chapter is primarily written for HTPC novices. However, to fully make use of this chapter, readers should have some experience building their own PCs. An HTPC project isn’t the most forgiving for learning how to assemble your first custom PC.

Before You Begin: Research and Plan

One of the more difficult aspects of HTPC projects is the fact that you need to understand the jargon from numerous industries. HTPCs unite the industries of PCs, video, audio, and sometimes even satellite, cable, and radio. For example, one of the most commonly discussed topics is connecting a PC to a TV.

HTPCs can range from simple to complex, inexpensive to exorbitant in price; therefore, it’s important that you plan your projects very carefully. The last 20 percent of your project may be fine-tuning your interface and fighting with drivers, but if you spend 80 percent of your resources and time up front researching, reading, and verifying interoperability before you ever buy anything, you will save yourself a lot of time, trouble, and investment.

Need to Know…

Conventions and Disclaimers

I live in the United States. Like most Americans, I suffer from a U.S.-centric view of things. This includes prices (which are listed in this chapter in U.S. dollars), standards, services, and laws. I talk about NTSC in this chapter. Other parts of the world use PAL or SECAM. These standards are comparable to NTSC, if slightly better. NTSC is the North American TV broadcast standard, and is defined in a bit more detail shortly. Phase Alternating Line (PAL) is the standard used in much of Europe. SECAM (whose acronym only makes sense in French) is the standard used in much of Africa, and the parts of Europe not using PAL. However, when I later say that NTSC offers poor quality for graphics display, the same applies to PAL and SECAM, even though they offer a slight increase in picture quality.

When I talk about cable and satellite, I’m referring to how they exist in the United States. I talk about a lack of high-definition TV (HDTV) programming, and I understand that in other parts of the world HDTV is more readily available. Please adjust any information given to suit your locale.

The legal area is one in particular that varies greatly from place to place; it’s not a technology or standard that we can simply convert. For example, in parts of this chapter I talk about ripping DVDs. Depending on where you live, this activity might get you in some trouble. This is true even in (or especially in) the United States. Just because I might show you how to do something doesn’t necessarily mean that it’s legal for you to do it. In the United States, we have the Digital Millennium Copyright Act (DMCA), which prohibits some of these activities. Other countries have similar laws. If you have any doubt whatsoever about the legality of topics discussed in your area, please consult your attorney before proceeding.

For a successful HTPC project, planning is essential. The very last thing you want is to find out after you’ve purchased everything you need that some expensive component such as a high-end video card or television set won’t work with the rest of your system. Such a mistake can set you back hundreds or even thousands of dollars. You can avoid the vast majority of these mistakes by researching the components on the Internet. There’s always a slim chance that you’ll be the first to get “into” a particular area, if you like living on the bleeding edge, but most of the time, someone else has tried and failed, or they’ve succeeded, and they can tell you what they think of the setup. If you are the type that is the first one trying things, pay special attention to the return policy of the store where you buy your gear.

Note

Interested in reading about what other HTPC hackers are doing? What they’re working on? What their problems are? I recommend you review the archives of the AVS Forums HTPC forum. This is probably the best online community for HTPC information. You can access it at www.avsforum.com/avs-vb/forumdisplay.php?forumid=11.

The first thing you should do is create a list of the functions that you want your HTPC to perform. Here’s a partial list of functions that you might include on your list:

  • Video capture
  • Video playing
  • DVD playing
  • DVD ripping
  • CD playing
  • CD ripping
  • TV time shifting/pausing
  • High-end audio playback
  • Surround-sound decoding
  • Videogames
  • Web surfing/general computing

This list is not intended to be comprehensive. Anything you can do with a computer, you can do with an HTPC. After all, it is a PC—just one assembled with a particular purpose in mind: to drive your TV and home stereo system (or equivalents).

Several of the items on the list are obviously very related. For example, you’re really not going to have the ability to do DVD ripping without also being able to play DVDs, too, if you choose to do so.

How Much Could It Cost?

Allow us to take a moment to revisit the issue of cost and reiterate that HTPCs are often not about saving money. For the sake of discussion, say that you merely want to play DVDs. To do so with an HTPC, you need a PC, a DVD drive, an operating system, a decent video card and CPU, and some way to accept input from a remote control. In your head, calculate how much you think all that will cost you. New, used, doesn’t really matter. Now, think to yourself how long the PC will take to boot up and be ready to play a DVD. Picture what happens to the files on the hard drive when the PC gets powered off at random.

Now, compare this figure and the complications with cost and ease of a factory-built DVD player. An inexpensive DVD player can be obtained for less than $50 and will be ready to play DVDs a few seconds after you turn it on. It (hopefully) will easily connect to your TV. You can power it off manually if your remote is lost or destroyed, or a generic replacement can typically be purchased for approximately $7. Also, if you don’t do a good job of picking your HTPC components, a factory-built DVD player’s output will probably look better on the screen than your HTPC, and it probably won’t be as noisy.

Abandon all hope of flawless, economical home theatre, ye who enter here! If, however, you derive satisfaction from doing it yourself, and costs be damned, then read on …

Did Someone Already Build It?

Let’s assume that your list of features includes the following:

  • DVD playing
  • CD playing
  • CD ripping
  • Surround-sound decoding
  • Videogames

Guess what? That’s an Xbox. With no modification, a $170 Xbox (plus $40 in accessories) will play DVDs with Dolby 5.1 sound, play CDs (and copy the music onto the built-in hard drive for you), and allow you to play videogames—no hacking or modding required.

Obviously, the Xbox may not be what you wanted, even if the list of functions exactly matches what you need. For one, it may just look wrong. Maybe you don’t want a black and green plastic case with the rest of your AV equipment. Maybe an Xbox has too much functionality. For example, my wife doesn’t want the videogame function, something to do with the kids having one more than enough things to waste their time on. Fortunately, it’s pretty easy to disable the game functionality on an Xbox if you like, with the simple addition of a modchip with an open-source BIOS replacement.

The point here is: has someone already built the features you want into an existing, (relatively) inexpensive piece of consumer hardware? If so, you have to weigh your needs against the benefits and downsides of purchasing a ready-made item. Maybe the Xbox isn’t particularly physically attractive, but is the aesthetic factor worth spending an additional $800 on parts and HTPC components that would look much nicer near the TV? On the other hand, maybe the Xbox does what you need right now, but it has no expansion slots. Maybe you can shoehorn the TV capture function in by modding the box to run your own software and attaching a USB TV capture device to one of the front controller ports, but are you concerned that at some point you’ll just run out of power on the Xbox? Of course you are! Therefore, you must have the $1,000 custom HTPC. Read on …

The Components of an HTPC Project

The bulk of the work for planning an HTPC project involves making a detailed list of components that will go into it. In some ways, this is similar to building a custom PC from parts purchased at the local computer shop or by mail order. However, in other ways it’s a bit backwards from what you are used to, depending on the factors you consider most important. It’s possible to build a variety of configurations, some of which will separate some of the functions to a central server and allow you to access them over a network. Until we get into that discussion in detail, I’ll refer to the box attached directly to the TV as the set-top box and the central server as a media server.

At the very least, for a standard HTPC, you will require the following parts:

  • A case
  • A motherboard
  • A CPU
  • Memory
  • An optical drive
  • A boot device
  • A hard drive
  • A network card
  • A video card
  • A sound card
  • A keyboard
  • A mouse

As always, these lists are merely suggestions. Some components may need to be added, others may need to be left off, depending on the functions you’ve picked. For example, for playing or ripping physical DVDs, you’ll obviously require a DVD drive. If you’re not performing those activities, maybe an optical drive is not required at all, or maybe you need just a temporary CD-ROM drive to install the OS software.

That’s where the similarities end. Contrary to what you’re probably used to, you could find that you have to begin your entire design with the case. Or you might have to start with the video card and ensure that everything else works with that. You may find that your choice of operating system severely restricts the hardware you can consider, much more so than usual. You might have to plan for a setup that can boot quickly or tolerate being powered off (or maybe hibernated) at will. How about the keyboard and mouse? Chances are, you’re not planning to have your HTPC at a desk. In fact, most of the time, you’ll want to use a remote control for playback purposes, but if you plan to use your HTPC to surf the Web, you’ll require a keyboard and a mouse. That almost always means you’ll need some kind of wireless keyboard and mouse (or mouse substitute) setup.

Here are some brief constraints to keep in mind before we get to the parts details:

  • If you’re planning to use a special enclosure for your HTPC, you may have to pick that first and work from there. Sometimes, size really does matter.
  • If you’ll be working with a lot of video input and output, that will often determine the types of video cards, OSs, motherboards, and cases that you can consider.
  • If you require optical drives, your case will have to accommodate those. For example, if you are planning a compact setup, you may have to look for a slimmer laptop DVD drives, which are more expensive.
  • Will you use any functions that require a keyboard and mouse? Look for wireless. If not, can you do everything you need from the remote? Do you need to consider a remote with a mouse function?
  • If you’re going to capture video, you’ll want to get tons of disk space.
  • Don’t forget about noise! You don’t want to be able to hear the HTPC fans and drives over the movie, or when you’re trying to sleep.

Beyond whether your parts will work together, your biggest external constraint is the kinds of inputs and outputs of your non-HTPC devices (such as your television and audio receiver). We’ll talk about the different signal and connector standards throughout the chapter.

Chances are, you’ll want to be able to drive the rest of your AV equipment in the optimum manner from your HTPC, at least within your budget. For example, if you have an audio receiver that can take fiber optic inputs, you might want to make sure you have audio hardware on the HTPC that has fiber optic outputs. More important (for most people), you’ll want to be able to drive your television at the absolute best quality mode possible. This is especially important if you plan to display anything on the television besides video, such as text or icons.

The Display

Regular (non-HD) television sets are highly unsuitable for displaying small text and icons. This is due to the fact that they incorporate relatively low-resolution displays. For example, the National Television Standards Committee (NTSC) standard, which has been employed in North America for the past 50 years, is theoretically about 640 ´ 480 resolution. Have you tried running your computer monitor at 640 ´ 480, lately? You’ll see what I mean. But it’s worse than that, because the “pixels” on a standard television are about twice as fuzzy in the horizontal direction as compared to a standard VGA monitor. For all intents and purposes, this means that you’re able to display about half as many characters across the TV screen as you would be able to display on a low-res VGA monitor, in order to cleanly tell them apart. This is an oversimplification, however; you should forget about plugging your desktop PC into the TV in your den and being able to surf the Web the way you typically do. If you are an older reader, you’ll recall that at the introduction of 8-bit computers you could only view between 22 and 40 columns of text on your TV.

This does not mean that you have to invest in a new HDTV. Your existing TV will display video as well as it ever did. If that’s what you are after, then no problem. Still pictures will look a bit fuzzy. And you can do text—you just have to account for what is going to be readable. So, if you want an interface that shows movie or song titles, you can do it—you just have to plan for fewer lines of titles per screen than what you’re used to on your desktop monitor. To illustrate this idea, consider that most cable or satellite systems have some kind of program-listing channel or functions. Take a look at yours, and count how many lines of text are showing on any given screen. Figures 6.1 and 6.2 are examples of the Program Guide from Comcast, a digital cable company.

Ignoring the fact that a large portion of the screen has been used for advertising, look at the amount of text that is visible on the screens. In each screen, approximately one-third is used for text, so triple that number, vertically. Additionally, about one-fifth of the screen is utilized horizontally to show the channel numbers. In Figure 6.1, you’re seeing about three lines of text using that kind of separator line, so you could guesstimate a full screen is nine or 10 lines high.

Figure 6.1 Screen Capture of the TV Guide Channel

For a more compact example, look at Figure 6.2. The bottom portion of the screen shows several lines of text packed together, paragraph style. That’s four lines in about one-fifth the height of the screen, so you could again guesstimate that the screen is about 20 lines high using this style. The middle line is about 46 characters wide, in a proportionally spaced font. If it were the full width of the screen, it would extend to about 57 characters.

Figure 6.2 A More Compact Text Example

This size of text looks fine on a TV if you don’t focus on it intently—for example, if it’s scrolling by quickly. However, when it’s caught in still format, as shown in Figure 6.2, it doesn’t really hold up to scrutiny. Take a closer look at the small holes inside a lowercase a or e, for example. For reference purposes, these pictures were captured at 640 ´ 480 with an ATI All-in-Wonder Radeon 9700 Pro from an analog cable feed. The fuzziness you see is normal for an NTSC signal.

Bottom line: A regular TV is suitable for video and large-UI applications, but don’t bother trying to surf the Web on one or use any kind of standard desktop interface, because the results will be unsatisfactory. Make sure your video output on your HTPC has TV-out.

· What Are Your Options for Higher-Quality Video Display?

Your choices basically boil down to computer monitors (or equivalents) and HDTVs. Neither option is inexpensive, compared with a non-HDTV of the same size. Let’s look briefly at some of the costs involved. Pick a modest size—say, 27 inches. Browsing on a favorite shopping Web site shows a number of standard CRT sets in the $179 to $289 range. To be sure, you can find some that cost much more, even for CRT non-HD sets, but this seems to be an average price. They’re hardly free, but the price isn’t unreasonable, especially compared to what you might be thinking about spending on a HTPC.

The least expensive HDTV from the same site is $473, and that’s for a comparable 27-inch CRT set. The next least expensive one is $649, and they quickly go up from there. These prices are for TVs in the 21- to 29-inch range. Once you start looking at LCD and plasma screens, a $1,000 set looks like a bargain.

Why so expensive? Part of it is the fact that bigger tubes are obviously more expensive, as are the higher-voltage electronics to drive them. However, the largest factor seems to be economy of scale. The most common models are vastly cheaper than those that are less in demand. For whatever reason, it seems that CRT HD sets are in less demand than the big, expensive, flashy, flat LCD and plasma HDTVs. At least, that seems to be what the manufacturers think, based on how many models you can find in each category. However, you can’t place the blame entirely on them. A chicken-and-egg problem scenario is currently in play with HDTV. For the average consumer, there is relatively little benefit in owning an HDTV, because here’s relatively little HD programming available on most systems. On the other hand, there isn’t a great deal of HDTV programming available because the average consumer does not have an HDTV set in their home, so .…

Keep in mind that most people’s idea of the ultimate in video quality - DVD - doesn’t “do” HDTV yet. It’s still NTSC resolution. DVD does look at lot better on a good HDTV setup, however; it’s just not full HD resolution yet.

Need to Know…

During the production of this book, a HD DVD standard was partially ratified. You can read an article about this online at www.eetimes.com/sys/news/OEG20031126S0034. This standard uses the Blu-ray format, which is a blue wavelength laser drive mechanism, which allows for higher density disks. The format holds up to 20GB per disc side.

Keep an eye on the HD DVD efforts at these sites:

The Federal Communications Commission (FCC) is trying to force the issue by mandating that all major broadcasts be in HD format by a particular date, but there have been various delays, so it’s not 100 percent clear that this plan will carry forward as intended. For example, some broadcasters are calling for mandatory Digital Rights Management (DRM) for all HD-capable devices.

Briefly, as an alternative to an actual HDTV set, you could use a computer monitor for the video display, or something with a similar interface, such as a projector. You already know how monitors work, what the resolutions mean, how to attach them to a PC, and obviously they display computer video just great. By using such a display, though, you probably give up some size and convenience. Although you can pretty easily find CRT monitors up to about 21 inches without much difficulty and expense (starting at just under $500), it’s a bit harder to find larger than that. It is possible to purchase 30+-inch monitors for over $1,000, and you can buy a projector for well over $1,000, or if money is not an issue, you can buy some really beautiful 23 or 24-inch LCD monitors for several thousand dollars each. The same economies of scale that apply to TV sets also seem to apply to monitors. An average 19-inch monitor starts at around $200. Why should two more inches cost more than twice as much?

Another constraint to be wary of is that most of these monitors don’t include TV tuners or standard TV inputs. If your HTPC has a TV tuner, you can perform all the needed functions, but now your TV has a boot time and could occasionally crash.

So, the points to keep in mind are:

  • Regular TVs look lousy for computer text but are good enough for video.
  • HDTVs (or monitors acting in that capacity) are suitable for either application but are expensive. (And I haven’t had my final word on HDTV for desktop display use, either.)
  • If your TV meets your needs now, and you don’t require the functionality to display a computer desktop on it (for Web browsing, gaming, and so on), you’re all set—just get a good video card with TV-out.
  • If you already have an HDTV that is good enough for desktop display, you’re all set—just get a video card that can output to the TV’s best inputs. (More on that later.) You don’t have to use the HTPC for desktop applications, though it’s nice to have the option. However, keep in mind that you still want the quality video output for your motion video.

Now let’s say that you require a high-resolution display for functionality purposes, but you don’t currently own a set that can do that. This is a budget issue. What can you afford? Within your budget, what do you want to trade off in terms of screen size, resolution, types and number of inputs, other features, and so on? For example, if your budget is less than $1,000 and you want something larger than 20 inches, you’ll be looking at tube sets, not LCDs. We’ll discuss various types of TV inputs later in the chapter, but that’s something you want to know about when making your decision. That may affect price in ways you hadn’t thought of. For example, a handful of TVs on the market can take VGA input straight from a standard video card. This could save you from having to buy a video card that can do component out.

Need to Know…

Ryan's Personal Experience…

To give you an idea of one possible choice, I’ll tell you what I did. I was building an HTPC and had only standard TVs in the house. I wanted to experiment with HDTV, view video, and possibly use the TV for desktop applications. My budget was limited to $1,000 for the TV. I knew that this meant that I’d be looking at a midsize tube set, which was fine. This particular setup was for my master bedroom, and the cabinet it would go into can only handle up to about a 30-inch set anyway. I was also interested in a set with VGA in, if possible. I wanted a standard TV, though, with a tuner and the usual TV features. My wife would be using this set more than I, and she would not tolerate any “weirdness” to have to simply watch TV.

I ended up picking a Zenith C27V28. This is a 27-inch tube set with cable, S-VHS, component, and VGA input. This particular model can do 800 ´ 600, which I consider a minimum desktop resolution. It cost me $800 ($908 including shipping). I certainly would have picked it up myself, but no local stores seemed to carry it. There’s another model, the C27V22, which can only do 640 ´ 480, but it’s about $200 cheaper.

My one-paragraph review is that it’s not bad. It’s a little slow to change channels. For running Windows at 800 ´ 600, it’s just okay. The display is not fantastic—it’s not nearly as clear as even a cheap Super VGA monitor—but everything is sharp enough that I can read regular text with no trouble. I’m happy with it.

Note: I’ve been using the terms CRT and tube a bit incorrectly. Yes, your standard television has a cathode ray tube (CRT) in it, but that’s not the only kind of display that uses CRTs. Some projection sets also use CRTs to produce the image, so to be technically correct, saying tube doesn’t give enough information to describe exactly what kind of set is meant. The term used to describe your typical tube-based nonprojection set is direct view, which means that you’re seeing the image directly on the surface of the tube. This may come up when you’re looking at catalogs, Web sites, and the like that categorize TVs by type. While we’re on the subject of terminology, we might as well differentiate rear-projection from front-projection. A rear-projection set is one in which the light is projected onto the backside of a screen while you are looking at the front. This is usually the technology in screens larger than the 36 inches or so. Rear-projection sets are still usually self-contained boxes. A front-projection setup is more like a movie theater: There’s a projector and a separate screen (or wall). If you’ve seen the typical office projector used for PowerPoint slides, that’s a front projector.

The Video Card

Now that you have selected your display, you’ll need an HTPC system for optimal operation. This usually means using the best resolution that the display supports and using the connector type that provides for the best-quality signals. Depending on your needs and the motherboard you’re using, your system may have serviceable on-board video. For example, most small form factor (SFF) PCs have built-in video, and many have TV-out. Keep in mind that some motherboards don’t have any slots to add video cards. For the purposes of this discussion, we’ll assume that you’re looking for an actual video card. The question is, what features do you need? Things to consider are:

  • Do you plan to play the latest 3D shoot-em-up games? If so, you’ll have to shell out for a recent video card.
  • If you plan to do DVD playback and you’re trying to go lower-end on the CPU, you may want to get a card with MPEG2 hardware decoding. Make absolutely certain that the OS you plan to use can take advantage of that feature.
  • Will you be doing video capture? Then you’ll obviously need a capture card. You can get it on the same card as the one that drives the display, or a separate one—your choice.

The Case

The choice of HTPC case is a highly individual one, so have some fun with it. Anything is possible—from a totally smooth front with only an LED (and some hidden drives perhaps) to a front panel that looks like a NASA control board. Or maybe you don’t care one bit about how it looks, and you’ll use any old standard tower case. Again, it’s your choice.

Apart from the aesthetics, the first functional constraint of the case is size. It has to be large enough to hold all your parts and have them available where needed. For example:

  • If you’ve got an optical drive, you need to be able to load it from the front.
  • You’ll want most of your cables in the back.
  • You may need room up front for an infrared receiver and fancy LCD display.
  • It has to have a drive mount for a hard drive, if you're installing one.
  • If you need to install a couple of cards, the case has to accommodate those. Even if you’ve got a motherboard with slots, keep in mind that not all horizontal cases have room for cards to stand up in the slots, or even the spaces in the back where the back of the card goes. Some cases mount the cards horizontally, too, and you have to have a riser of some sort that your cards plug into. This may accommodate only one or two cards.

To give you an idea, look at some examples of the Hush Technologies Silent Mini-ITX PC extreme cases (http://mini-itx.com/store/hush.asp) from Mini-itx.com, shown in Figures 6.3 and 6.4. From the outside, the case is simplicity itself and looks like a piece of high-end audio gear.

Figure 6.3 An Exterior View of the Silent Mini-ITX PC Case (Photo Courtesy of Mini-itx.com)

Figure 6.4 An Interior View of the Silent Mini-ITX PC Case (Photo Courtesy of Mini-itx.com)

This PC is based on the VIA Epia M10000 motherboard. As you can see, everything fits together rather tightly. It uses a slim laptop-style CD or DVD drive and can fit a 3.5-inch hard drive and one PCI card. The card goes in the upper left corner of Figure 6.4 and plugs into a riser, which plugs into the motherboard. The motherboard even has TV-out, so this could be someone’s ideal HTPC, as long as they can live with the somewhat limited amount of CPU power. For more information on this machine, refer to http://mini-itx.com.

The Hard Drives

If you’re going to do anything besides play optical disks (and if that’s all you want, you’d probably be better served by a quality DVD player), you’re going to need some mass storage somewhere in your HTPC setup. I say “somewhere” because it is entirely possible to have the bulk of your storage located in a server; separate from the box that actually drives your video and audio. Keep in mind that the set-top box may still require enough storage to boot up the OS. This storage could be something solid-state, such as a Flash device. Alternately, if you like, you can boot Linux entirely off the network. The option of having no hard drive in the set-top box may be particularly attractive if you’re trying to go for small, reliable, and silent.

The remainder of the HTPC network setup is explored later in the chapter. For the moment, let’s limit the discussion to drives physically installed in the set-top box. As a quick reminder, here is a partial list of functions that require mass storage:

  • Video capture
  • D/DVD ripping
  • TV time shifting/pausing
  • Media file storage
  • Videogames
  • General desktop use

If you plan to save any TV shows that you’ve captured or create a media library of MP3s or video clips that you’ve downloaded or ripped, you will require a hard drive. Furthermore, you’re going to need a large one, or possibly even more than one. How much space do you need? It depends entirely on the resolution and video codec you use, of course. Consider a couple of examples:

  • NTSC quality using MPEG2 uses approximately 1 gigabyte per hour.
  • DVD quality in its native format (also MPEG2) uses around 5 or 6 gigabytes for a typical two-hour movie.

Note

Using the latter example, you’ll fit about 15 DVD movies on an 80-gigabyte drive.

This brings us to a couple of performance characteristics of hard drives that are critical for HTPC applications:

  • Speed
  • Noise

Your drive must be fast enough to keep up with the data streaming in and out, and it must be quiet enough so that it doesn’t disturb you while you’re trying to watch TV or maybe sleep in the same room. For TV recording, the HTPC will most likely have to be operating 24 hours a day, 7 days a week, 365 days a year.

· Speed Considerations

One of the rough speed measures of a drive is the number of RPMs (Rotations per Minute). Basically, the faster the rotation speed, the faster the drive. Modern drives range in speed between 5,400 RPM and 15,000 RPM, though the higher end of that range is currently limited to a few models. The majority of desktop consumer drives operate at speeds between 5,400 and 7,200 RPM. Drives of more than 10,000RPM are typically used for high-end servers, which is reflected in their prices. High speed drives also usually need slightly more power and better cooling. If you’re using a laptop drive (2.5 inches), you may find some drives that operate as slow as 3,600 RPM, but most hover around the 4,000 RPM range; the fastest laptop drives seem to be 5,400 RPM. Some of the smallest SFF PCs require that you use laptop drives. These are far from ideal, not only because they tend to be slow, but they also max out at about 60GB.

The standard prescription is that you always want to use a 7,200 RPM drive for your HTPC. In many cases, a 5,400 RPM drive will be too slow. It’s also helpful to have a larger buffer on the drive. You can always pay the extra cash for the 10,000 RPM drives, but they are also significantly louder. For comparison purposes, the commercial DVRs (TiVo, ReplayTV) use 7,200 RPM drives. It’s also worth noting that 7,200 RPM drives don’t typically require any special cooling and can even tolerate special sound-dampening materials (which sometimes exacerbate drive overheating problems).

Obviously, the best recommendation is to purchase as much disk space as your budget allows. Fortunately, in recent years, hard drives have become relatively inexpensive. If you shop around a bit and wait for specials, you can usually find a 200GB drive for around $200 in stores. Or if you believe Pricewatch.com, there are several vendors selling a Maxtor 200GB drive for about $155. That’s for a 7200 RPM parallel ATA133 drive with 8MB of cache. Note that this comes out to $0.775/GB. Pricewatch.com also quotes a 250GB Maxtor for as little at $177, which is only $0.708/GB. However, these drives are only 5,400 RPM with a 2MB cache. If you’re curious, currently the next biggest is 300GB starting at $274, which equates to $0.913/GB, so that’s at a significant price premium. The 300GB is also a 5,400 RPM unit. Alternatively, if you start going in the other direction, there’s a 160GB Samsung 7,200 RPM with 2MB cache starting at $105, or $0.656/GB.

So, for my money, I would tend to pick the 200GB drive for $155. I don’t want to deal with slow 5,400 RPM drives, and I like the extra space. The actual sweet spot for price/performance/size is the 160GB drive, but I’ll take the extra 40GB at $50 to avoid the hassle of having to potentially open the case later to upgrade to something larger.

Need to Know…

A Note About RAID Setups

In some situations, you might opt for smaller or slower drives. One of the best examples is when you’re building a RAID array. Briefly, RAID, which stands for Redundant Array of Independent Disks, is a way to use multiple drives to appear as one large virtual drive. Various RAID arrangements allow you to improve speed and reliability at the expense of an extra drive or two that you don’t get to use for raw storage. For example, you could use five 160GB drives and get four drives’ worth (640GB), which gives you a performance boost and allows you to have a drive fail without loss of data. Some RAID arrangements will spread read and write requests across multiple drives, which hides any performance lag a single drive of that type might have. If you’re considering a RAID array, do some serious research before buying. Some motherboards claim to have “RAID” on board, but they can only do RAID 0 or 1, which is not at all what I’ve described here. Before committing a large chunk of money to a RAID setup, pick up a book on the subject or do a lot of online research. Pick exactly the RAID controller you’ll be using, and read up on how it works with your OS of choice. Also look into whether you’ll need to have another (smaller) boot drive, since some setups can’t boot off a RAID array. As you can imagine, a RAID setup will add that much more noise and increase power requirements, so RAID is probably a more realistic consideration for a media server.

A favorite hardware site is Dan’s Data. He’s got a good primer on RAID if you’d like to read more available at www.dansdata.com/raid.htm.

· Sshhhh... Quiet Operations

The noise issue is a difficult one. Some drive models are loud, some are quiet. I’ve read about individual drives that are fairly loud, even when they’re supposed to be quiet models. The one product that I read about being consistently quiet is the Seagate Barracuda family. If you find yourself considering a particular model of drive, do some searching online to see if you can find a review or a noise rating for that model. As a rule, drives with fluid bearings tend to be a bit quieter. Some good places to search for information on the relative noise level of various hard drives are:

Beyond picking a quiet drive, you can add some damper/enclosure devices to reduce noise. These tend to be designed for full-size desktop cases, so take that into account before ordering.

If you have an older drive that used to be quiet, and is now making noises, then back up your data immediately, and budget for a replacement. Hard drives are one of the moving parts in a computer, and they will fail, it’s just a question of when. Weird noises are generally a sign of problems, so don’t ignore them. A failing drive will never get better, and it has been years since it was economically feasible to have a drive repaired out of warranty.

Optical Drives

Optical drives are one of the easier components to decide on for an HTPC. Simply pick one that has the functions you need for your HTPC. Make sure that the size and color match your case and that the drive is compatible with your OS (though it’s fairly rare for new drives to not automatically work with any recent OS). Keep noise in mind as well; some drives are louder than others. You can put a burner drive (CD or DVD) in your HTPC if you like, perhaps for making custom CDs or DVDs. Be aware that using a burner for regular playback will shorten its lifespan somewhat, which is a bit more a concern with DVD burners since they’re still at a price premium. The reason is that the drive heads are larger and heavier, and it takes a bit more wear and tear to move them around. There are also more parts to fail. In addition, disc burning can be susceptible to problems if there is a slowdown of the system, so consider the kind of impact this will have on your CPU calculations. It might be a better idea to offload the burning function to a desktop PC.

The most common drives are CD-ROM and DVD-ROM, and their counterparts than can record writable disks. These drives are mostly differentiated by their speeds an loading mechanisms. In addition, there are currently 6 DVD recordable formats. These are DVD-R (two flavors), DVD+R, DVD-RW, DVD+RW, and DVD-RAM. These competing standards are from different manufacturers, and have different capacities and compatibilities. If you want to read more about the different formats, visit www.dvddemystified.com/dvdfaq.html#4.3. There have been many other optical disc standards in the part, but they have all been effectively rendered obsolete.

The CPU

An HTPC can require a large amount of processing power, depending on the kinds of codecs you plan to use and whether they will be done entirely in software. A CODEC (coder/decoder) is simply the algorithm(s) used to encode video or audio into a file format. It’s what translates a series of pictures into a series of bits, and back again, for example. For all practical purposes, it means that in order to play a file, you have to have the appropriate decoder software. To make a file of that type, you have to have the encoder. Examples of CODECs include MPEG2, DivX, Quicktime, and Indeo. There’s a lot more detail to be had, but it usually boils down to you have the right CODEC, or you don’t. When encoding, it’s worthwhile to spend a little time reading up, and picking the right CODEC for your needs.

The point, when it comes to CPU power, is that many CODECs trade CPU power against file size. In order to make a file smaller at a particular quality level, it usually takes more CPU power. In the age of downloadable movies, there is a lot of interest in smaller video files, so it is common to see CODECs used that want a high-powered CPU.

Not surprisingly, the latest, cutting-edge CODECs (such as various codecs called MPEG4 and DivX) tend to require a significant amount of CPU speed, and there’s relatively little hardware support. This means that you probably won’t find a video card with hardware acceleration support for these CODECs in the near future. Of course, these CODECs are popular because they compress well and produce decent-looking video (depending on the configuration settings in use).

Generally, when you’re talking about speed requirements, you’re talking about the amount of CPU required for smooth playback. However, there is a CPU requirement for encoding as well, of course. You may occasionally want to do both simultaneously! For the high-end CODECs, encoding can take a huge amount of CPU to be able to encode in real time, especially if you’re encoding DVD quality. However, most of the time you’ll be using the MPEG2 encoder built into your video capture card and then converting the data to a higher compression later, if needed. Therefore, the heavy encoding is not in real time, and we don’t have to worry about that as much. So, the main problem becomes smooth playback.

You have to account for the worst-case CPU usage. Take the highest quality you will want to play with the greediest codec you have, capture video at the same time, and leave some headroom for housekeeping tasks that may have to kick in at random. It’s probably best to leave a little extra for future expansion, as well.

Most people report that a Pentium III 1.0 GHz or better CPU works well. A Celeron of the same speed or better is fine, too. Naturally, if you give your HTPC a more powerful CPU, it isn’t going to hurt anything. Be aware that there’s more to a CPU’s performance than just the raw clock speed. For example, VIA produces a popular line of mini-ITX boards, which are very small form factor. The top performer in this family is the VIA Epia Nehemiah M10000. It runs a Nehemiah C3 CPU at 1.0 GHz. However, this processor, even though it’s fully x86 compatible, doesn’t perform as well as an Intel CPU at 1.0 GHz. Reviewers report that it just barely keeps up when playing high-end DivX files with surround-sound, and that is when running Windows with VIA drivers (www.mini-itx.com/reviews/nehemiah). As of this writing, Linux support for some of the video features (such as the on-board MPEG2 decoder) is limited or experimental, so results may not yet be optimal under Linux.

I didn’t include a special section for memory, since I expect you will purchase the appropriate RAM type for your motherboard/chipset/CPU. You can probably get away with as little as 64MB. If you're running Windows, you may want to install 128MB or 256MB. However, memory is pretty inexpensive. It’s rarely a bad idea to install more RAM into the box just to be on the safe side.

Of course, if you plan to use your HTPC to play the latest games, all my advice here CPU speed and memory is useless. If you build your box to be a gaming rig, too, you’ll be fine in the video playback department and that’s about it.

Note

Not sure what type of CPU you need? Good sources of information on codecs can be found here:

 

The Sound Card

The examples in this chapter use the built-in audio hardware on the motherboards to drive simple stereo setups. However, that’s the bare minimum for an HTPC. It is possible to purchase high-end audio cards with digital, optical inputs and outputs to ensure minimal loss between your HTPC and your high-end audio receiver. In fact, this is one area of the HTPC world that is somewhat less mature than the video components. Some people experiment with using their HTPC as the audio receiver, or a mixer, or even a full recording studio. You won’t find any sound cards quite yet that can do the power amplification for a full speaker set, but they can accomplish the necessary decoding functions with the correct software.

Obviously, if you’re going to be working in this area, it is best to obtain the sound card that supports the kind of inputs and outputs you intend to use. Also be prepared for a little bleeding-edge configuration work if you plan on going high-end.

A popular choice is the Sound Blaster Audigy 2 family, which supports pretty much all of the important PC sound standards, and is an excellent choice for gamers. Another is the M-Audio Revolution 7.1. For sound mixing applications, the M-Audio Audiophile 2496 has a good reputation. The M-Audio cards seem to be somewhat better supported under Linux, if that’s a consideration for you.

The Controller

In most cases it is desirable to have some sort of remote control device with which to control your HTPC. When performing maintenance tasks, you will also probably want to have real keyboard and mouse capability, but the bulk of the time you will want to use a remote control. There are a fair number of remotes on the market, although you won’t find them in your local stores—you’ll have to order them. Most of the suitable remotes look like an elongated rectangle, similar to the remote controls that accompany any AV equipment. You will probably want your remote to have a mouse function, a numeric pad (for channel changing), channel and volume rockers, and a number of free programmable buttons to launch applications and such.

You don’t necessarily have to get a remote specifically designed for HTPCs. You can get an infrared (IR) receiver and use any existing IR remote. However, these types of setups usually don’t include a sufficient number of buttons, and you will probably miss having a mouse function. If you do decide to pursue the IR receiver route, make sure you get one that can “speak” consumer IR (CIR), which is the term for what most household remotes emit. Computers also do IrDA, which is a form of network communications over IR. The majority of IrDA equipment is not compatible with CIR.

The Software

Are we ready to open a can of worms? Let’s discuss the operating system and application software you might want to use for the various HTPC functions. The first place to start is with the operating system. The two most viable operating systems with which most people could conceivably build an HTPC are:

  • Microsoft Windows
  • Linux

Did I leave out your favorite OS? If you’d like to proceed using another OS, please don’t let us stop you. Most OSs can be manipulated to control your HTPC—they just require some work.

The main difficulty with other OSs is drivers. You need drivers for sound, graphics output, video capture, and DVD drives, among others. Most versions of UNIX can support graphics output to a degree, largely due to the Xfree86 project. DVD drives are often well supported. The major difficulties seem to arise with sound support and video capture. When considering hardware, be sure to spend extra time researching support for your choice of hardware, which is dependent on your choice of OS. I intend to provide information useful for both Windows and Linux. Each has its strengths and weaknesses. You have no doubt picked the OS you’d like to use, so read on for what it can do.

As an aside, Mac seems to have built-in support for many of these features, but the hardware options are perhaps a bit slimmer. In any case, I’ll skip the Mac here in favor of the roll-your-own approach. We will say that Apple was "there" first by releasing the MacTV in 1993. Refer to Chapter 5 for some interesting Macintosh hacks, compliments of the team at Applefritter (www.applefritter.com).

Need to Know…

The Hard Truth About HTPC OSs

What it boils down to is that in terms of drivers, online help, places to ask questions, discussion forums, application software, and so on, Windows and Linux are the most popular OSs for HTPC purposes. Furthermore, most new hardware is better supported under Windows than Linux. You don’t have to like it, but it’s a market reality. There are many more Windows systems in the world, so for now it makes financial sense for most hardware vendors to offer primary software support for Windows and possibly secondary support for other OSs like Linux. By “better supported” I mean by the original hardware vendor. I am in no way disclaiming that some hardware may work better under Linux with the open-source drivers the community has come up with, or that the Linux community does a better job of supporting hardware for which the vendor has abandoned support. I like and use Linux myself and would be thrilled if all hardware vendors treated Linux as a first-class citizen in terms of drivers. I commend the ones that do.

I’m here to help enable and encourage Linux use for HTPCs. But I’m also a realist, and I am willing to admit that in some cases it may be easier for a user who is familiar with Windows to make a Windows HTPC support arbitrary hardware and get up and running more quickly. Personally, I find Linux a bit easier to customize to a given function, such as an HTPC (or a router or firewall) than Windows. Plus, who wants to buy another Windows license for the house if they don’t have to?

The next step after picking your OS is to get it loaded. There are a number of versions of Windows to choose from. Currently the supported versions of Windows are:

  • Windows Me
  • Windows 2000
  • Windows XP
  • Windows Server 2003

“Currently supported” means that these versions are sold new and Microsoft still produces patches and updates for them. Of course, you can use an older version of Windows if you like, but you may find that it will eventually lag behind as Microsoft stops producing new updates for it. Hardware vendors tend to stop updating drivers for older versions of Windows as well.

We recommend going with Windows XP if we're buying new. We have found XP to be more stable than Me. Windows 2000 is architecturally similar to XP, but it contains less support for multimedia. Windows Server 2003 severely lacks multimedia drivers; therefore, we would not consider using it for HTPC purposes. Additionally, Windows Server 2003 is strictly a server platform, so it is significantly more expensive.

If you have chosen to use Windows XP, the question still remains as to which version you should use:

  • Windows XP Home
  • Windows XP Professional

Windows XP Professional costs approximately $100 more than the Home version of Windows XP; however, XP Professional provides a few features that might be of use to you. These include Remote Desktop (which allows you to remotely control the desktop with the Terminal Services client). This could be handy if you run the HTPC headless and the TV-out is not a primary display. There are also differences in file sharing and domain membership between XP Professional and XP Home. You also get the remote control feature for free with a program like VNC, but if you have a home domain for some reason, you can’t join XP Home into a domain.

Note

A great side-by-side comparison of the XP Home and XP Professional versions is available online at www.microsoft.com/windowsxp/pro/howtobuy/choosing2.asp. For additional information on VNC, check out these two Web sites:

 

You may be aware of the existence of a new version of Windows XP: Media Center Edition 2004 (www.microsoft.com/windowsxp/mediacenter). Right now this version is only available with the purchase of specific models of new PCs. Therefore you have to buy an entire Media Center PC model from a brand-name manufacturer. This might change at some point in the future, but at present it is not a feasible option for HTPC hackers.

For a Linux distribution, you will want to be sure to select a distro with above-average multimedia support. Some common Linux distros used by HTPCers are:

If you already have a favorite Linux distro, go ahead and use that. One of the nice things about Linux is that, as a fundamental idea of the software, it is highly customizable. In this chapter you will have the opportunity to see a system that is running Red Hat. At the moment, Red Hat is in a state of flux as the distribution model moves toward a more community-supported distro, currently named Fedora. Red Hat Linux 9.0 should still be viable for the immediate future until Fedora is finalized. Red Hat is a decent choice for beginners as well, since a lot of information about it is available online and the file distribution mechanism it uses (RPM) is fairly user-friendly for people who like to avoid compiling their own software when they can.

I won’t cover how to actually install the operating systems here. The HTPC aspects shouldn’t come into play immediately when installing the base OS. If you’re planning an all-in-one set-top box (all components together in the same unit), this process will be much like installing the OS on any other PC. Some more exotic options might include booting entirely from the network or from a Flash card. Chances are that you’ll have a much easier time doing that with Linux, since it is a well-documented option. It takes a little experimentation to get it working right, but it can be done. This is useful if you’re planning a silent PC or a media server architecture.

Not to be outdone, Microsoft has released a version of Windows XP called Windows XP Embedded, which the company claims can also boot over a network or from a Flash card or read-only media. I haven’t had an opportunity to try XP Embedded myself. However, you can obtain additional information on this topic at www.microsoft.com/windows/embedded/xp.

One of the reasons to be concerned with the variety of OS boot options is for the purpose of making your HTPC tolerant of being powered off at random. Think about power outages or small children who like to push buttons. These setups can often help speed boot time, too, if you don’t plan to have it on all the time.

Once the base OS is installed, the next step is to get the drivers working. We show a couple of concrete examples later in the chapter, but for the moment we’ll proceed with a high-level discussion. For Windows, the job is relatively easy, as long as you’re not suffering from any hardware conflicts. Visit the Web site for each hardware vendor and download the latest driver. Of course, this has to be done after setting up your machine for Internet access. It never hurts to put your patches on before you connect to the Internet, if you can arrange it (such as retrieving them from an existing machine on your network). On the Linux side, you’ll want to obtain the patches from your vendor, as well. In particular, look for any updates to the kernel and modprobe, sound drivers (ALSA, in particular), video drivers, your X software, and the desktop software (Gnome, KDE, and so forth).

If you’ve got your drivers in place, you ought to be able to test all the functions you want to do. Try playing a DVD, see if you’ve got surround sound, capture some video, watch TV in a window, rip a CD. See how the display looks on screen; does it look like you’re getting the full resolution you expect?

Of course, some of these functions might be difficult to perform yet, because you might need to install some additional software. We’ll cover some of the specific software in each of the “Building the HTPC” sections.

Eventually, you will decide on exactly the right combination of hardware and OS, and you’ll begin the process of assembling and configuring your HTPC. For illustration purposes, I’ll describe two of my HTPCs, and the reasons behind my decisions for the various components, including the process of assembling them and installing and using the software. One of the HTPCs is Windows-based, and the other is Linux-based. The Windows computer serves as a desktop/server as well as an HTPC, and the Linux box is dedicated to the HTPC function.

Building a Windows HTPC

In this section we cover building and configuring a Windows-based HTPC. We’ll be using a high-end video card and adding lots of storage. When I started this project, my functionality list appeared similar to the following checklist:

  • General desktop use
  • Capture TV
  • Play videogames
  • Play/Rip discs (CD and DVD)
  • Act as a home media server

Preparing for the Hack

The components used in this hack are as follows:

  • ASUS A7V8X motherboard
  • AMD Athlon XP 2700+ CPU
  • 512MB DDR333 RAM
  • Generic midtower ATX case
  • Antec True480 power supply
  • Maxtor 5T060H6 60GB hard drive
  • Western Digital WD2000JB 200GB hard drive
  • CyberDrive CW078D CD-R/RW (40X CD burner)
  • Toshiba SD-M1712 DVD-ROM (16X DVD)
  • ATI All-in-Wonder 9700 Pro
  • ATI Remote Wonder

The Windows box also includes some other standard items, such as a diskette drive, a keyboard, a mouse, a printer, and a scanner, which aren’t particularly HTPC relevant. This PC is my main desktop machine at home, to which I’ve added HTPC functionality. Referring back to the previous functionality list, you’ll see that there is no requirement to incorporate a television display, since my monitor will be adequate. Furthermore, since this particular PC is in my office, I found no reason for it to incorporate an exotic case, and I decided to keep hold onto the run-of-the-mill tower case. With the addition of the All-in-Wonder (AIW), this PC can now perform all the desired HTPC functions.

This HTPC is a standard PC except that it has a bit more hard drive space than usual and can perform TV capture. The second hard drive was purchased for the specific purpose of storing media files and large games. At $350, the AIW was a significant price increase over a typical TV capture card. This purchase was influenced by my desire for a new 3D accelerator card to use in upcoming shoot-em-up games like Half Life 2 and Doom 3.

The AIW is also one of the faster general video cards out there (video cards generally cost between $200 and $400), so it was worth it to me at that price to also have the AV functionality. The particular retail bundle I bought also included a remote control (covered shortly) and various AV connectors. Some bundles for this family of cards do not necessarily include all the extras. Pricewatch.com quotes this particular accelerator card at $285 (as of this writing). There is a faster model, the AIW 9800 Pro, which is quoted at $365 for the “retail box.” The next model down, the AIW 9600 Pro (which was introduced as a value model, after the AIW 9700 Pro was released) is going for about $215 for the “retail box.” The AV features of all the recent AIW cards are more or less identical, except that now the AIW 9600 Pro is the first card to include an FM tuner for radio capture. If you’re interested in the relative 3D performance differences, check your favorite hardware benchmarking site. If all you want is video capture, don’t spend all that money. You can get a good video capture card for under $100, easily. For example, I paid significantly less than that for the capture card in the Linux HTPC; see the “Buildling a Linux HTPC” section in this chapter for details.

Because of the generic hardware, there’s not much to look at. However, Figure 6.5 shows the guts of the HTPC after installing the components.

Figure 6.5 Interior of the Windows HTCP System

It’s a bit of a mess inside, but that’s fine for this application, since the case is normally closed. There’s quite a tangle of cables in the back, too, which also doesn't normally show since they're tucked into a shelf area behind the computer. You can see the rear of the case and the tangle of cables in Figure 6.6.

Figure 6.6 Rear Shot of the Closed Case with Wires

The AIW card has a DVI-to-VGA adapter plugged into it, with the VGA monitor cable plugged into that, and the AIW AV connector and CATV F-connector attached. You can also see the Remote Wonder receiver dangling from the top of the case, which attaches to a USB port in the back. The AIW AV connector is necessary because it feeds the audio out from the AIW card into the line-in connector on the motherboard. The audio signal is fed in this way for most TV capture cards.

Figure 6.7 ATI All-In-Wonder 9700 Pro

Figure 6.7 shows the ATI All-In-Wonder 9700 Pro used in this HTPC. Of special note are the large heatsink and fan as well as the auxiliary power connector in the upper-right corner. This particular power connector is the type you would usually use to power a 3.5-inch diskette drive. It has become extremely common for the latest video cards to require an additional power connection, since they can’t conduct enough power from the AGP slot. This could be a consideration if you’re working with a limited power supply for a very SFF PC or if you’re out of power connectors (though a Y-splitter works just fine). Some of the highest-performing 3D cards on the market at present have a massive heatsink and fan and may be wide enough to block adjacent slots. Those kinds of cards are often not suitable for HTPC projects because of power requirements, size, and noise (the big fans make a lot of noise). For this card, I can’t hear its fan over the CPU and power supply fans. The big silver square in the upper-left corner is indicative of radio frequency (RF) shielding. You’ll almost always see something similar where there’s a TV tuner involved or a device (referred to as an RF modulator) designed to output on a TV “channel,” as opposed to composite or S-Video.

Figure 6.8 AIW 9700 Pro rear connectors

Figure 6.8 shows the back of the card. The VID IN connection appears similar to an S-Video connector, but you’ll notice that the number of pins is incorrect. This jack connects to an external box that has inputs for composite, S-Video, and left and right audio. You would use those to grab video from a VCR, a camcorder, and so forth. The CATV jack is a standard cable TV F-connector. You can screw your coax cable right into the back of the card. The VID OUT connection is another custom connector. The retail package comes with a couple of different splitter cables. One of them has composite, S-Video, S/PDIF, and audio-out connectors. The other has component (YPbPr), S/PDIF, and audio-out connectors. You’ll always be using one of the connectors, since you need the audio-out to get the TV tuner audio channel into your system. This goes into your line-in connector on your sound card. If you don’t set it up that way, you won’t have any sound with your picture.

Add arrows and text to the figure instead of having to call out "connection second from left", etc.

Finally, the ATI Remote Wonder (Figure 6.9) comes with the retail box AIW cards. The receiver connects to the USB port of the PC and receives commands over RF.

Figure 6.9 The ATI Remote Wonder

Performing the Hack

For this HTPC, we use Windows XP Professional as the operating system. If you’re building a similar system using an AIW card, get the OS installed and working with the card, load whatever video driver version came with the card or let Windows use a default driver for the time being. Use Windows Update to install all the patches, including XP SP1. Install Windows Media Player 9 (WMP) and DirectX 9.0b (or whatever the latest versions are) before continuing with any of the additional ATI software.

Next, download the latest version of the software from ATI (www.ati.com). As I was writing this, these were the latest versions:

  • Catalyst drivers 6.14.10.x (wxp-w2k-catalyst-7-95-031028m-011774c.exe)
  • DVD Decoder (atiCDwiz-v2-1.exe)
  • DAO/MDAC (mmc-8-1-0-0-dao-mdac.exe)
  • Multimedia Center 8.7 (mmc-8-7-0-0.exe)
  • Remote Wonder 2.1 (remote-wonder-2-1-english.exe)
  • Hydravision (hydravision-3-21-2108.exe)—optional

Install the files in the order shown. You may have to reboot several times during the process. A couple of notes:

  • The Catalyst driver bundle includes the video card driver, the control panel, and the WDM (capture) drivers. You can also download them separately. In any case, be prepared for some large downloads—a couple of the files are 25MB each.
  • The “DVD Decoder” is actually a program that checks to see if you have your original ATI CD and then downloads the DVD Decoder program and runs it. So, don’t lose your CD that came with your card.
  • The DVD drivers that ATI supplies are nice, since WMP can’t play DVDs without an add-on such as this. Microsoft doesn’t seem willing to pay the DVD player license fees so they rely on the vendors to provide drivers. WMP also cannot rip audio to MP3 without a similar add-on. If you ever try, it will inform you of that fact and send you to a Web page that discusses this topic. They list a few vendors that will sell you a DVD decoder for $14.95, an MP3 encoder for $9.95, or both for $19.95. If you want to play DVDs in WMP, ATI just saved you a few bucks.
  • The DAO/MDAC program is basically a database that the Multimedia Center (MMC) uses. We’ll get to MMC in a moment. The Remote Wonder program, as you might imagine, is a driver for the remote.
  • Hydravision is an ATI tool for managing multiple “monitors.” Note that on an AIW card, the TV-out is a separate display, so if you plan to have a monitor and TV-out simultaneously, you may want to install Hydravision.

Congratulations! Aside from finishing the configuration of the ATI programs, you now have pretty much everything installed to meet the basic HTPC requirements. The MMC will record TV; allow live TV to be paused; play DVDs, CDs, general audio and video files; and has an attractive TV-suitable front end. WMP will rip CDs for you, but it can only do it to Windows Media Audio (WMA) files without the MP3 add-on. Windows itself is adept at game playing (once you install a game, of course), and WMP will do a music “jukebox” function quite well. Obviously, the Remote Wonder remote control is well integrated into this system.

Let’s take a look at some of the MMC functions. There are three main ways to access the MMC features:

  • Through Eazylook
  • Through the launcher
  • Using Guide Plus+

· Eazylook

Eazylook is what you get when you use the remote control. Across the top of the remote are several buttons: TV, DVD, Web, Library, and Screen grab. When you’re in regular desktop mode, pressing TV, DVD, or Library will launch Eazylook (Figure 6.10).

Figure 6.10 The Eazylook Welcome Screen

The various text elements are sized appropriately for television display. For example, Figure 6.11 displays what the small library of shows I have captured to my local PC looks like on-screen.

Figure 6.11 Eazylook Text on Screen Text Layout

The DVD and TV functions show the appropriate video and overlay the status information as needed. The menus that pop up over the video are partially transparent, and the overall look is fairly nice. All the functions you need while watching TV are available from the remote.

· Using the Launcher

ATI also provides a program called Launchpad, which allows you access to all the major functions. It can function as a menu or a floating toolbar (Figures 6.12 and 6.13).

Figure 6.12 ATI Launchpad

Figure 6.13 Launchpad (floating)

Alternatively, if you prefer to not give up the screen real estate, by default ATI leaves an app running in the Taskbar (Figure 6.14). If you right-click it, you can access the programs that way.

Figure 6.14 ATI Taskbar Program

And, of course, you can get at them via the Start button, in the ATI Multimedia Center program group. When launched this way, they look like normal Windows desktop apps.

· Using Guide Plus+

Finally, there’s Guide Plus+, which is a program guide and scheduling application. The Welcome screen for Guide + is shown in Figure 6.15.

Figure 6.15 The Guide Plus+ Welcome Screen

You can right-click any of the listings (shown in Figure 6.16) and schedule a program to be recorded. If the program is playing now, you can click it, and your device will start showing that channel. You can even schedule it to “watch” so it comes on in the future, if that is useful to you. There is also a search function, so you can look for all the showings of your favorite show and schedule those to record. You have a choice of several recording qualities, with the requisite size/quality tradeoffs. These days, Guide Plus+ provides functionality closest to an off-the-shelf TiVo.

Figure 6.16 Guide Plus+ Main Screen

We won’t cover WMP usage here, since most of you are probably already familiar with it and it is quite easy to use. If you buy an MP3 encoder module for it, it will make MP3s for you, as well. Instead, we will briefly cover two free software packages: CDex and FairUse.

· CDex

CDex is my favorite all-around Windows CD ripper (Figure 6.17). CDex is capable of digital ripping. It can also rip to a variety of other file formats, including uncompressed WAV, MP3, Ogg Vorbis, and others. It integrates with the CDDB to get track titles for you, and it works the way you would expect. You can download CDex from the following location: http://cdexos.sourceforge.net.

Figure 6.17 The CDex Main Interface Page

When you install CDex, you simply set your preferences (directory to rip to, compression type, rate, and so forth) and pop in a disc. CDex will find the album on the CDDB (unless you’ve got something pretty obscure) and fill in the track names. Then you simply start it up, and it goes to work ripping CDs at lightning speeds.

· FairUse

FairUse (FU) is billed as DVD backup software (Figure 6.18). FU is free of charge and comparable in functionality to CDex—it works just as well. You can download FairUse from the following location: http://fairuse.sourceforge.net.

Figure 6.18 The FairUse Wizard Welcome Screen

There are several steps to ripping a DVD with FU. After clicking the I Agree button on the Welcome screen, you’ll be asked to pick a project name and location, as shown in Figure 6.19.

Figure 6.19 The New Project Name and Location Screen

Click Next, and FU will ask you to confirm the drive letter of your DVD drive. Pick the appropriate one. After it scans the disc for a moment, it will display the “chains” on the DVD, as shown in Figure 6.20.

Figure 6.20 Chain Display of the FU Wizard

The chains are simply the various bits of video contained on the disc. You’ll have to figure out which ones are which by trial and error. This particular disc (the James Bond film Moonraker) contains both standard and wide-screen versions of the film, which are for the two two-hour chains. Here we’ll demonstrate chain 57, which happens to be the theatrical trailer included on the disc. Select the appropriate chain(s), and click Next. After FU scans the selected chain for a period of time, you’re presented with a screen where you can select (with some cropping) the frames you want. An example of the cropping screen is shown in Figure 6.21.

Figure 6.21 The FU Cropping Screen

You can set the bounding box around the picture, so you’re not spending time and space working on the black areas (though they should compress nicely). The Auto set feature seems to do a decent job detecting the appropriate area most of the time. You can set a specific frame range if you don’t want the whole thing. The slider underneath the picture window lets you look at various frames, so you’ve got a visual way to pick. The next screen (not shown) lets you choose between a variety of video modes. Most of the time, you’ll want to stick with what Auto Detect picks.

Next, you are able to choose from different compression types and resolutions, as shown in Figure 6.22.

Figure 6.22 Selecting a Compression Type

Pick the size you want, and click Next. On the following screen, select the encoding types (Figure 6.23). In this example, we've selected Auto Add under XviD and picked the only choice given under Audio Encoding.

Figure 6.23 Selecting the Encoding Method

The next screen is where all the magic happens. On my Athlon XP 2700+, it takes several minutes to encode the 4.5-minute clip.

Warning: Hardware Harm

Video encoding is one of the most CPU-intensive things you are likely to do on your computer. Funny story: When I was preparing this section of the chapter, this step kept crashing on me. My computer rebooted a couple of times and once powered down spontaneously. It turns out that when I had opened the case to take the pictures earlier in the chapter, I had to dislodge a whole herd of dust bunnies before taking the pictures. I did so with a can of air. That meant there was a lot of free dust in the case. After I closed it back up and starting doing some test DVD rips, the CPU fan was going and managed to lodge a fair bit of the free dust into the CPU heatsink, thus clogging it up. When I was troubleshooting the shutdown, I happened to check the monitor in the BIOS, and it said the CPU was 70 degrees Celsius (approximately 158 degrees Fahrenheit)! I realized what was happening, opened the case back up, and used the can of air to unclog the heatsink. After that, the CPU was running at a normal 48 degrees Celsius or so. Still, now that I was on the alert, I watched the temperature monitor while I was ripping. The CPU temperature climbed to about 54 degrees Celsius, one degree at a time, due to the intensive work required by the ripping software. After the rip was done, the temperature settled back down to 48 degrees Celsius. Heat kills!

After the rip is done, it’s ready to add to your media library. Then, you can safely store the original DVD away where children or your pets can’t destroy it.

The ATI Remote Wonder is well suited to Windows use. It can act as a two-button mouse and has pretty much all the buttons you would want for an HTPC remote. The buttons can perform somewhat different functions depending on the application that is in focus, and it provides six general-purpose programmable buttons (A through F). The remote functions with just plain Windows as well, with the buttons producing Windows messages, which is how Windows informs applications of keyboard and mouse events. Several of the buttons produce WM_APPCOMMAND messages, so if the application you use understands those (as WMP does), it will work for that, too. If that’s not enough, an SDK is available from ATI that will allow you to make custom plug-ins for the Remote Wonder software for any application you like. ATI gives you plug-ins for PowerPoint and Winamp, and you can download plug-ins for TheaterTek and DivX Player.

Note

For additional information on the ATI Remote Wonder, refer to the following sites:

 

Windows Summary

Overall, I’m very satisfied with the functionality of the Windows HTPC I’ve described. The hardware is first-class. I could always stand a little more CPU, RAM, drive space, and the like, but they’re certainly adequate. One thing I wished I had planned for better is IDE ports. This particular motherboard has the standard primary and secondary port, of which I’m using the master and slave on each. For performance, it’s nice to have just one drive per channel when possible. My main complaint about this setup is cost. If I wanted to replicate something like this for each TV in the house, buying a $200 Windows license per box would be somewhat painful.

Building a Linux HTPC

The Linux HTPC was designed with set-top use in mind. The case chosen is small, attractive, and quiet. I went light on the disk space, since I’m planning to have a lot of the storage on a server elsewhere in the house (the Windows HTPC previously described, for the time being). I’ve installed a DVD drive, so it can be used for walk-up DVD playing as well as ripping.

Preparing for the Hack

The following parts were used to create this particular HTPC running Red Hat Linux 9.0:

  • Shuttle SB51G
  • Intel 2.4 GHz Pentium IV
  • 256MB DDR266 RAM
  • Shuttle CV21 TV-out/DVI card
  • Shuttle PN31 remote control
  • Silver Artec 16X DVD-ROM
  • Western Digital WD400BB 40GB hard drive
  • AITech WaveWatcher TV-PCI TV tuner/video capture card

You’ll notice that the list for the Linux HTPC is much shorter and contains fewer components than the Windows machine. This is due to the fact that I selected the Shuttle SB51G. The Shuttle SB51G is part of the Shuttle XPC family (www.shuttle.com), which is a well-known SFF format that includes the case, motherboard, and power supply. You supply the CPU, RAM, drives, and up to one AGP and one PCI card, depending on the model you select. The particular model tells you what kind of motherboard, chipset, and video it supports. Figure 6.24 shows what the Shuttle SB51G case looks like from the front.

Figure 6.24 The Shuttle SB51G Box

You can see from the size of the DVD drive in comparison to the rest of the case how truly compact this case is. The dimensions are 7.9”W ´ 7.3”H ´ 11.8”D. In other words, the footprint is approximately the same as an 8.5” ´ 11” piece of paper with the height about the same as a stack of books.

For this case, I was more concerned with aesthetics than with the HTPC in my office. I went out of my way to find a silver DVD-ROM drive. Incidentally, if you’re looking for silver optical and diskette drives, Directron.com is one of the few places I found that carries a selection of them (www.directron.com). Also, if you are interested in further customization, it is possible to purchase a variety of multicolored kits for the Shuttle XPC to suit your needs.

These boxes make excellent HTPCs for a couple of reasons:

  • They look nice
  • They’re quiet
  • They’re small enough to fit in your TV/VCR cabinet
  • They’re full of features

One thing you might miss are additional expansion slots, since they’ve only got a single PCI and a single AGP slot available (though that should be enough for your HTPC). Figure 6.25 shows the back of the case, which includes:

  • Two serial ports
  • Ethernet jack
  • Built-in VGA
  • Fiber audio-out
  • Two Firewire ports
  • Two USB ports
  • Keyboard and mouse ports
  • Built-in audio (multipurpose, depending on settings)

All of these listed features are in addition to the front of the case, which contains another set of audio connectors, two more USB ports, and another Firewire port.

Figure 6.25 The Rear of the Shuttle SB51G

Shuttle keeps coming out with new models, so you can generally get one with the latest chipset and processor for both AMD and Intel. The only real limitation is expansion. There’s room available for a full-size optical drive, a 3.5-inch diskette drive, and a 3.5-inch hard drive. You can install a second hard drive if you want to forego the diskette drive. As you might imagine, the inside is rather tightly packed, as shown in Figure 6.26.

Figure 6.26 The Interior of the Shuttle Case

Still, Shuttle has made it relatively easy to get your parts in and out. As you can see in Figure 6.27, unscrewing two screws and disconnecting the various cables from the drives allows you to easily remove the entire drive cage.

Figure 6.27 Removing Parts from the Shuttle Case

Inside the case are your standard two IDE controllers, a diskette controller, two RAM slots, power connectors, various headers for USB ports, and so on. The Shuttles typically have two fans—one in the power supply and a main case/CPU fan. One of the reasons the Shuttles are quiet is that they have an innovative heatpipe cooling system with a variable-speed fan, as shown in Figure 6.28.

Note

An excellent review of this heatpipe cooling system is available on the Web at: www.overclockers.com/articles651.

Figure 6.28 The Shuttle Heatpipe Cooling System

In Figure 6.28, you can easily see the heatsink base attached to the CPU with four liquid-filled pipes attached to it, which in turn are connected to a pseudo radiator. The radiator sits between the back of the case and the large case fan. When the case fan spins, it pushes air through the radiator, cooling it. Conceptually, this is similar to a car radiator and fan. The end result is that the fan cools effectively at a fairly low speed (about 2,000 RPM) and is very quiet. The fan is variable-speed, though, and can speed up as needed if the temperature goes up. The threshold is settable in the BIOS. The fan is capable of reaching speeds of up to 4,000 RPM and is quite loud when rotating at such a speed. This HTPC uses two add-in cards, one for each of the available slots in the Shuttle case. One of them adds TV-out to the built-in video. The other provides TV capture capability. These cards are shown in Figure 6.29.

Figure 6.29 The TV Capture Card (Left) and the TV-Out Card (Right)

The TV capture card on the left has inputs for SVHS (S-Video), ANT (broadcast, CATV), composite video, and audio-in. Like most capture cards, it has an audio-out, which is fed into the line-in port on the sound hardware. Note the mini-phono pigtail visible in the bottom portion of Figure 6.28. The TV-out card has composite out, S-Video-out and DVI-out. For a full view of both cards, refer to Figure 6.30.

Figure 6.30 The TV Capture Card (Top) and TV-Out Card (Bottom)

The AITech WaveWatcher TV-PCI card is also fairly simple—some chips, some analog electronics, and another RF-shielded tuner, similar to the one found on the AIW 9700 Pro. (That’s what is under the big sticker.) However, according to AITech, this isn’t a real WaveWatcher card, it’s an OEM version of a NetTV-98 card. Why the sticker says otherwise, I don’t know, but AITech is right. All the drivers indicate that it’s a NetTV-98 card. The bottom line is that AITech doesn’t support it and only has beta-level drivers available for Windows 2000 and Windows XP. They load, at least, but they are only the older Video-for-Windows (VfW) drivers, which don’t work with recent TV capture applications. That’s okay, though—we’re using this card with Linux. My Red Hat 9 installation recognized it with no difficulties. When planning a Windows HTPC, I like to make sure I have a recent card that looks like it will have driver support for some time, but Linux can be more forgiving in this area.

The Shuttle CV21 (TV-out) card contains a single chip with associated support electronics. The TV-out card is inserted into the AGP slot. This particular card is specific to the Intel video chipset used on the Shuttle SB51G, so if you’re thinking about using another model case, make sure you purchase the correct version of TV-out card.

Figure 6.31 shows the positions of the installed cards. Now there’s even less room inside the tightly packed case. In the middle of the picture, there is a rubber "foot" underneath the right edge of the TV capture card. This came preinstalled on the drive cage to prevent long expansion cards from coming into contact with the metal housing of the case.

Figure 6.31 The Two Cards Installed in the Shuttle Case

Note

For more information on the AITech WaveWatcher/NetTV-98 OEM, refer to the following Web sites:

 

The Shuttle PN31 remote control is another accessory in the Shuttle line, but it must be purchased separately (the one shown in Figure 6.32 cost $29). The receiver connects to the USB port of the PC and receives commands over infrared (IR).

Figure 6.32 Remote for the Linux HTPC

Under the Hood: How the Hack Works (Software)

For the Linux HTPC, we're using Red Hat 9.0. However, feel to use whichever distro you choose, as long as it has a recent kernel and decent multimedia support.

Linux is free and flexible. That flexibility sometimes means that you have to do a bit more work to get your software installed and working the way you want, especially if your chosen vendor doesn’t produce packages of the software you desire. Chances are, to get the setup exactly the way you want, you will have to be comfortable with compiling and installing software, editing configuration files, and maybe even configuring and compiling the Linux kernel. If you’re not experienced at that, give it a try anyway. We’re talking free software, so you’ve got nothing to lose but a little time. The majority of software packages come with adequate build instructions and compile just fine on a typical Linux install. You may have to do a little Web searching here and there if you run into a problem, but that’s how you learn (and part of the fun of hardware hacking).

Of special note for the base OS install is the X configuration. Do your best to set up Xfree86 optimally, including DVI support if possible. This will help with overlay video.

The main application that the majority of users work with is MythTV. However, before installing the MythTV GUI, you’ll need to accomplish a few other tasks:

  • You will want to make sure your sound drivers are working properly.
  • You will want to make sure you can access your DVD drive, if you have one.
  • You will want to make sure that you can capture video and sound from your TV card.

Under Linux, you have a few different choices for sound drivers. The two most common are:

  • The Open Sounds System (OSS) drivers
  • The Advanced Linux Sound Architecture (ALSA) drivers

The OSS drivers have the advantage of supporting multiple Linux platforms. However, if you’re working strictly with Linux, the ALSA drivers are a better choice for a variety of technical reasons and will likely be the default choice for Linux drivers in the future. The ALSA drivers also emulate the OSS API; therefore, the ALSA drivers are used in our Linux-based HTPC. As an aside, when using the Shuttle hardware, significantly better sound quality was obtained with the ALSA drivers than with the OSS ones. However, by default, Red Hat uses the OSS drivers.

· Installing the ALSA Drivers

You will need to obtain a set of drivers for your TV capture card. There are a large number of drivers, and the correct one to use obviously depends on what kind of card you have. The card used in this setup is a Brooktree (BT) chipset, so the corresponding driver is bttv (http://bytesex.org/bttv).

Most of the various capture card drivers for Linux provide a Video 4 Linux (v4l) API, which allows various capture applications to work with the different cards and drivers. Many of the less expensive cards use BT chipsets. Red Hat 9 includes bttv support and our card was detected properly.

Note

For more information on the Video 4 Linux resources, check out the following Web site: www.exploits.org/v4l.

Need to Know…

A Note About Channel Frequencies

I’ve indicated that my capture card was supported out of the box. Well, it was, but I didn’t know it! The first time I tried working with the card, I followed the advice in various documentation and mailing lists posts. They said to use the xawtv application to test your card. So I did, and I was getting nothing but a mostly blue/green screen. All the help I could find indicated that this meant my tuner wasn’t configured properly. I grabbed the latest bttv version and compiled and installed it myself, double-checked the kernel loadable modules (KLMs) that support the various v4l and bttv drivers, and tried a variety of different settings—all to no avail. Finally, just an as experiment, I grabbed an old VCR I had lying around. I attached the VCR to the composite-in port on the card, set xawtv to Composite, and got a picture, no problem. That indicated that at least part of the setup was working. Having an external tuner is a great troubleshooting tool, and you probably won’t find a cheaper one than an old VCR. When I was trying to use xawtv, another error message I got consistently was:

tuner: TV freq (268435455.93) out of range (44-958)

I also couldn’t find where in the xawtv options that I could change channels. The documentation seemed to imply that when the tuner was working, I’d be able to do so.

I had already installed MPlayer, which I had used to verify CD and DVD playback. I highly recommend MPlayer for a variety of uses, and often other software you’ll want to use will use MPlayer behind the scenes, so you may need it anyway. I found out that MPlayer can do capture as well, and I figured I would try that, just because. So I executed this command:

mplayer -tv driver=v4l:norm=ntsc:channel=3:chanlist=us-cable:width=352:height=240 tv://

And, lo! I had TV, with sounds and everything. Okay, so I figured that xawtv was just broken somehow, which seemed strange, since it was from the same programmer who did the bttv drivers. After some poking around, I eventually tried xawtv again, and now it was working, too! Turns out that xawtv needs to be provided with a list of channel frequencies before it will do anything with channels, and my card was set to some nonexistent channel. The usual way to solve this is to use the scantv utility, which Red Hat does not supply with xawtv, even though it normally comes with it. Once you have scantv, do:

scantv -o ~/.xawtv

This will fill in the settings file with all the channels it can find, and then xawtv lets you pick.

· Install MPlayer and Codecs

At this point, if all your drivers and software are working properly with your hardware, then you’ve got enough to actually watch TV and record it. The ALSA and v4l drivers take care of the hardware, and MPlayer can tune, display, and capture TV feeds. Of course, MPlayer by itself doesn’t do all the features we would like, which is why we need to install MythTV.

· Installing MythTV

MythTV (www.mythtv.org) aspires to be a full-featured HTPC system, including features for HTPC networking. It has ambitious goals, but even at only version 0.12, it does pretty well. My main complaint is that it’s a pretty heavyweight set of packages and takes a fair bit of work to install. As with just about any open-source package, you’ve got the choice to install from source or from a binary package.

We won’t show the process for compiling from source here. The MythTV site has an excellent and lengthy set of instructions on how to do so.

If you want to try installing from binaries, a site named ATrpms (http://atrpms.physik.fu-berlin.de) has binaries for Red Hat distros, with an emphasis on multimedia and a few other package types. This is in addition to the binaries that Red Hat supplies, since Red Hat doesn’t maintain MythTV binaries for you. However, be aware that ATrpms uses apt-get for dependencies, and it will replace/upgrade quite a few packages for you, generally breaking the Red Hat versioning scheme for those packages. In my case, I ended up with a fully working system, but I am now running their kernel, drivers, media packages, and a number of other items. MythTV uses MySQL as a database and there is a mythbackend daemon you’ll need to run when you’re using it. A Myth Transcode Daemon (mtd) needs to be running to rip DVDs. Finally, there’s mythfrontend, which is the foreground app shown in the following screenshots. The backend stuff can all be run on a separate server box, which allows you to have a separate or multiple frontend boxes.

The MythTV front end is shown in Figure 6.33.

Figure 6.33 Front End of MythTV

The white arrow in the lower-right corner indicates that more choices can be found by scrolling down. Not shown in this picture are News Feeds, DVD, and Setup.

Myth performs all the functions you would expect, including videogames, as it can act as a front end for the popular Multiple Arcade Machine Emulator (MAME) engine. You customize the Weather section for your area so you can get the weather at a glance (Figure 6.34).

Figure 6.34 MythTV Weather Screen

Myth also automates some of the more difficult functions, like CD ripping and DVD ripping. The DVD ripping is particularly easy (Figure 6.35).

Figure 6.35 MythTV DVD Screen

From the DVD menu, pick Rip DVD (Figure 6.36).

Figure 6.36 MythTV DVD Ripping Screen

On the next screen, pick the section of video you want to rip. In this screen, there are five sections. The first one is the main movie, which we can identify by its length. The other options shown here aren’t necessarily functional yet, such as the quality selection. The default Perfect quality results in a direct translation of the MPEG2 from the DVD. The movie ripped in this example came out to just over 4 gigabytes.

Give the video clip a name, and press the 0 (zero) key to start the process (Figure 6.37).

Figure 6.37 MythTV DVD Rip In Progress

Once ripped, the movie will be added to the Video list (Figure 6.38).

Figure 6.38 MythTV Video Library Item

The naming was done in an earlier step (not shown) where it accessed the Internet Movie Database (IMDB) and presented me with a list of movie names similar to Labyrinth.

Of course, Myth does your standard TV functions, including an initial pass at a “favorites” system for TV shows (Figure 6.39). You can watch “live” TV (with pause and rewind functionality) or schedule recordings. A Perl program, XMLTV, is used to feed Myth a program guide for your area. XMLTV can be found at xmltv.sourceforge.net.

Figure 6.39 MythTV TV Screen

Need to Know…

Linux USB Woes

Of all the things that might have given me trouble on the Linux project, I didn’t expect the remote control to be the worst. I learned a lot more about how USB works under Linux than I ever wanted to. The short version of the story is that I ended up compiling my own kernel and patching one of the USB drivers in order to get the Shuttle remote fully functional. It’s unclear whether the USB support for this device just wasn’t all there in the earlier kernel (2.4.20), but the remote wasn’t even recognized properly until I compiled and booted 2.4.23. Then, the mouse didn’t work properly.

After some searching and mailing, I was given a working patch to hid-core.c by Norbert Federa. Many thanks to Norbert, Peter Bergmann, and the Linux-usb-uses mailing list for all the help.

Hopefully, by the time you read this, it will be incorporated in an easily downloaded kernel binary for you. The patch follows:

--- hid-core_orig.c   Mon Dec  8 23:11:58 2003

+++ hid-core.c    Mon Dec  8 23:14:33 2003

@@ -272,6 +272,11 @@

     field->unit_exponent = parser->global.unit_exponent;

     field->unit = parser->global.unit;

 

+    if(field->logical_minimum == field->logical_maximum) {

+        field->logical_minimum = -1;

+        field->logical_maximum = 1;

+    }

+

     return 0;

 }

Linux Summary

The Shuttle makes an excellent HTPC platform, though the software configuration required a bit more effort than I would have liked. The weakest link in this particular HTPC is the cheap video capture card. The card produces electrical interference that causes static and a wavy picture on the display. Since I only paid about $16 for it, that’s not at all a surprise. I chose that card mostly as an experiment and to illustrate a point (that Linux has good legacy support).

Here are Web sites related to Linux HTPC that you may find useful:

Further Hacking and Advanced Topics

The two HTPCs shown in this chapter together represent Phase 1 of my planned home media network. The Windows HTPC is an experimental media server and the Linux HTPC is an experimental set-top box. My ultimate plan is to have a dedicated media server in the garage with a terabyte of storage and multiple capture cards. I plan to make the set-top boxes extremely simple. The Windows HTPC is my prototype server, as it has the storage space, and capture and rip capabilities. Obviously, it’s not presently dedicated solely to this purpose as I use the machine for other computing tasks, as well.

One way to achieve this goal is to push as many of the functions as possible to the back end and make the front end very lightweight. For example, say your front end has a modest CPU and can only do MPEG2 videos. You could have the back end transcode everything (maybe in real time) to MPEG2 for the light front end.

There are front end products on the market that are supposed to do just that. Some of them are called “media receivers” or “networked DVD players.” For example, the MediaMVP Model 1000 by Hauppauge. It only does composite out to the TV and it takes MPEG1 and 2 streams over Ethernet. I haven’t even had a chance to take it out of the box yet, so I can give no specific feedback, but it was only $88 new. It requires a Windows XP back end at present, but it claims to be “Linux based,” which I take to mean that it’s running some kind of Linux kernel inside the device itself. There is great potential for these types of devices to be hacked in the future.

There are many HTPC topics we didn’t have space to cover in this chapter. For example, all the TV capture examples here are NTSC captures. We didn’t touch on HDTV broadcast at all. Capturing HD signals is a whole different ballgame. However, we hope that you’ve been inspired to create an

Last Updated ( Saturday, 05 February 2005 )
 
Related Items
I-Hacked's Most Popular
2006 I-Hacked T-Shirts
 I-Hacked T-Shirts
Have been released, Now with
3 versions!

Check them out here

Latest Articles
Top of Page

If you see information here that you know is inaccurate, out of date, misleading, confusing, or just blatantly wrong, please let us know. Updates and corrections are reviewed and updated as they are received.

 
Disclaimer
I-hacked.com does not take any responsibility with the information presented. Any information provided on this site is not guaranteed in any way. Some articles may discuss topics that are illegal, so this information is provided for educational purposes only, use at your own risk. If you blow up your car, home, computer, or anything else -- it's not our fault, use good judgement and play nice.


© I-Hacked.com LLC