Digital TV on Dapper with my Hauppauge WinTV Nova-T card

My card reports itself like this:

$ lspci
*snip*
0000:00:0a.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)
*snip

Everything seemed to work out of the box:

$ dmesg | grep DVB -A 0 -B 3
[17179585.872000] saa7146: register extension 'budget dvb'.
[17179585.872000] ACPI: PCI Interrupt 0000:00:0a.0[A] -> Link [LNKC]
    -> GSI 11 (level, low) -> IRQ 11
[17179585.872000] saa7146: found saa7146 @ mem e0aa2000
    (revision 1, irq 11) (0x13c2,0x1005).
[17179585.872000] DVB: registering new adapter (TT-Budget/WinTV-NOVA-T  PCI).
[17179585.908000] adapter has MAC addr = 00:d0:5c:20:33:92
[17179585.908000] DVB: registering frontend 0 (LSI L64781 DVB-T)...

So, many, many hours of Googling later, and after many blind alleys and red herrings, I remembered (yes, I have indeed been through all of this before…) what I needed to do next:

scan /usr/share/doc/dvb-utils/examples/scan/dvb-t/uk-CrystalPalace > \
    ~/.mplayer/channels.conf

and, finally, to watch TV I just do this:

mplayer -zoom "dvb://BBC ONE"

That seems to fail sometimes, and this is more reliable:

$ cat bin/tv_watch
#!/bin/bash
TMPFILE=~/Desktop/tv.mpg
mplayer -dumpstream -dumpfile "$TMPFILE" "dvb://$1"  &
sleep 5
mplayer -zoom "$TMPFILE"
kill %1
rm -f "$TMPFILE"

which I run by simply typing:

tv_watch "BBC FOUR"

Update: the “scan” command is provided by the “dvb-utils” package on Ubuntu.

Restoring a backup with Duplicity

See the last post for how I back up my important files to a remote server. To restore them I do this:

duplicity --file-to-restore path/to/file.txt
    scp://user@example.com//home/example/bkp/home/andy/Maildir file.txt

and enter the passphrase when prompted.

Note that I can restore this backup even if I lose my entire home hard drive because it doesn’t rely on any key file – just my passphrase. This is less secure than using a private key file, but where do you back up your key file to? You know it will be lost when you need it … safer just to write down your passphrase somewhere, I reckon.

Remote encrypted backup with duplicity

My father-in-law’s hard drive died the other day and I was just able to recover the data using Knoppix and my iRiver. Since I recently discovered a superb program that lets me create encrypted backups on a remote server over ssh, I thought I’d spread the word. The program is called Duplicity and it is simplicity itself to use. Here is my remote backup script:

#!/bin/bash
# Copy this to /etc/cron.weekly and make it executable and owned by root # Back up my most important stuff from the local machine to a remote # server, encrypted with a passphrase function run_duplicity { echo Backing up '$1' ... PASSPHRASE=`cat /root/.blah/passphrase` duplicity $1 \ scp://user@example.com//home/example/bkp$1 } run_duplicity /var/lib/mysql/dbtobackup run_duplicity /home/andy/Maildir

I have one “run_duplicity” line for each directory I want to back up securely. I have my passphrase in a file only reeadable by root in /root/.blah/passphrase, and you either have to type your ssh password each time you run the script, or you can set up a key to let you log in automatically using ssh-keygen.

GSSMP goes beta

I’ve just released version 0.9 of GSSMP, and since I’ve fixed all the bugs I know about (except working around a gstreamer bug, which I will try to do before 1.0), I’ve marked this release as beta.

This is the second project I’ve marked as beta, and I am determined I am going to get to 1.0 this time. That means no more features, just bug fixes, and hopefully a 1.0 release in a few weeks, when it’s had a bit of testing.

Really, I think FreeGuide should have had a 1.0 release a couple of years ago, but I’ve always had a lot of features in mind before I feel it is complete. I think this was a mistake: it was pretty stable at one point, and it might have been helpful to label it as such.

GSSMP is not going to fall into that trap! It’s supposed to be minimal, and that is what it is.

It’s surprising how many features would be nice to have in a minimal app, though, like being a drag and drop target and checking the MIME types of files before playing them, not to mention cool stuff like gapless playback and volumne balancing…

But no, these will have to come after 1.0. My focus needs to go back onto FreeGuide after GSSMP 1.0, as I’ve been neglecting it, and it needs some love if it’s ever going to get to 0.11 … and 0.12 … and so on for infinity … and then after that, 1.0.

Recording in FreeGuide

If you download the nightly builds of FreeGuide, you can try out the new recording functionality.

There is quite a bit to do before this is ready for release. There are several bugs in the TODO list and you have to create your own scripts at the moment to launch mplayer or whichever recording software you want to use.

When the release happens, we will incude scripts that are useful for common TV cards (actually, it’s beginning to look like mplayer will handle all this for us, so all we need is one script) and make it easy to set up, with a default setup that should work for most people out of the box. Or that’s the idea.

The good news is that Alex appears to be back and working on fixing the bugs, so the ever-receding horizon of the next release is somewhat less receding.

I’ve not quite managed to get it to actually record something yet, (mainly due to mplayer being extremely awkward) but it shoud work…