Sunday, July 15, 2007

A victory

In following up on the compile error mentioned earlier, I found comments about trying to compile MythTV after installing a MythTV package. So, I shut down MythTV and moved the existing binaries and libraries out of the /usr/bin and /usr/lib directories, and then I recompiled (after making sure the configuration files were coded to /usr instead of /usr/local, since --prefix=/usr didn't seem to work as advertised). And the compile completed with zero errors.

After running make install on the newly-compiled binaries, I rebooted, and to my surprise and delight, MythTV came right up. Better still, all of the picoLCD's keys were behaving exactly as I had programmed them. Success!

So, just about all that's left is remote control. IR will be a long time coming, if I ever get it at all, because of the lack of an appropriate driver. I did install the MythWiFi plug-in for a web-based remote, which is probably my best hope for full remote control. But, when I click any button on the web remote, I get:

Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:6546 in /var/www/remote/backend.php on line 115
ERROR: Connection refused (111)

The answer to this turned out to be a big "duh" moment -- Network Control must be enabled. Unfortunately, since I coded the LCD module to send "Key_Space" on the enter keypress instead of "Key_Enter" (because I was unsure of using "Key_Enter" vs. "Key_Return", I thought I was playing it safe), I had no way to navigate the config menus to enable that ("Space" doesn't activate the "Next" button). However, all was not lost -- since MythTV stores its configuration in a MySQL database, all I had to do was run the following query in MySQL:

update settings set data = '1' where value = 'NetworkControlEnabled';

A quick reboot (since exiting and restarting MythTV is also a little problematic with the keypad), and as if by magic, I can now control MythTV with a web browser.

Tuesday, July 10, 2007

Stubborn, isn't it?

I found another instance of the PREFIX directive, in the settings.pro file. The code around it would seem to indicate it defaults to /usr/local only if it's not already set; apparently configure --prefix=/usr doesn't set it to settings.pro's satisfaction. I set the prefix to /usr there as well, recompiled, linked to my libmythtv library, and finally, a successful boot.

Except it would seem that my code did not take effect. Down still sent a Key_Right.

Well, maybe the library isn't referenced, but compiled into the front end. Copy the compiled version of mythfrontend into place, reboot -- nope.

One last try. Maybe, just maybe, the fact that the old library was in /usr/lib at the time of compile of the programs caused confusion. I'll recompile.

While that's compiling, I'm going to take a look at the MythWifi plugin. Unless and until someone writes a lirc driver for the picoLCD (don't know if I will be able to), it'll be the closest thing we get to remote control. (And, if I can't get the front panel working, it'll be the only thing we get to control at all, barring hooking up an actual keyboard.)

Monday, July 9, 2007

The Mysterious Configuration

Quick post. I can't seem to find from where it's getting the /usr/local/bin path. I tried running ./configure --prefix=/usr (noting that the config file uses /usr/local if that isn't set), but that just wasn't good enough. Same problem (and associated errors in the log file) as before.

Sunday, July 8, 2007

Control Progress

After downloading the MythTV package from MythTV.org's Downloads page and compiling mythlcdserver, I discovered that KnoppMyth used a slightly newer version of the files (and resulting libraries). Wasted a lot of time there, but got the last stable release out of subversion (which, fortunately, was the same version used by KnoppMyth), and I am now able to compile MythTV modules with the correct library. Mostly. I am getting this error with mythtranscode/replex:

/usr/lib/libmythavcodec-0.20.1.so: undefined reference to `XvMCLoadQMatrix'
/usr/lib/libmythavcodec-0.20.1.so: undefined reference to `XvMCSyncSurface'
/usr/lib/libmythavcodec-0.20.1.so: undefined reference to `XvMCFlushSurface'
/usr/lib/libmythavcodec-0.20.1.so: undefined reference to `XvMCBeginSurface'
collect2: ld returned 1 exit status
make: *** [mythreplex] Error 1

But I intend to ignore it for now as it happens after mythlcdserver is compiled. (This is going to bug people searching for an answer to this problem and finding none. Sorry. Hopefully I'll find out more for a later post, because I'd like to solve this as well before I get desirous to compile and install a brand new release of MythTV.)

I made the following changes to mythlcdserver/lcdprocclient.cpp:

ChangedTo
lcd_keystring = gContext->GetSetting("LCDKeyString", "ABCDEF");lcd_keystring = gContext->GetSetting("LCDKeyString", "A B C D E F");
aString = "client_del_key " + expandString(old_keystring);aString = "client_del_key " + old_keystring;
aString = "client_add_key " + expandString(lcd_keystring);aString = "client_add_key " + lcd_keystring;

Judging from the expandString function, apparently lcdproc used to take single-character "keys", all concatenated in one string (i.e. "ABCDEF" representing six keys), whereas now it can use longer names, and the functions take a space-delimited list. My guess is that, in order to make MythTV compatible with old configuration values, they chose to stick to the single-character key designations and assume all configuration strings were such, and the expandString function puts a space between each character (if lcdproc is version 0.5 or higher). Some of the lcdproc drivers even have a provision for mapping their keys to a single-letter designation. The driver for picoLCD does not, though. So, my solution is to make mythlcdserver use key names instead of key letters, by simply removing the call to expandString and treating the LCDKeyString value as a space-delimited string.

So far, I've had a bit of success. When I compiled mythlcdserver with my changes and used a LCDKeyString value of "Plus Minus F1 F2 F3 F4 F5 Up Down Left Right Enter", I was actually able to control MythTV with the keypad. Sort of. The

+
key moved the menu selection up, and the
-
key selected the menu option. None of the other keys did anything (except after pressing all of them quickly to see if anything else would work, it stopped responding altogether; I suspect a bug in the picoLCD driver). When I changed the LCDKeyString value to "Up Down Left Right Enter", Up moved the cursor up and Down selected. So I have at least solved the problem of getting the keypad and the mythlcdserver program speaking the same language.

I have to say there is an annoyance that makes this whole process much more difficult, in that mythlcdserver doesn't work from the command line. Oh, it starts all right. Even connects to MythTV and gets status updates. It just can't connect to LCDd. I keep getting "connection refused" from LCDd, whether I run as mythtv or as root. Can't figure out the problem there.

The reading of the key press appears to be handled by the library libmyth, via lcddevice.cpp. It is under the same assumption that the LCDKeyString value represents a list of non-delimited, single-character keys. In fact, the translation is done by taking the key name reported (actually just the first character thereof), finding the position it matches in LCDKeyString, and using that position as a "magic number" translation to a key press. Using my edited code, the key press for "Up" would cause it to look for a "U", find it at position 0, and translate that as Key_Up. "Down" caused it to find a "D" at position 3, thereby sending Key_Right (which happens to select a menu option).

To "fix" this, I am rewriting the LCD::handleKeyPress function. It is, for the moment, quite simple:

void LCD::handleKeyPress(QString key_pressed) {
    int key = 0;

    if (key_pressed == "Up")
        key = Qt::Key_Up;
    else if (key_pressed == "Down")
        key = Qt::Key_Down;
    else if (key_pressed == "Left")
        key = Qt::Key_Left;
    else if (key_pressed == "Right")
        key = Qt::Key_Right;
    else if (key_pressed == "Enter")
        key = Qt::Key_Space;
    else if (key_pressed == "Plus")
        key = Qt::Key_Home;
    else if (key_pressed == "Minus")
        key = Qt::Key_End;
    else if (key_pressed == "F1")
        key = Qt::Key_F1;
    else if (key_pressed == "F2")
        key = Qt::Key_X;
    else if (key_pressed == "F3")
        key = Qt::Key_I;
    else if (key_pressed == "F4")
        key = Qt::Key_Escape;
    else if (key_pressed == "F5")
        key = Qt::Key_M;

    QApplication::postEvent(gContext->GetMainWindow(),
         new ExternalKeycodeEvent(key));
}

I think there is oodles of room for improvement. Some way to map keys would be ideal. I was kind of hoping I could use the keybindings table, maybe get the LCD module to report a key of, say, "LCD_UP", and have that text in the keybindings table to identify what action LCD_UP performs. Maybe if I have time, I'll work on that. Right now, I'll just keep my fingers crossed for a clean [enough] compile, install the library, and see if I managed to make this thing usable.

And... It's no good. The front end never appeared, and the LCD showed LCDd's default screen (0 clients). The mythfrontend.log file gave me a clue, though:

sh: /usr/local/bin/mythlcdserver: No such file or directory
[...]
Couldn't find theme Titivillus

The big clue is that I have mythlcdserver in /usr/bin/, not /usr/local/bin/. I'm going to hazard a guess that there is a path that gets compiled into the library that is different than the default KnoppMyth layout.

Friday, July 6, 2007

The Control Problem

Major stuck point here. If I use the picoLCD's usblcd utility program, I can see that the keypresses and IR signals are heard by the hardware. By examining the LCDd.conf file, I can see that lcdproc does have the ability to read keypresses. (Looking at the source code for the picoLCD driver for lcdproc, it only supports keypresses at the moment, not IR signals.) But for whatever reason, the keypresses are not getting through mythlcdserver to MythTV.

I'm not entirely sure who's to blame, but at the moment I'm suspecting the problem is with mythlcdserver attempting to bind to key events 'A', 'B', 'C', 'D', 'E', and 'F' where lcdproc (with the picoLCD driver) reports key events of 'Plus', 'Minus', 'F1', 'F2', 'F3', 'F4', 'F5', 'Left', 'Right', 'Up', 'Down', and 'Enter'. mythlcdserver also seems rather intent on using single-character keys only. I think I'll see what I can do about that.

If I'm right, then there may be an issue with trying to map LCD keys to MythTV commands. I really don't want the F1 key on the keypad to bring up Help. But one step at a time...

Monday, July 2, 2007

The Bling

The Mini-Box M300-LCD, as its name would imply, has an LCD module on its front -- specifically, a picoLCD module. The iMedia distribution already had the required drivers, but the KnoppMyth distribution did not. I installed the lcd4linux package through aptitude, but it did not have the picoLCD driver. I did download the source and was able to compile it with the picoLCD driver, and it worked great.

Of course, when I researched how to get MythTV to talk to it, I found that it already has a convenient application, mythlcdserver, to make good use of the display. And, it didn't work with lcd4linux, but lcdproc. I was avoiding using lcdproc, because the first hits I found searching for lcdproc and picoLCD indicated I would have to get the source code and patch it to use the picoLCD. The lcdproc hardware page had no sign of picoLCD. However, when I found the project page on freshmeat.net, the picoLCD driver was recently included. (Indeed, the lcdproc.org home page also has picoLCD in the text description of the most recent release; but I had missed that.)

I compiled and installed the LCDp daemon (which, for some reason, installs its configuration files to /usr/local/etc instead of /etc). With the curses driver active, I started the LCDp daemon, then tried running mythlcdserver. And nothing happened. I tried googling, but I couldn't find anyone else with this problem. Heck with it, I figured I'd reboot.

Interesting thing about LCDp. If the curses driver is active, then running it starts the server and locks the display, and apparently it doesn't daemonize. This is a problem when you have it running from init.d -- the boot process gets to that step, starts the curses display, and goes no farther. Unfortunately, I started it pretty early in the process (lcd4linux put its startup scripts at S20, so I mimicked this with my LCDp scripts), and sshd had not started yet. Oops. Curses, indeed. I went upstairs (since the MythTV box is now at home in the entertainment center) and grabbed a keyboard and that bootable USB key, booted, mounted the hard drive, edited the config file to use the picoLCD driver instead of the curses driver, and rebooted.

Since I had the keyboard attached at this point, instead of trying to run mythlcdserver from a command line, I went through MythTV's setup menu and enabled LCD there. And it worked just fine.

So now, MythTV talks to the picoLCD just fine. The next major steps are to get it to go the other way -- for the picoLCD to relate its keypresses, and hopefully the IR receiver, back to MythTV. Google hasn't helped so far...

Friday, June 29, 2007

The Contest, Part 2

One thing I should've noticed in reading that Ubuntu Forum post, as well as the comments in the configuration file, is that noise reduction slows things down. I'm now running both transcodings with noise reduction (and de-interlacing) off, single-pass, quality level 6 (the default). Let's try this again.

Xvid: 2:25:18, 116MB
DivX: 1:47:44, 145MB

Good thing; any bigger, and I would've been out of space:

Filesystem   1K-blocks      Used Available Use% Mounted on
/dev/sda1      4925528   4672876      2444 100% /

Guess I should've been doing this on my data drive. Oops.

Finally, we are within the realm of possibility. But how, ultimately, is the quality? Well, the answer was pretty clear. XviD was pretty bad, very blocky, in both the two-pass version (which I set at a pretty unfair low quality, I admit) and at the Q6 one-pass version. DIVX was very watchable (on the 14" monitor; hopefully it does as well when it's hooked up to the 36" TV). Although, curiously, Media Player Classic on the XP workstation refused to play the 2-pass XviD and the no-noise-reduction DIVX files. Since they will be played on the MythTV box almost exclusively, I'm not too worried.

By the way, here's a fun fact I discovered while moving files around from machine to machine. scp over my 100Mbps home network transfers up to 10MBps, transferring the 2.2GB source file in 3½ minutes. For some reason, I could not get PSCP (PuTTY's SCP utility) to make the transfer to my Windows machine (curiously, even with the trailing slash, it treated the target directory as a filename and was unable to write), so I started with FileZilla, which can connect over SFTP. It estimated over 3 hours to transfer the file. I gave up on that and used PuTTY's SFTP client (PSFTP), which was able to complete the transfer in a "mere" one hour.

Wednesday, June 27, 2007

The Contest

The XviD compression completed in an estimated 12 hours, taking a one-hour episode of Star Trek Voyager (The Q and the Grey, if you're curious) from 2.2GB to 68MB.

To try and keep all things equal, the XviD preferences were copied to the DIVX section, and the same file was set up for transcoding (this time, running in a screen session, so it can be detached without losing the output this time).

Curiously, thie DIVX option ended up bombing the first time. Maybe it doesn't like running in screen. Alas. One more try before I call it quits...

Nope. Another 9-hour task down the drain.

ffmpeg had critical errors:
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

Because I have other things to do, I might as well give the machine something to do while waiting for me. The Ubuntu forums have a suggestion on settings that I'll try using. In particular, the poster seems to prefer one-pass instead of two-pass encoding, which may help in this case, as the error seems to occur when setting up for pass 2.

And so it did. Divx completed in about 8 hours, with a final file size of 268MB. Not quite the space savings as XviD, but a fair increase in overall speed (well, sure, since it only made one pass).

Tuesday, June 26, 2007

The Web

Before I turned off the machine last, I checked out the MythWiki page on ACPI Wakeup and followed the configuration suggested there. Sure enough, the machine woke itself up to record the next scheduled show (although it missed a minute or two; I might have to figure out how to pull the time back a couple minutes to give it time to boot). Pretty cool, except I happened to notice that the "next scheduled mythfilldatabase time" was long since elapsed. Does MythTV not know enough to correct this when it sleeps through its appointed time? Hmm, what would happen if the next instance of a show was outside of the downloaded schedule; would MythTV ever wake up to do a mythfilldatabase? Might have to investigate this.

Anywho, I decided my next project would be to get the MythWeb interface working. I tried connecting to the PVR, but I got an authentication dialog. Annoyingly, it wouldn't accept any usernames or passwords -- not mythtv, root, or the user account I created on install. This would not be acceptable.

A little searching revealed that you can override the authentication of an Apache subdirectory by including Satisfy Any in the <Directory> element. Better, but I wanted it even simpler. I wanted to be able to just type the machine name into the browser and get it, without having to append /mythweb. After unsuccessful trials with Alias and Redirect, I noticed a commented-out line that was there to redirect / to /apache2-default/, "to have apache2's default start page in /apache2-default/, but still have / go to the right place". I un-commented that line, but changed /apache2-default/ to /mythweb/. I also removed authentication on / as well, to make things even simpler. (I hope that decision doesn't bite me in the butt someday.)

I am noticing that the files saved on the hard drive so far are rather large (1.1GB per half hour). For how little TV we watch, 25 hours should be plenty of recording time. But I don't think that's good enough. The next step is to follow this HOWTO from the Ubuntu forums: HOWTO: Auto transcode MYTHTV recorded shows to DVD, XVID, or DIVX cutting out the commercials. I'm first running a test of the XviD export, which I'll follow up with a DIVX run. However, I don't know how useful it will be. It's currently showing an ETA on a 1-hour Star Trek Voyager episode of 11h 33m. (I would use a Simpsons episode as my test instead, but I want to check the quality of the results, and I don't think a cartoon will be a fair enough test of quality.) I have it recording all Star Trek and Simpsons episodes, and in the next 24 hours, it is scheduled to record 5½ hours of TV. At the estimated rate, that equates to 2¾ days of transcoding time, by which point another 8½ hours of TV will have been recorded. Sounds like a losing battle.


Update: The good news is it finished before 11 hours — it actually finished in about 8. The bad news is, that was the first pass. Pass 2 has started, and it's estimating another 11½ hours.


Update 2: My kids closed the lid of my laptop, disconnecting my terminal. The time stamp on the completed file is 11:28, which, if correctly indicating the time it finished, would put the 2nd pass at a mere 4-5 hours. So we're back to 2 hours per day.

The New Player

Since the TV is unplugged while we work on painting the entertainment center, I wasn't going to be playing any Xbox 360 tonight. So, today was the day I installed KnoppMyth. Because of its size (close to a full CD), I wasn't going to get away with a USB key install this time. I had to open the box and hook up the CD-ROM once again.

KnoppMyth tries to be very easy to install, and the creator has done a pretty good job of leading you step-by-step through the install process. It works well, as long as you follow the directions exactly; otherwise it gets a little flaky if even your hard drive partitions are not set up right.

Once I got through the install, I went through the setup process, which, since I had seen MythTV's setup screens plenty of times by this point (and with most of them preconfigured), I knew what it was expecting. Unfortunately, when it got to the step of getting TV listing data, it crashed. I don't know why; I finished the other setup scripts and rebooted, and when I went back into mythtv-setup (helpful hint: if you don't have a mouse, Alt-X in Fluxbox brings up an xterm window), I was able to get it to download listings (after a couple tries; perhaps zap2it was having issues?)

I must say the interface was much more responsive and suffered from no video glitches, unlike the iMedia interface. I was starting to think I should've made the decision to go to KnoppMyth sooner. Even the Picture-in-Picture function was working almost perfectly (minus a strange blue hue on the small picture). Except when I tried to watch TV, I discovered a major disappointment. No sound.

For the next hour and a half, I searched forums and blogs, ran alsaconf and alsamixer, tried to aplay sound files in loops while I tweaked mixer settings... Nothing worked. Then, on a lark, I decided to plug in my microphone. (I was using a headset that had two plugs, one for the headphones and one for the attached mic.) I noticed something strange as I plugged in the mic -- I heard a crackling sound in the earphones. Did this headset need to have both ends plugged in to work? No, I still couldn't hear anything... But wait... Get a closer look at the markings on the plugs...

Yes, I had plugged the microphone into the audio out jack, and the headphones into the microphone jack. Switched the plugs, ran alsaconf one more time to reconfigure (and undo my random tweaks), and lo, there was sound, and it was good. And I went to bed.

Wednesday, June 20, 2007

The End of One Road

Just as a side note, I did figure out the garbled text screen problem, more or less. When I ran xorgconfig to generate my own xorg.config file, the garbled consoles didn't happen. I started changing the generated xorg.config file by inserting settings from the iMedia's installed xorg.config file. I think it was the Option "VBEModes" "true" line that caused the problem, but I didn't spend much time switching back and forth to tell.

I was starting to get fairly frustrated with the iMedia distro by this point. Although it was pretty well configured for my hardware, there were some peculiarities I couldn't figure out. Although it detected both tuners on the PVR-500, it wouldn't activate the Picture-in-Picture function. Kind of a minor annoyance, since our TV has PIP on its own, but it concerned me that something else might be afoot. (Although I did test the recording-while-watching scenario, and as it was recording with one tuner, it did launch the other tuner for TV watching without a hiccup.) Plus, I wanted some of the MythTV plugins, like the web server, and the web stream player. This mini-distro wasn't built for extensibility -- it lacked a compiler, and it didn't support deb or rpm packages (as far as I could figure out). iMedia did have a full Linux distribution available, but at a cost.

Sad to say, I decided to abandon the iMedia MythTV platform. I made a backup of the hard drive (which I had to do by simply tarring it and having the box FTP to my Windows workstation -- one of the times I'm glad for all the insecure servers installed on your run-of-the-mill Windows box), and called it quits.

The Web Links page of MythTV.org lists three distributions for MythTV: KnoppMyth, based on Knoppix (which I've used); MiniMyth, which appears to be Frontend only but made for VIA motherboards (the link appears to be dead), and MythTV-XBOX, made for Xbox hardware (which I might use on my Xbox someday, as a frontend to this box [since the Xbox has no A/V inputs for recording], but not today). KnoppMyth seems like a likely candidate.

Saturday, June 16, 2007

The Reinstall

I have moved the MythTV box and extra monitor into the office. Somehow, as I was fiddling with it, I ended up disabling the automatic login and running of MythTV. I was at the point I knew I would reach eventually -- reinstalling and starting over. I really didn't want to open up the box to attach the CD-ROM drive again, though, so I endeavored to find a way to boot off a USB stick. The iMedia MythTV distro is only 68MB (give or take), and I had a 256MB USB key handy.

Just making a USB stick bootable is no easy task. I ended up going with HP's utility for making a boot key, which installed their custom Linux-based distro for upgrading certain servers' firmwares. Once I got that done, I copied the contents of the iMedia ISO to the key, renamed certain boot files as appropriate, and I was good to go.

The BIOS of the Jetway motherboard has as boot devices certain USB devices, like a USB floppy or USB ZIP drive. Following the suggestions I found on various web sites trying to deal with the problem of booting from USB keys, I tried all of those devices, but none worked. It turned out, though, when you set Hard Drive as the boot device and look under "Hard Drive Options" (or similar; I'm typing this from memory so I don't recall the exact text), one of the hard drives listed was in fact the very USB key from which I was trying to boot.

The only hiccup I had in booting from the key is the distro tried to mount /dev/cdrom to do the install; but even I knew enough to switch to another terminal, manually mount the key as /mnt/cdrom, and switch back and continue the process.

Yeah, I was feeling like pretty hot stuff at that point. I just booted and installed from a USB key.

The one thing that really concerns me is how hot this little box gets. It's not quite too hot to touch, but it does get close. Do I really want this thing in the same cabinet as two Xboxes (an original and a 360)?

Wednesday, June 13, 2007

The Assembly

As luck would have it, everything arrived on my wife's birthday. So, for better or worse, I spent most of the night putting the thing together. I got to experience a whole new world of trying to make things fit. It turns out I was lucky I went with the 2.5" drive; I'm not sure I could've squeezed a 3.5" drive in with the tuner card. One neat feature is that the case came with a CF-to-IDE module, so it would be possible to use a CF card as a hard drive, further reducing power consumption (assuming you could spin down the data drive when not in use). However, again, the tuner card was big enough that it blocked the pins where the IDE cable would connect to the CF adapter. Just as well; I don't have a CF card big enough from which to boot, anyway.

I had already downloaded the iMedia MythTV ISO and burned it to a CD. I took the box to the basement, where I had an extra monitor, hooked up a CD-ROM drive (full-size IDE drive, which of course didn't fit in the case -- fortunately, DVD playback was not a requirement) and ran through the installer. All in all, that procedure was fairly painless.

I then took the box upstairs, finished closing it, and hooked it up to the TV. Unfortunately, there was no display. I brought the extra monitor up from the basement and rebooted several times. Eventually, I found the option in the BIOS to direct video to the TV (buried under "AGP Timings" of all places). The monitor stayed nearby, though, just in case.

Unfortunately, not all was puppies and roses. Although the iMedia distribution included drivers for the LCD, it did not in fact have it hooked up to MythTV, so although the display showed me CPU usage, it didn't show anything having to do with the PVR, nor could I use the keypad to control the system. Can't pull the keyboard yet.

Another puzzler was that, once the system booted up and launched X, all terminal screens were garbage. It's like it set the text mode to some bizzare resolution or frequency, because I couldn't read anything. The monitor would also start in with a high-pitched whine. I decided to pull the plug on it for the night.

Thursday, June 7, 2007

The System

BYOPVR.com was all talk about this new (to me) concept of a Mini-ITX form-factor. The concept was very promising. These systems promised to be low-power, small (good for fitting into an entertainment center), but with enough features to successfully run as a PVR.

I began looking at parts. Unfortunately, it wasn't long before I discovered I was in over my head. Although some ran on standard ATX power supplies, those didn't have the benefits for which I was looking; it was when I started looking at DC/DC power conversion modules that I realized I had no clue what I was doing. If I had attempted to put it together part by part, any money I might have saved in the long run would've been far eclipsed by the frustration and possible danger of getting the wrong parts.

Fortunately, I found my solution. Mini-Box.com had a few complete systems for sale. What's more, they also had a Linux distribution for free download, called iMedia MythTV, that was specially made for this type of system (i.e. low power). I decided to splurge a bit and spring for the M300-LCD, partly because it was big enough to support a full PCI card (which I would need for the tuner card), and partly because of the nifty LCD on the front.

Once I had the system all spec'ed out, I compared the components' prices with NewEgg.com. Mini-Box did not offer a SATA hard drive (at least, their drive options did not specify PATA or SATA, or even 2.5" vs. 3.5" -- I wanted the 2.5" again for the power consumption, although my experience with 2.5" hard drives may have me kicking myself for that decision), so I decided to order the hard drive from NewEgg instead. Mini-Box actually had a better deal on memory, so they got my business there.

My order from Mini-Box consisted of:

  • M300-LCD case, $109.95
  • picoPSU-120 DC-DC power supply, $49.95
  • 12v/5A AC-DC power adapter, $24.95
  • Jetway Hybrid Mini-ITX motherboard w/VIA C7 1.5GHz CPU, $149.95
  • 1GB DDR2 memory (single stick), $47.00
  • Shipping, $8.09
  • Total: $389.89

NewEgg.com had the best price for the tuner card I wanted -- a Hauppauge WinTV-PVR 500. Although fairly expensive, I wanted its dual tuners on the single card, because one card is all the room I'd have, and I didn't want this project to be a disappointment the first time my wife wanted to record two shows that happened to be on at the same time. Luckily for me, they also had a sale on a 2.5" SATA hard drive. $139.99 for the card, $49.99 for the 60GB drive, and $7.24 for shipping brought my total to $197.22.

Total price: $587.11

Sunday, May 13, 2007

The Project

My wife asked for a special present for Mother's Day and her birthday. (Yes, I did a little something on each of those days; I did not simply skip them in lieu of this gift.) She wanted a Tivo.

Now, in general, I abhor anything that requires a subscription to use. What happens if the company goes out of business? You're stuck with a doorstop that you can't use, you can't sell, you can't return, and you can't just throw away (unless you're willing to completely ignore environmental hazards; something I at least make an effort to obey, although I'm sure I'm not perfect). Plus, there have been great strides in Linux-land in making a user-friendly PVR system. I had originally kicked around this idea almost three years ago, but at the time I had not the time, motivation, or skill to put one together with the tools at the time, but a quick search turned up whole communities built around this concept. Build Your Own PVR was the one that stood out by far.

So, with permission from the wife, I began research on what it would take to build a PVR.