In the continuing story of me trying to push a few of the odds and ends of the code I’ve written for my own use, we’ve now come to the Emacs-based PVR. As usual, it may not actually be very useful code for, like, normal human beans, but why not push it out there? Perhaps somebody will be inspired to do… something.
So the story behind this piece of code is that I’ve never really been very fond of watching TV live. I know, these days nobody does that any more, and everybody uses their cable company supplied (and crappy) PVRs, but back at the start of the millennium, it was a not un-novel idea.
|USB TV card
And my implementation of it, based on Emacs, is probably noveller (that should be a word) than most.
So the idea is basically that we pull down the TV programme (thoughtfully provided by the XMLTV project), see what programs we want to record, and then record them. It’s simple. Since it’s Emacs-based, I can just ssh in to my machine from anywhere and add new programs to the list of stuff to be recorded from anywhere. Take that, User Experience people.
The computer is hooked up to an external USB tv card that provides an MPEG stream. So the actual recording is just “cat /dev/video0 > /tv/file”.
|The nice little box running Linux
The cable company calls me sometimes and asks me if I kindly could consider switching over to digital cable, but then my PVR thingie would stop working, so that’s out of the question. If analogue cable goes, I stop watching TV.
The only problem (for some values of “problem”) with this setup is that I can’t watch TV live easily even if I wanted to. But I’ve been running stuff this way for a decade, and that hasn’t really tempted me more than a couple of times, so, eh, whatev.