Linux 1080p HTPC

February 25th, 2008

So, I finally broke down and built a HTPC (home theater personal computer). Actually, I bought it in late December, and have had it mostly up and running since about the middle of January, but I’m just getting the chance to post about it now.

I knew from the start I wanted to run Gentoo Linux with MythTV, and I must say it was an adventure getting it all working. I’ve outlined the details of the build for anyone interested in doing something similar, or who might just be curious.

The hardware

GIGABYTE GA-73PVM-S2H
Seagate Barracuda 7200.10 ST3160815AS 160GB
Intel Celeron 420 Conroe-L 1.6GHz 512KB L2 Cache
Kingston 1GB 240-Pin DDR2
Lite-On Black DVDRW
eDATA DEC-200B Vista Certified Infrared Remote

I already had a low profile desktop case sitting around which I used for the project, so that’s not included. Total without the case was just under $300. I later added two Logitech ChillStream game controllers for playing console game emulators.

The motherboard was chosen because it had “everything” I needed onboard and didn’t cost a fortune. I needed HDMI out for my new Sharp Aquos 42″ HDTV so I could have a clean digital signal at the full 1920×1080 resolution.

The other stuff should be fairly obvious, I had to have a processor, drive, memory, and of course since this is an HTPC, a remote control. Since I wasn’t planning on doing anything particularly processor intensive (see goals) and I was going to be accessing nearly all my media over the network a fire breathing processor and giant hard drive weren’t necessary.

Goals

I wasn’t interested in a TV tuner or using this as a PVR/DVR, nor archiving DVD’s. I wanted this to replace the DVD changer in my existing HTIAB (home theater in a box) and be able to play DVD’s upscaled to 1080p. Also I wanted to be able to play video captured on my Sony HDR-HC1 HD camcorder at it’s native resolution.

Secondary things would be playing my fairly sizable MP3 music collection, looking at pictures, and other cool stuff you can do with a computer connected to your television.

Wrestling with the feral Gentoo

Since I was dealing with “bleeding edge” hardware at least with the motherboard chipset and the remote control, getting Gentoo linux up and running with support for all of my hardware would be a challenge.

After a fair amount of googling, and plenty of trial and error, I was able to get things working. For the sake of reference, I’ll document the highlights of getting things going.

1) The 2007.0 Live CD wouldn’t recognize my SATA DVDR drive unless I booted it with “gentoo all-generic-ide”, and set the sata controller to “IDE” in the bios.

2) The latest nvidia driver available in portage (100.14.19) didn’t seem to properly support my video hardware, so I downloaded the latest from the nvidia website (169.07) which seemed to work much better. I actually went so far as to make my own custom ebuild for it.

3) The latest lirc available in portage (0.8.2-r2) didn’t seem to properly support my MCE2 USB style remote control. At the time 0.8.3_pre1 was masked as unstable, but it did the trick

4) Getting the ChillStream’s to be recognized by the kernel was interesting too. A kernel module (xpad) exists that is meant to support these type of controls with the XBOX-360 style. However, a patch was necessary to properly support these. It just added the PID to the source to support this controller. They work great now. :-)

Results

So, after all that did I reach my goals?

Yes, and then some! Below is a list of the highlights of functionality, but in all this project was quite a success. And I think the functionality is impressive considering the bargain price!

One of the things which came as a pleasant surprise was getting MythGame setup with some emulators of old consoles I’d played. It’s amazingly nostalgic to play some of those Nintendo games!

What works
* MythFrontend at 1080p over HDMI (should show modelines)
* MythVideo/DVD playing any video I like at native resolution
* xine playing DVD’s at 1080p
* MythGallery
* Audio out through TOSLINK optical output, passing along AC3/Dolby Digital & DTS
* MythMusic to play MP3 files from the network
* MCE Remote Control to run MythFrontend
* MythGame

What doesn’t
* Audio out through HDMI

Future plans

