Thursday, 24 July 2008

Approaching Geek Nirvana

I have recently made several discoveries which;

A) have made my delight at Linux almost complete
B) have made my Nokia n810 make total sense, and
C) have made me realise, as if I ever doubted it, what a total geek I am...

These really centre around media management. Obviously, I bought the n810 as a "productivity" tool, if not for work, then for personal email and the like (I'm writing this on it now, in a crowded Jubilee line train). But, equally obviously, I was hoping for a bit more in the way of entertainment than is officially advertised by Nokia.

I've messed about with video transcoding before, generally for my PSP, which on Linux has historically been a messy, two-step process. The holy grail was always insert DVD, press button, come back in a couple of hours and transfer file to device. Well, I've finally cracked that one with a program called k9copy running under Kubuntu Hardy. I had to mess about with codecs and bit-rates for a while, but after discovering that a home screen applet called Omweather was responsible for my stuttering video on the n810, rather than a lack of horsies under the hood, I've settled on 2-pass XviD at a VBR of 700 with the width set to 400 pixels. Audio is mp3(lame) at 128kbs. This produces good quality, stutter-free and compact (~500mb for a feature film) files. I'm still getting the odd issue with breaks in the file, which is annoying, but overall it's a pretty good solution. On my Samsung Q45 laptop, DVDs transcode at about real time. I use mplayer on the n810, which is basic but functional.

Next on the agenda was mp3, or should I say "music". I ripped all my CDs to 320kbs mp3 some time ago in the belief that preserving as much of the original recording as possible was a good thing. OK, but that takes more space to store, and more processing power (hence battery) to decode - neither great for the n810. So, I decided to try out this new-fangled Ogg-Vorbis codec. My gosh. At 128kbps (vbr) I find it hard to tell apart from the original CD, never mind the high bit-rate mp3. I've hacked my iPod with Rockbox so that it plays Ogg, too, and then spent a few weekends re-ripping everything. I honestly can't believe how they maintain the sound quality and channel separation at such high compression. Running Kagu on the n810 gives a decent (not perfect) jukebox.

The final piece of the jigsaw is transcoding recordings from my Topfield freeview recorder. This is even more convoluted than ripping DVDs. Toppy is connected by an (incredibly slow) USB connection to my Asus wl500g router. That little bad boy's running an FTP server which makes the Toppy appear to be on the network. So, the first stage is to FTP the data file from Toppy to the laptop (around half of real time plus a bit - slow, as I said). Next, we need to demux what is effectively a transport stream into audio and video components, then remux and transcode. Well, ProjectX handles the demux, which is pretty quick, then I found that AVIdemux does a great job of remuxing and transcoding. The hq PSP preset (again XviD at around 700kbps if I remember) works very well on the n810 screen. The beauty of all this is that, when I get a spare half day, I can write a script that does all this automatically and schedule it to run, say, after the American Football finishes on 5, so that the recording's ready for me to take to work in the morning. Or I can run it remotely from the n810 via ssh onto my laptop at home. It's geeky heaven.

Gosh, well that was a dull post! Hopefully something more entertaining next time...

No comments: