Workflow: Topfield PVR to XviD

I used to spend a lot of time building my collection of music videos grabbed from Rage. Then it all went up in a puff of dead hard disk (the cobbler’s children’s shoes always have holes in their soles, you know) and I didn’t bother trying to rebuild.

This was about two years ago. I’ve started again, with a new and improved workflow. By documenting it here, maybe some hapless fool will come across it when they’re trying to figure out how to make this work.

First: I record using a Topfield TF5000PVRt, but once you get past the “getting it to a computer” step the same process should apply to any DVB-T source. I’ve simplified things a lot in the past year by adding a Icebox2 to our TV setup. This is a reflashed Asus wireless bridge with custom firmware set up to talk to the Toppy. You can get the same results with something like the Linksys NSLU2 but the Icebox comes ready-to-go.

So extracting the data is as simple as:

$ lftp 192.168.0.3
lftp 192.168.0.3:~> site turbo 1
200 TURBO is now on
lftp 192.168.0.3:/> cd DataFiles/
cd ok, cwd=/DataFiles
lftp 192.168.0.3:/DataFiles> get somefile.rec
[...]
lftp 192.168.0.3:/DataFiles> site turbo 0

The next step is to fix up any sync errors. The simplest tool for the job is ProjectX. This is a Java app, so you’ll need a Java runtime too. It runs just fine on Windows, Mac, Linux, whatever. In my case I’m running it on Solaris as that’s where my big chunk of spare disk lives.

The result is three files: somefile.m2v, somefile.ac3, and somefile.mp2. You can also get ProjectX to grab teletext-based captions and convert them to any of a range of formats, including bitmap streams suitable for DVD. Not going into that right now, maybe some other time.

I had hoped that I could do the main encode on the Solaris box as well, as that’d keep my desktop free of big compute jobs and available for Warcrack. Didn’t work out. mencoder managed to screw up the A/V sync even though ProjectX fixes that. There’s probably a way to make it work but frankly life is too short.

So the next step is to import the video (somefile.m2v) into VirtualDubMod on Windows. Set up an appropriate resize filter (I use 576×324 and the precise bilinear scaling algorithm), add the audio stream (somefile.mp2, though I suppose you could use the AC3 if you wanted but my goal is something that’ll play on the widest range of hardware possible), and set up a two-pass XviD encode of the entire file.

One small gotcha is that the default for the first-pass statfile is “\video.pass”, and at least on Vista this doesn’t work. You’ll need to explicitly set the path for the statfile, but the codec remembers this once you’ve set it for the first time.

Run any encodes you have via the batch job control system in VDM, this way you can run it overnight.

Once the whole thing has been converted to XviD, it’s time to clip out the bits you want. Avidemux has gotten a lot better since I last tried working with it, and the Windows port seems pretty solid. The “smart copy” feature is very nifty: if your start point isn’t on a keyframe it’ll re-encode the first little bit as needed.

I’m using the LAME audio codec via Avidemux as I save each music video. This means instead of a few seconds it can take a minute or two per clip but the results are quite good.

This may sound like a lot of work but it really isn’t. Most of it isn’t interactive, it’s just setting up a batch job and letting the machines do the work. The final step of cutting out the bits you want to keep is by necessity interactive but that’s unavoidable.

Why not just use VirtualDub’s editting functions? Because for every job in the queue it reloads (and reindexes) all of the streams. This really slows things down with 8GB of data coming off a network share! More efficient to just encode the lot then clip out the bits you want later.

Popularity: 40% [?]

UNIX snob meets Outlook

I am by profession a UNIX systems admin. I work with a group of other UNIX admins. We used to do mail with a Solaris system running Cyrus and using whatever clients we wanted, typically mutt with end-users using Eudora.

There was a big push to unify calendaring across the organisation — there had previously been quite a few different departmental calendaring systems, some Exchange, some various web apps, plus a central Oracle Calendar system serving about 2,000 users.

Much to the horror of my colleagues (and, to be honest, me too) the organisation chose Exchange to replace all those calendar systems plus our nice simple comprehensible mail server.

Resistance plans were made. Vows to “never use that abomination” were made. Most of my colleagues have stuck with mutt talking to the Exchange IMAP interface, grudgingly using Outlook Web Access when they absolutely can’t avoid using the calendaring service. I believe some are forwarding back off Exchange to random UNIX systems.

I took a different approach. Why, I asked myself, should I try to make myself more efficient by using my comfortable tools? Management clearly doesn’t want me to be efficient, so why give them more than they’re asking for?

So I decided to try and use Outlook. Did not exactly have high expectations. They were exceeded.

The first step was to switch from mutt to Thunderbird. I’ve been a text snob for at least a decade so that was a pretty big move. Still not thrilled with Thunderbird but it’s a better IMAP client than mutt is ever likely to be.

Moving from Thunderbird to Outlook was relatively painless. The big change (text to GUI) was already done. Here are the things that I changed from the defaults in Outlook to make it a usable environment:

  • View->Reading Pane->Bottom;
  • Tools->Options->Mail Format->Stationary and Fonts->Fonts then set all of the fonts to be bigger (or whatever it is you need);
  • View->Arrange By->Custom (for every folder!):
    • Other->untick “use multi line layout in widths smaller than…” and make sure “Always use single-line” is selected;
    • Other->Turn off autopreview;
    • Other->Increase the column and row font sizes;
    • Fields->remove any fields you really don’t care about;

That has been enough to make Outlook reasonable from a visual-impairment perspective. Which is moderately interesting.

More interesting, though, is how it has changed my workflow and efficiency. Much to my surprise it’s worked pretty well. It’s extremely easy to mark a message as requiring followup, which means it’ll appear in the default “For Follow Up” virtual folder. It’s equally as easy to mark it as completed when it’s done with. This alone has made me less likely to forget to do things that’ve been requested.

The task list has also proven useful, particularly combined with drag-and-drop of messages, contacts, and meetings. My one complaint would be that the Palm conduits (including Chapura’s PocketMirror) don’t copy text from these linked items into the notes field when synchronising.

All of this is doable with other tools. But the integration with Exchange, being able to get at the content from anywhere with Outlook or a web browser, is very handy and somewhat more difficul to replicate with a good user interface.

The main requirements for this sort of thing to be workable, in my opinion, are (a) fairly lax Windows domain policies so you can customise Outlook; and (b) sufficiently fast desktop and server systems so you’re not sitting around waiting for the application.

Would I use Outlook as an IMAP client? Why bother? It’s not very good in that role anyway, stick with Thunderbird if you’re not working with Exchange. But frankly, while it’s not for everyone it’s not at all as bad as the typical UNIX bigot makes it out to be either.

Popularity: 39% [?]