Now that the HD DVD vs Bluray war is apparently over when the drive prices come down a bit more, I intend to put a Blueray drive in this. I suspect I’ll need a more powerful processor to successfully play a movie though. I’m sure that linux will have limited or non existent support for the format for some time to come as well, so we’ll see how that plays out. The hardware is mostly up to the task though, and represents a bargain compared to the several pieces of equipment that would have been required to do the same stuff.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon

Image thumbnail generating script

February 20th, 2008

I have often wished that I could easily convert several images to a smaller size simultaneously. This is useful for batch resizing images for thumbnails, galleries, or use on the web.

On a linux system with imageMagick installed, you can use the script at the end of this post to batch convert the images.

I use it to create thumbnails and scaled images for my online photo gallery using the following commands.
./imagethumbnail.sh “*.jpg” “800×600″ “web/”

./imagethumbnail.sh “*.jpg” “150×112″ “web/_thb_”

This creates a reasonable sized “large” image at 800×600 and a thumbnail at 150×112. Makes managing new images in my gallery much easier. Hopefully you’ll find it useful too.

Contents of imagethumbnail.sh

#!/bin/bash
SEARCH=$1
SIZE=$2
DEST=$3
 
if [ $# -lt 3 ]
then
echo "You must pass three arguments 1) The search string (usually *.jpg) 2) The destination size I.E. 500x374 3) The destination directory"
exit 1
fi
 
for i in $SEARCH
do
echo "Converting $i"
convert -resize $SIZE $i -resize $SIZE +profile '*' $DEST$i
done
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon

Welcome to the new home of Random Musings

February 19th, 2008

So here we are. I used www.blogger.com for a while to host my blog, and it treated me fairly well, but I found it lacked features and customization that I’d started to expect from my blogging solution.

I’m still getting the hang of Wordpress, and I suspect things will be changing around here fairly rapidly, probably first getting a more attractive, non standard theme going.

While you’re here, feel free to read some of my old posts, as they’ve been ported over from blogger.com. Also, please take a moment to subscribe to my newsletter to receive notifications about updates to the blog, and other interesting bits.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon

Our new baby boy

January 18th, 2008


Our new baby boy (Quincy Joel) was born January 2nd at 8:20pm. He didn’t seem interested in arriving naturally, so after 20 hours of labor a c-section was performed. He weighed in at 7lbs 6oz and 20″.

He’s been great, but kept us busy thus the delayed blog entry. I’ll likely blog about him here in the future as interesting stuff happens. :-)

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon

WGA Strike, A national emergency

November 16th, 2007

War in Iraq? Old news. Lead laden toys from china? Big deal. Peak Oil? Puhleez! Global warming? Pffft.

What we really ought to be worried about is the Writers Guild Strike!!

Now, you may already be clicking the comments link to remind me about my rant about our much adored entertainment. Yeah, I know a bit ironic and hypocritical but I’m really starting to take this strike personally!

I don’t think I’m prepared to start watching re-runs of Big Bang Theory and Chuck. Not to mention the inevitable delay of the return of Notes From The Underbelly.

I’m still enjoying my made-for-television story telling high from November sweeps week, and I don’t think I’ll be able to survive the long and arduous drought which lies ahead. Please, networks, give the writers what they want, and avert a potential national catastrophe! Well, maybe it’s not that bad, but the recent crop of great shows has renewed my faith in entertaining television, I don’t think I’m ready to go back!

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon

Controversial Kinetic Sculpture

November 16th, 2007

It’s been entirely too long since I’ve made a blog entry, and I’ve got a lot of stuff lined up when I finally get a few free minutes.

In the meantime, this was sent to me, and I found it very interesting, if only from a technical and art perspective. There is a lot of controversy over the inventor/artists use of the analogy of “life” and “evolution”. I’m not willing to throw my hat into that circle, and I’m looking at this as a purely academic and scientific pursuit. You’re welcome to feel differently.

I submit for your consideration “The art of creating creatures“.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon

An Ob-NOx-ious truth

October 29th, 2007

In a recent post I extolled the benefits of running even a large vehicle on biodiesel. I focused mostly on the CO2 emissions, since that is the big buzz word, and the commonly known greenhouse gas.

