I found this easy approach: I'll output pngs numbered from 0 upwards and then use ffmpeg to convert it into video.
This is working for my current screen scraping needs. Though a friend said that if I ever want to avoid jitter, I should either get help from GPU at video encoding or then make an unencoded flatfile. He also said that I'd need to pick 60fps images and interpolate them down to 30fps to get smooth, nice high-definition video.
The video class in wiki seems to bother only with decoding video. I don't know how to apply that one to encoding and saving videos.
There's another question I've got: where the heck ffmpeg keeps its documentation about libavcodec and such? I only found something about decoding videos with those. Didn't tell how to encode. :?