building a linux htpc

shuttle case
After throwing around the idea for about a year or two, I have finally invested in building a home theater pc. For those of you too lazy to click on the link I just provided you
and have no idea what I am talking about, a HTPC is a mythical media convergence device…an uber-tivo if you will. The general idea is to combine all components of a home theater system – DVD, music, PVR, video games, etc – into one small computer component that I can hook up to a TV. This will be a psuedo-manual and summary of my struggle in setting up my new toy.


the hardware
Before starting I researched thoroughly into what kind of parts I would need to buy, and what parts I already had that I could cobble together. It is important to note that I had already made up in my mind at this point that my box would be running mythtv (a linux pvr program), so I made sure to check into the wiki there heavily for advice. Besides a general ‘computer’ to run the OS, the other notable part required for a htpc is a pci tuner card which can record programs from cable and record them on the harddisk. There are many massive headache inducing arguments about what card is best, but generally the most highly recommended are Hauppauge products in the 150/250/350 model range. The following then is a summary of what parts I purchased/used and why:


Case/PowerSupply/Motherboard: Shuttle SG31G2
Why: Beautiful case with a great reputation. Overhead, its about the size of a normal piece of paper, yet the guts are packed with powerful, expandable parts. CPU is not included, which is why I picked it; I can upgrade from Intel Celeron to Core 2 Duo etc. in a snap. Also it has both IDE and SATA, PCI and PCI Express, on board video with DVI out.
CPU: Intel Celeron 2.8 GHz
Why: Already had it laying around from my main desktop when the motherboard died. Works like a champ.
Ram: 2 GB (1 Stick)
Why: Well I needed RAM. I went with 2GB because I want this box to run as my mini webserver and torrent downloader as well. Should have gotten 2 sticks though instead of one in case I upgrade to a dual core system in the future. *Smacks forhead*
Tuner Card: Hauppauge WinTV-PVR-150
Why: The DVR standard. Encodes straight to MPEG2, taking the load of the processor. This package also includes a remote.
Hard Drive
Why: A big hard drive is key since standard MPEG recording takes about 2GB per hour.
PC to TV Converter: Gigaware® PC to TV Converter
Why: This part was only necessary becuase of the TV I will be using. While the motherboard on the Shuttle case has DVI/VGA, my TV only has s-video. This converter uses only USB power and can convert VGA to s-video or component, very cool.


the software
Although MythTV will be doing most of the grunt work, it needs to run on a Linux OS. Since I am most comfortable with Ubuntu, I decided to use the Mythbuntu, a specialized Ubuntu derivative focused upon setting up a standalone MythTV system. Mythbuntu automatically detects and installs all hardware and sets up the notoriously difficult MythTV, leaving little work for me to do. We will see below if this really holds true, but this is at least my plan.
Now a little blurb about how rad MythTV is. The project is the brainchild of Isaac Richards, who was inspired to write the program due to the terrible quality of AT&T cable boxes. He explains: “Yes, I could have just bought a TiVo, but I wanted to have more than just a PVR — I want a webbrowser built in, a mail client, maybe some games. Basically, I want the mythical convergence box that’s been talked about for a few years now.” At its core, MythTV is your basic TiVo. It controls the recording of TV via the users preference. However what makes MythTV x100000000 times more nerdy-awesome is that it has a plugin system that permits it to be extended by other programmers (its entirely open source, meaning if you don’t like something you can change it/add it/etc). Plugins currently support playing external video (ahem torrents), viewing photos, listening to music, browsing the web, retrieving current local weather, PLAYING EMULATORS (could you sense the excitement? I plan on installing everything from NES – N64 on mine with as many games as possible).


the setup
the install
Like I mentioned before, all you need is a decent computer (with large hard drive) with a PCI tuner card to have a great Mythbox. Individual hardware setup/configurations will vary, but mine was fairly typical. Unpack case. Plug in RAM. Plug in CPU. Plug in Tuner Card. Plug in. Go!
Next I downloaded and burned a Live CD copy of Mythbuntu. Great thing about many linux distros is that you can try them completely out using a Live CD which runs on boot without installing to your local hard drive. In my case, Mythbuntu has you install via the Live CD. To start all you do is put the CD in the CD drive of your computer and let it boot. A menu will appear similar to the one below, select “start or install mythbuntu”.
mythbuntu startup
My CD drive started to go into a frenzy but no worries, its just loading Linux into the RAM. Very soon a login screen appeared, with a timed log in. I am sure there is a password published in the official instruction manual, but hell I’m a stubborn bastard so I waited the 30 seconds for the auto-logon. After logging on, a friendly computer desktop popped up. Ahhh XFCE desktop…its so lightweight and perfect. I poked around at any programs (little browsing the internet during installation), all, except MythTV which requires a little setup. Double clicking on the subtle “Install Mythbuntu” icon starts up the installation.
Now we are talking. Installation for the most part is a cinch. Provide your native language, location and keyboard setup. Next comes the first ‘tricky’ part: setting up hard drive partitions. There are infinite ways to do this. I will be installing myth/linux on a 80GB HD and getting a 400+GB HD for the recording. Next since this is my first MythTV machine on the network, I selected Standard installation. If you have one, Mythbuntu will try to configure your remote next. After realizing I really had to jam the plug for the remote sensors far into the PCI slot of the tuner, Mythbuntu set this up FLAWLESSLY. When complete, a screen summarizing the install configuration screen came up. Double check it…alright lets go. Clicked install, grabbed a beer and let it do its thing.
When Mythbuntu finished installing the lightweight ubuntu os, it started up the separate mythtv setup. There are again a mirad of options here, but essentially it has you configure the capture card. My PVR-150 was recognized in a snap (as a MPEG encoder card), and I made sure that all recordings would be done through the NTSC cable connection. This is also where I configured my ‘video sources’ or the source of the schedule listings. Schedules Direct, a non-profit organization made to exclusively provide this data, provides $20/year subscription services (very reliable and cheap!). I signed up and it works like a charm. When finished, Mythbuntu asks if you want to run Mythfilldatabase, which will populate the schedule database with you programming data. Awesome. Based on previous proof-of-concept setups that I’ve done, Mythbuntu has so far made setting up a mythbox incredibly easy. Just one more restart, and my box was running on its own.


the configuration
185px-screenshot-mythtv-retro.jpgAfter a speedy restart, MythTV starts up automatically. Looks nice! First thing I did was try to watch TV. Yay! It works! I jumped up and down like a school girl when pressing the spacebar froze the program in its tracks. Rewind! Fast Forward! The coolness factor is pretty overwhelming, but it there was plenty to still do. I went through Utilities/Options, configuring the system to my preferences. Nothing better than tweaking, nothing! While there were plenty of user-preference configurations to set, the core mythtv part of my mythbox was fully operational.
Next step was to setup the other highly anticipated feature of Mythtv: MythGame. This MythTv plugin is not an emulator itself, but a game browser and launcher. The more technical aspects of this setup can be found here in this great guide. First up was SNES, my personal favorite. Ubuntu actually has a great SNES emulator, ZSNES, in its repositories so it was a simple command line install to set it up. Then I configured the settings in Mythgame according to the guide I linked above. Then, using my remote, I was able to navigate to the MythGame menu and navigate through my large collections of roms and select the one I wanted to play. Started right up no problem. The only thing I that I will need to configure is a way to exit the emulator (possibly via the remote) when I am done since I don’t plan on using a mouse/keyboard all the time. There appears to be a workaround here but I have not implemented it yet.



Twitter | RSS Feed