I failed to discuss other emissions from such an engine and fuel combination. I’d like to talk about that now.

First, the good news. For all emissions excepting NOx, biodiesel burns cleaner than petroleum diesel, and in many cases cleaner than gasoline. You can see exactly how much so in this summary from the biodiesel board, which uses the EPA’s own research as it’s source.

Now, the bad news. Burning biodiesel does not help mitigate it’s high NOx emissions. Actually, the research has yet to prove if biodiesel noticeably changes NOx emissions either for better or for worse as compared to petroleum diesel. However, the fact remains that NOx emissions for a diesel engine is drastically higher than that of a similar output gasoline engine.

Why? Well, I’m not a scientist, and I can’t present my own measurements and findings, but I can tell you is that my research has told me that NOx is more-or-less a byproduct of heat, and compression in the context of an internal combustion engine. Unfortunately, I can’t find any single resource to link you to that summarizes it elegantly and succinctly (except maybe this), so you’ll have to take me at my word, or do the research yourself.

With that said, it becomes readily apparent why diesel engines, regardless of the fuel they are consuming, would have a higher NOx emission. A diesel engine depends upon heat and compression to ignite the fuel, so it is by nature going to have higher NOx emissions. Using biodiesel should not significantly change this, since it’s still being ignited in the same way.

Now, not all is lost the Tier 2 Emissions standard that the EPA is imposing in 2009 addresses NOx emissions, and NOx is in-fact one of the primary reasons for the new standard. In order to meet these standards manufacturers are using all sorts of different strategies. Some of them are new and innovative like urea injection and “self cleaning” particulate filters. Others have been around for years in gasoline vehicles, like exhaust gas recirculation (EGR) and Catalytic Converters. While these new emissions standards and equipment do pose a bit of a challenge for those manufacturing performance and aftermarket equipment for these vehicles, overall I think it’s a step in the right direction. Besides, many companies already have performance tuners and exhaust systems for the 6.7L Cummins diesel, and the 6.4L Ford Power Stroke, both of which meet the stringent new Tier 2 emissions standards.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon

Love the wheels you’re with

October 27th, 2007

My wife and I have interesting personalities, we both make BIG decisions with fairly little hesitancy and generally don’t regret the outcome. However, on the little stuff, like where we eat for dinner, what color blankets to buy, and (for me especially) what we drive and how it’s modified/maintained, we agonize and flip-flop constantly.

See, I grew up in a family with a pretty strong “car culture”, and we generally bought used cars and modified them, or drove them until they gave up, and replaced them. As a result, we owned A LOT of cars. I personally went through about six (6) until I got my most recent, and newest vehicle. For S&G’s, here’s the list.

1967 Ford Thunderbird “Fordor” & matching parts car
1980’s Dodge Ram D50 Pickup 4×4
1953 Dodge M37 Military Vehicle w/ 318cuid engine conversion
1988-89 Suzuki Samurai 4×4 “soft top”
1989 Honda CRX Si

I now drive a 1999 Ford Explorer Eddie Bauer, which is a car I lusted after for several years before I was finally able to purchase the one I have. I’ve also been in a position to do more custom work, and add more aftermarket parts to this vehicle than any other in my past. It’s also been the most reliable.

However, even though there is still custom stuff I’d like to do with my truck, I find myself thinking “how cool” it would be to own X Y or Z instead, even though I’d want to customize that as well. It’s a sort of addiction I think.

With that said, I’ve had a couple of epiphany moments. The first came from the December edition of Hot Rod magazine, where one of the editors described how he used to only consider buying and restoring/modifying classic and muscle cars which were coupes, and usually only those that were factory hot rods. But more recently, he’s started to buy off models, and sedans and realizing that they are just as satisfying (and much cheaper) to own and wrench on.

The second, was while watching the latest installment of the “Street Customs” TV series. A (fairly affluent) customer brought in an early 90’s Camero convertible for customization. I found myself thinking “why in the WORLD would you be interested in modifying, much less owning and driving that boring car?”. Then it occurred to me, it’s the vehicle they had, and they wanted to make it special, personalized, and something they could be proud of.

