How would I go about saving AVI files (no sound)?

I would also like to use a specific codec, Indeo 5.06, and specify the keyframe, the quality, and the FPS.

If possible I would like to get data from DDraw surfaces or from hDCs, the frames that I am saving..

This isn't really an urgent Q but I would like it answered!

GO NOW!