Thanks guys, Dirk pointed me in the direction of Fraps (I think), but I was wondering whether anyone had managed to build the functionality into their own software.