So, here I am with my “dream car” of about 6-7 years ago, and I can’t just focus on enjoying it? Is it because I think it isn’t “cool enough” because it’s not a sports car, or something else rare and desirable? Maybe…. Maybe it’s just my addiction to cars that prevents me from being satisfied, but I’m starting to appreciate the philosophy of “Love the one you’re with” as it applies to the car(s) I own.

My Explorer meets all my needs, fits my 6′ 4″ frame and does a reasonable job of going around turns, looking good, and accelerating. My biggest complaint is fuel economy. I’m hoping/planning to eventually swap a diesel motor into this vehicle for fuel economy and performance, probably some time after several of the “medium duty” diesels become available in 2010. Specifically, the 4.5L Duramax GM has announced for it’s 1/2 ton trucks.

Compared to spending $25k - $30k on another vehicle that I’d still want to modify and customize, spending a few thousand on a motor swap, and a few other “touches” on my existing vehicle seems reasonable.

Meanwhile, I need to relax, and realize that I’m driving something I thought was unobtainable only a few years ago. And, that I’ve customized it in ways I had never thought I could afford either.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon

Apples? Sure, sign me up!

October 24th, 2007

I grew up with computers. I used a TRS-80, and probably one of every family of macintoshes. However, I eventually defected to IBM Compatible PC’s, and Microsoft Windows around the age of 14-ish. I’ve been a “PC” guy ever since. Usually running Windows, but preferring to run a lot of my personal hardware on various flavors of Linux.

Welp, the time has come for me to reconsider Apple Mac’s. In particular, I really want a 15″ MacBook Pro. It’s got intel hardware and processors, a sexy case, every built-in technology I could want including BlueTooth, and a BSD based OS. What more could a geek want?

With the OS being BSD based, I can run all the good stuff I’ve become familiar with on Linux, plus be able to run the built-in software, and stuff designed specifically for the Mac. On top of all of that, using Parallels Desktop I can run any remaining Windows apps I can’t live without.

Plus, since my day job is as a software engineer, it’ll give me the chance to see what developing on a mac is all about.

The funny thing is, my decision to change seems to be coming at an interesting time in Apple history. With the introduction of the iPhone, then the subsequent price drop, and “update” which apparently removed some features of the phone, previously loyal Mac zealots are preparing to launch a jihad against Steve Jobs and Apple.

Apparently, the Apple community is up in arms over the the way Apple has handled things with the iPhone, and are accusing Steve Jobs of becoming just like Bill Gates *gasp*.

Ahh well, I still want my MacBook Pro. I just never seem to be into trends when they’re still “in style”.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon

Where’s the music?

October 21st, 2007

My wife and I recently visited a Starbucks in town, and I noticed that in place of the usual CD’s featuring the music they’re currently subjecting us to, instead I noticed a plastic card, in the height and width of a CD, but only about as thick as a credit card.

I picked the up the odd foreign object, and read the text on it. Turns out this is a “digital only release” of the music currently being played. $14.99 if I recall correctly. So for $14.99 I get a large plastic card, and a copy of this music in my iTunes directory. No physical media containing the music. Nothing to put in my CD case, no jewel case, and no liner notes. Creepy.

While I think I could embrace this channel of media delivery, I have to say that I felt a little uncomfortable with it. For one, I don’t own an iPod, or other mobile MP3 player, unless you count my PDA/Phone. But I grew up with CD’s. Hell, I grew up having been introduced first to records, you know those huge vinyl discs with visible and tactile grooves and bumps in them. You know, they were the same size as a laserdisc. Then I graduated to cassette tapes, then eventually to CD’s which have been the defacto standard ever since. Hell, I even dabbled in 8 tracks and reel-to-reel tapes, since both were superior formats at the time.

But this concept of buying music, and not getting any physical media. Seems a bit too ethereal to me. I must be getting old. :-(

Linkage

Another Blog

Rolling stone article

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon