Video Capture with C#

I’m having lots of fun writing a video capture application in C#.  Windows Media Foundation is supposed to be the “cool new way” to do this.  Unfortunately, there just isn’t a lot of support yet in the drivers and as far as I can tell, Windows Media Foundation does not work with the DirectShow drivers that capture cards use.  So, I’ve gone down the rabbit hole of learning how to write a video capture application using C# and DirectShow.  There just isn’t much information out there because everyone seems to want to use C++.

After opening Microsoft’s sample C++ app to do video capture, I’ve come to the conclusion that Microsoft COM C++ just makes me feel stupid.  It’s always made me feel stupid.  I used to think it was me.  I know now, that it’s just an ugly API and you have to be able to think in strange ways to do COM.  I’ve learned so many languages and libraries now that I can say, it’s just one ugly mess.  I’m glad they’ve been going down the CLR route.

I’m using to handle the interop layer.  I have it capturing video from my Intensity Pro capture card.  My super fast hard drive and SATA3 system is just barely able to keep up with the uncompressed AVI file that I’m capturing.  I could compress it, but I don’t want to lose ANY color information as we will be using this footage for green screen magic.

2 thoughts on “Video Capture with C#

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>