I used
http://en.wikipedia.org/wiki/VirtualDub[
^],
http://www.virtualdub.org/[
^], source code available, the product is robust enough. Windows only. In principle you can use some of source code and P/Invoke to your C# application.
Most likely, you would better use something like ffmpeg (
http://en.wikipedia.org/wiki/FFmpeg[
^]). I used is only as a codec. There is a C# wrapper:
http://www.ffmpeg-csharp.com/[
^], but in fact, it's only a wrapper around available ActiveX component. Unfortunately, I never tried it.
—SA