FTE can capture (and encode) a AVI in realtime.
CVARs:
capturecodec
capturerate
capturesound
capturemessage
Commands:
capture
capturedemo
capturestop