Maybe it would be easier to capture the desktop at interval rates, and then encode each image into a video file using a plugin or an external library.
Check those:
http://bytescout.com/products/developer/imagetovideosdk/imagetovideosdk_first_step_with_visual_c_sharp_net.html[
^]
A Simple C# Wrapper for the AviFile Library[
^]
About how to capture your destop, it's easy. You create a bitmap with the size of the screen, then a Graphics from the bitmap, and then copy the screen and save it:
private void TakeScreenShot()
{
Bitmap bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot);
gfxScreenshot.CopyFromScreen(0, 0, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
bmpScreenshot.Save("Dependencies\\temp.tif", ImageFormat.Tiff);
bmpScreenshot = null;
}
You can adictionally use an external program like VirtualDub. Maybe you can make a script for it, and run it from your program. I know this is not the way you're intended to do it, but it's another way.