Well, Cooker had the Apache default package swapped from 1.3 to 2.0 and PHP from 4 to 5, something changed in the Apache config file and stopped the server running. Ah well. Back up now. Might be down overnight occasionally in the next few weeks, the cable network is being upgraded.

Saw the Mets win a nice game against the Diamondbacks yesterday, 6-1 behind Pedro. If you accept the general scale of sports salaries in the first place (which I don't...), that guy has sure been worth every penny that was paid for him. Wow. If we get anywhere this season, it's gonna be about 50% thanks to Pedro. Nice to see Kaz get a big hit, too. I like the guy. I wish people would quit ragging on him so much. Rag on Eyechart instead, it's more fun!


Via John Fleck I come across the American right's List of Evil Books. Fairly predictable list, but notable for one wonderful piece of logic, discussing Keynesian economics:

"When the business cycle threatens a contraction of industry, and thus of jobs, he argued, the government should run up deficits, borrowing and spending money to spur economic activity. FDR adopted the idea as U.S. policy, and the U.S. government now has a $2.6-trillion annual budget and an $8-trillion dollar debt."

Ah, yes, FDR is single-handedly responsible for the American budget deficit. Odd how Reagan and Bush Sr., who both presided over huge rises in said deficit (I think it tripled under Reagan) by cutting taxes while increasing defence spending, don't get a look in...

Pointless toys

So the GNOME guys are very proud of their new Nokia 770. After the initial 'hey, that's cool!' wore off, though, I'm not. Why?

It's a pointless geek toy. I mean, really, really, really pointless. Sit down and ask yourself how many people you know will actually buy one of these and use it for more than a week. Who actually wants to sit somewhere in the house that isn't in front of the computer and read websites on a teeny screen with no keyboard? Hands up? I don't.


I went to see the new Star Wars movie last night. It was pretty good. Not as good as II or V, but good. Coming off I and II the fact that George Lucas can't write dialogue (especially romantic dialogue) to save his life is no longer a surprise, Ewan McGregor's performance was closer to the quality of his Episode I appearance than Episode II (when he did very well), and Hayden Christensen was still doing his best 'really bad actor' impression (he's not a bad actor, he just plays one in Star Wars movies...), but aside from that, not much wrong with it. I enjoyed all the little foreshadowings of events in the later movies, especially the Windu / Palpatine / Anakin moment, intimating the Palpatine / Anakin / Luke scenes in RotJ. (Although I feel it was also probably Samuel L. Jackson's payoff for getting to do just about sod all in the last couple of movies). Again I think a lot of criticism of the movie has let Lucas' terrible dialogue writing ability blind them to fact that he can still write a damn good story - the overall story arc of the first three episodes was rather ambitious and, I think, pulled off pretty well. Overall, it really worked nicely.

Now I'm listening to the new System Of A Down album. My headphones have a reputation among the cognoscenti of being the ideal for sloppy, fast rock music. This album is not about to disprove that idea...almost caught myself headbanging for a moment, there.

phantom out

Know my biggest bugbear with baseball umpiring? The phantom out at second base. David Wright got called out for interference on a wide slide at second base in the game against the Braves today; on the merits it was a fair call, he was a couple of feet wide of the base making his takeout slide. Look at it more broadly, though, and pay attention to the replay - why did he have to slide that far out to try and spoil the double play? Because Furcal, who was covering second, came off the bag a good quarter second before catching the ball, and by the time the ball was in his glove, he was a foot or more off the bag. You can't make a fair takeout slide if the fielder's not in the same zipcode as the bag when he catches the ball. If you watch double plays closely it's amazing how many of them aren't proper outs at second base; yet this is almost never called. As long as the second baseman catches the ball and gets it to first cleanly it's almost always called out; it's as if the umpires don't even look at the bag. As you can tell from that play today, it can cause big problems.


My HTPC now runs Freevo, and pretty much works. I'm quite proud of this. Here's some tips.

First of all, you need a TV card. One that works. My advice is to buy a cheap Hauppauge PCI card, WinTV branded. Not the PVR series, one of the ones with a Brooktree chip. These will work as soon as you plug them in, with the bttv module; plug 'em in, reboot, check bttv is loaded (on recent MDK / MDV, it should be), run tvtime and you'll probably get a signal. Until you can get a signal out of tvtime, don't bother doing anything else.

Install freevo. It's in contrib for all recent MDV releases. Now, you need to set it up. You do this by editing /etc/freevo/local.conf.py . This is a python file, so you have to be careful editing it; one apostrophe out of place and Freevo won't just ignore it, it won't run. Here's what to do.

Set AUDIO_INPUT_DEVICE to your...audio input device. If you just have a soundcard and you're running a little 3.5mm cable from the line-out on the TV card to the line-in on your soundcard, which is what I'm doing, this will be your soundcard, likely /dev/dsp . You can try using the btaudio or snd-bt8x8 modules to get sound out of the TV tuner directly, but it never worked for me.

Uncomment the line:


tvtime is a great TV viewing app, better than mplayer IMHO. Nice de-interlacing options and image control.

Unless you want to bother signing up for an Amazon.com associate developer account (or have one already), comment out this line to stop freevo moaning at you on the console:


I also commented:


As I rip my CDs on another machine. If you want it, leave it active and configure it. I disabled the USB plugins stuff, too, as I'm never going to use it and it simplified things.

Set VIDEO_ITEMS to the directory containing your video files. For me, the line looks like this:

VIDEO_ITEMS = [ ('/data/video') ]

I also changed the following setting:


Using mplayer, for some reason, causes freevo to fail to read some of my .avis. Xine is also better at DVDs than mplayer, though I didn't test which one freevo uses for DVDs if you leave the setting at mplayer (it may still use xine, I suppose).

Set AUDIO_ITEMS to the directory containing your music and IMAGE_ITEMS to the directory containing your pictures (if you have any you want freevo to deal with), as with VIDEO_ITEMS for video.

Set TV_RECORD_DIR to the directory you want TV to be recorded to. Vitally, this directory must be readable and writable by the user 'freevo' . Example:

TV_RECORD_DIR = '/data/video/freevo'

I set these two:

TV_VIEW_SIZE = (640, 480) TV_REC_SIZE = (640, 480)

for higher quality. For reference, my Athlon XP 2500+, running at around 3000+ speed, ran about 50% CPU utilisation encoding with libavcodec, and runs about 75% encoding with xvid (see later for these options).

Now the biggie - the actual recording command, TV_VCR_CMD. I have this: VCR_CMD = (CONF.mencoder + ' ' + 'tv:// ' + '-tv driver=v4l2:input=0' + ':norm=NTSC' + ':channel=%(channel)s' + ':chanlist=us-cable' + ':width=%d:height=%d' % (TV_REC_SIZE[0], TV_REC_SIZE[1]) + ':brightness=-16' + ':contrast=-20' + ':saturation=100' + ':outfmt=%s' % TV_REC_OUTFMT + ':adevice=/dev/dsp' + ':audiorate=44100 ' + '-ovc xvid -xvidencopts ' + 'bitrate=1200 ' + '-oac mp3lame -lameopts ' + 'br=128:cbr:mode=3 ' + '-ffourcc divx ' + '-endpos %(seconds)s ' + '-o %(filename)s')

TV driver, norm and channel list may vary depending on whether your TV card goes through v4l or v4l2, whether you're in an NTSC or PAL country, and what country you're in, obviously. Brightness, contrast and saturation you should fiddle with for best quality; you can play with them in tvtime first then translate the settings to mencoder. tvtime uses a 0-100 scale, mencoder uses -100 to 100, you do the math. The settings above work for me, but may well be totally different for you. The other settings tell it to use xvid video encoding and lame MP3 encoding. The default, libavcodec, is less CPU intensive than xvid, but in my opinion gives fairly poor video quality that I didn't consider sufficient (it looked worse than a VCR). For lame output, you will need the lame encoder. Since I live in a country where software patents are not valid, I can safely use the mplayer package from PLF, which supports lame encoding. If you live in a country where software patents are enforced, you are not legally allowed to install this package.

What this command does is produce an mencoder command, so you can easily test your settings just by logically extracting them to an mencoder command. To make things easier, the recordserver logs the command it runs in /tmp/freevo , so you can see what command was used and try running it in a console if something goes wrong, for testing purposes. You have to be very careful with your ' , : and spaces at the ends of lines.

I also have VCR_PRE_REC and VCR_POST_REC set:

VCR_PRE_REC = ('/usr/local/freevo/vcr_pre_rec.sh') VCR_POST_REC = ('/usr/local/freevo/vcr_post_rec.sh')

These scripts call amixer to set up the line-in recording levels. They look like this:


VCR_PRE_REC script to set the line in volume and mute the sound so you don't hear it wehen recording

AMIXER=/usr/bin/amixer # path to amixer

$AMIXER -q sset Line 71% mute $AMIXER -q sset Capture 53% $AMIXER -q cset numid=28 4 # select capture source, 28 is capture source control, 1 = CD, 3 =aux 4 = line $AMIXER -q cset numid=29 1 # set capture source switch to 1 (= on)


VCR_POST_REC script : unmute cd again to hear sound when using watching tv after recording

AMIXER=/usr/bin/amixer # path to amixer

$AMIXER -q sset Line 71% unmute # unmute cd again to hear sound when using watching tv after recording

amixer is somewhat scary at first. The first two controls in pre_rec just set the volume levels for Line and Capture; they should work on most cards. The last two will be more card specific. To find out which numbers to use on your card, run 'amixer controls', and it will list all the available ones. Find the one called 'Capture Switch' and use its number instead of 29 above. Then find the one called 'Capture Source' and use its number instead of 28 above. Then run 'amixer cget numid=28' (or whatever number is right on your system) to see the available values. Check that 4 is the correct value for Line on your card. If a different number is labelled as 'Line', replace 4 in the pre_rec script above with that number. It's a very good idea to have these scripts rather than just rely on setting the settings manually once and having them stay, as I've found many apps are rather cavalier with the ALSA mixer and will reset values they shouldn't touch. After I run totem or tvtime or some other audio app, I'll often find my capture volume back at zero, which would result in silent TV recordings without these scripts.

For the TV_CHANNELS section, you can run 'freevo tvgrab --query' in a console - once you have xmltv properly configured - to generate a sample configuration. The generated one worked for me.

Set XMLTV_GRABBER to the correct xmltv grabber for your region. For North America, this will be:

XMLTV_GRABBER = 'tv_grab_na_dd'

You need to create a DataDirect account and then configure xmltv to get TV guide listings. xmltv has documentation on doing this.

Program of the day

AdamW's program of the day: I just discovered 'htop'. Have you ever been a bit frustrated at how top doesn't do really, really, really obvious things, like scrolling when you press the arrow keys? You're not alone. Get htop - it does all the stuff anyone with half a brain expects top to do the first time they see it. Packaged in MDV contribs as 'htop'.

GNOME idea of the day

I've been stewing on this one for a while, but here's a constructive suggestion instead of a rant. Since around 2.6 or so, GNOME has started to suffer from Windows 98 disease. A GNOME desktop running a decent amount of modern GNOME-y apps tends to have a system tray (sorry, 'notification area') full of crap. It would be very nice if this could be fixed before GNOME 3 has to adopt the Windows XP 'solution' - a little arrow to hide all the crap you never wanted in the first place. (This little arrow has to rank among Microsoft's most laughable kludges ever, which is no mean feat). This is a problem many have mentioned and few have done much about. So, as I said, here's my constructive suggestion.

Half of the crap in my notification area seems to consist of media apps. Rhythmbox has a notification area icon (which you can't disable). Goobox has one (ditto). Then there's gxmms, and I'm sure I'm missing some others.

Now, up until it died, I used my T610 cellphone as a PC remote control via Bluetooth with the neat bluemote app. Does that app have fifteen different menu entries for fifteen different media players? Of course it bloody doesn't. On an awkward to control phone it's painfully obvious why this would be crazy. It has a 'pause' button, which pauses any media that happen to be playing. Doesn't matter whether it's Totem or Rhythmbox or Goobox or xmms or anything else, it just pauses it. This is trivial to achieve via simple shell scripts for any app which does remote control. Having multiple control icons / applets / whatever on a big easy-to-control PC is just as nuts, it's just not quite so obvious that it's nuts, I suppose.

So instead of this pile of media-related notification area icons, why don't we just have one Media Control Panel Applet, with a play button, a pause button, and back / forward buttons? When you click 'pause', it pauses. You don't have a panel cluttered up with different controls for different players and you don't have to click the Goobox pause button to pause Goobox, the Rhythmbox pause button to pause Rhythmbox and so forth, you just click Pause and things pause. This makes everything more easy and consistent, and for absolutely no extra fee, handily cuts out a pile of useless notification area icons. Sensible, no? KDE could do the same, obviously. Comments welcome.


It's good to know The Register's skills in turning a phrase and knifing Kevin Warwick have not declined over the years...

"[Kevin] Warwick is to cybernetic research what Hello Kitty is to animal husbandry..."

From this story.