Friday, December 22, 2006

The Christmas Present Trap

The missus and I were discussing the purchase of various items as presents for relatives and friends for Christmas, this all took place the last week of November and the first week of December. As the time went on, it was clear that the shopping would be completed before mid-December. Nice, if it were left to me it would have been done over the fornight before the event. So now I get earache for 'not helping with the Christmas shopping'. Having a bleat about that isn't the purposeof this blog entry, though. The purpose is to provide a warning.

You see, during those discussions, we came to the conclusion that not only did we not know what to get each other, we couldn't decide what we each wanted. So we decided not to get each other anything just yet - we'd wait until the January sales are in full swing (my missus is a black-belt at shopping; if it aint got 75% off, it aint gettin' bought). So here's the danger; PAY ATTENTION BLOKES! If the missus says she's not getting you anything for Christmas, and says you're not to get her anything completely ignore this. The last thing you want to be doing is be sat around the Christmas tree on Chrismas morning, the kids are quietly (yeah, right!) opening their presents, there's stuff for your mum, for her mum, presents for and from both your families and she turns round to you and says 'this is for you' and hands you a present. Then you look a right plum. And you'll be in the dog house until it's her birthday.

It's a very simple rule: if she says you're dont need to buy her a present at Christmas, she's lying, buy her one anyway and make her look a chump in the unlikely event that she's telling the truth! The good news is that if she's said this, she's not exactly expecting the earth, so you can safely get her something cheap that you like - just make sure it's wholly for her, not to share, not for the house, and isn't soap-on-a-rope. Buying her kinky underwear is out too - remember that's a gift for your enjoyment. Even if she was telling the truth, instead of making her feel bad when you give her the gift, tell her that you weren't going to get her anything, but you saw it and thought it would be just right for her, and you'll get her proper present later.

Thursday, December 14, 2006

Media Centre?

So this guy just gives me a pc. Just gave it to me...

Yeah, OK, they were dumping them out at work and they were no longer needed, and these weren't even powerful enough to give to the local school. It was (I say was because it's kinda changed somewhat now) a PIII 500 with 250 MB memory, a 40Gig HDD and a rather cheesy ATI 128Mb 2D video card. I didn't have any specific plans for this machine, but I thought it might be fun to have a play with stuff I dont usually get to tinker with. So my choice was 'Linux Media Centre'.

My initial thoughts were 500Mhz? Not fast enough; I was right, but more on that later. The first thing to go was the video card. Now, kicking around somewhere I have some Geforce 5200FX cards - at least two that just aren't being used. But I cant find them; I did find my Geforce 3 250MB Ti-summat-or-other, so I stuffed that in the AGP slot. I downloaded the MythTV package, and pinched the DVB card from my PC in the cellar (dont worry, the card couldn't be used as there was no aerial point. All I had to find now was a sound card. I've got some of these too, somewhere. Buggered if I know where tho'.

OK, more robbery - take the server apart, remove the sound card (a sound blaster OEM summat-or-other, again not being used, it didn't even have any speakers plugged into it), re-assemble server and turn it back on before anyone else tries to log in and finds either the Domain (windows) or the LDAP server (Linux) missing. Put all these bits in the new computer, remove the scsi card and tape drive and we're off.

There is already one problem with this computer as a media centre - the lack of a DVD drive of any kind. Well if this project works I might blow twenty quid on a new DVD cooker for it, and have myself a better media centre as a result. In the mean time, we'll just have to make do with either cross mounted DVD's from one of the other linux boxes, or computer-based .avi's off the server. Either is no big deal.

So I install KnoppMyth, bring the computer up to the front room, plug it into the telly using a s-video cable and off she goes. Now I have problems though - the writing is very small and difficult to make out on a TV screen. Coupled with that, it's complaining because I've not got an analogue tv card in the machine. The DVB one is in there; it just takes a bit of menu-jumping to get the system to use it instead of an analogue card. I set it off doing a channel scan.

Maybe an hour later it's done nothing. Something is wrong; MythTV (as it clearly stated on the website) is still considered alpha quality. Oh well, I tried and failed; what more could I do? Back down the cellar to the workbench with the media centre, and out comes the Fedora disks. I should say now that I had just two simple reasons for choosing Fedora (well, 3 if you include the fact that I've actually quite enjoyed using it for the past few weeks) firstly I know the innards very well, so if things go wrong I can fix it and secondly (and probably most importantly) I'd got the disks hanging around. I install Fedora Core 6 and overwrite the previous install. I'm now using LVM for the disks, that should make life slightly easier if I want to add a hard disk or two for recording space in the future. This computer case can easily take two or three more hard disks, even if the 200W PSU isn't really up to the job).

So fiddling around with Fedora is now needed; unlike KnoppMyth it doesn't turn on the s-video system by itself. That took me about forty minutes to solve, I had to plug the media centre into the flatscreen telly (which fortunately has both computer RGB input and svideo, so I could flip between the two to ensure all is working). Once that's done I run the updates, install the livna repository, get xine, mplayer and kaffeine installed (the three packages that will make this work, well maybe I could do without mplayer. Kaffeine needs xine, and will be the primary video and audio package eventually), and I install all the codec packages I can find. I turn on auto-logon for the media user (I'm not using the regular accounts for this machine, and I want this up and running in a stand-alone, no-login fashion).

Next the PC sits down by the telly, plugs in through s-video, and seperately in through audio - we've got a scart-splitter box that allows us to combine these inputs into a single source, so that's now being used. The connection to the LAN is a bit of a test - I ran a cable down the side of the radiator pipe into the cellar and plugged it into one of the switches, this was a PITA to complete, there was barely enough room for the cable. Testing shows that things are not quite perfect, full screen video is flagging. OK, disconnect everything, back to the work bench and see what kit we have lying around.

To my surprise I found another mainboard with a 1Gig PIII on it, but no memory. I swapped them over, but the case connector didn't fit this mainboard right - so I did the best I could and put the connectors for the power on/off button on and nothing else. OK, so we've got no case lights. That's probably for the best while we're watching films on the telly with the lights down low, and nobody can accidentally kick the reset switch while they're reaching over to shut the curtains.

The swapover is clean and smooth, FC6 boots with no problems; it doesn't miss a heartbeat (boy am I glad I'm not using Windows for this). Back up to the front room with the box and start testing. This time its wonderful. Full-screen video is working perfectly from xine and mplayer. Now on to the TV; this is the real reason for installing Kaffeine. I load it up and scan for channels (having adjusted the font size in FC6 so that I can actually see the region name it's scanning). It finds all the channels - finds them a little too well, there are two entries for each one. Insert the stronger-signal half of the list and off we go, we can now watch freeview telly too (and record it, pause-in-play, and all those other goodies that kaffeine does that a forty quid freeview box cant do).

Now the box is useable. The aspect ratio is looking a bit off from xine (mplayer can be fixed by local config options, but xine cant). I take a look through the xorg config notes to fix it - just a display size declaration in my /etc/X11/xorg.conf telling the x server the exact physical size of the display, which I measured pretty accurately with a tape measure. Now, of course, xine will always have exactly the right aspect ratio, even at the res of 1024x768 on this widescreen CRT telly.

Now it's just down to tinkering. Eventually I'll get it set so that there is no login phase, no desktop, no nothing, it'll just launch kaffeine fullscreen and that'll be that. I'd like some kind of in-between UI that lets the user choose what they want to watch (telly, avi, dvd, etc.) but at least it's usable in the meantime. I also tried to get this working with my USB ir dongle, but it doesn't seem to be supported in Linux. This is a shame, but not impossible to work around.