Scott Hanselman

Capturing Video a Web Camera using WIA - Not Possible?

June 30, 2006 Comment on this post [0] Posted in Coding4Fun
Sponsored By

My Coding4Fun article using a $4 webcam would capture single frames using WIA, the WIA Automation Layer and upload them to a blog.

However, I get 3 emails a week asking how to capture video using WIA. I don't think it's possible. WIA supports "TakePicture" but that operation isn't fast enough to get more than a few frames a second, and then even only in JPEG format.

WIA does support Video Overlay though so you can see what you're not capturing, so that's nice. ;)

Seriously, though, WIA isn't the way, it appears that DirectShow likely is. This .NET Library wrapper around the notoriously difficult DirectShow APIs says it supports "capture from video capture devices to WMV files." It appears that this library also exposes that notorious hardness, so take a breath before you dive in. It's hardcore.

Other possibilities are the CAPTURENET Sample that might do the trick. Also Kristoffer Vinther (a master sorter at least) has a library that looks pretty capable.

Aside: Yes, that's a signed 12" Vinyl of Bobby McFerrin's Simple Pleasures album, framed on my wall just below Miles Davis. I used to look for good echos for acappella on campus, but I am nothing compared to my buddy from Vertigo Software (and high school) Matt Hempey and the several acappella albums he has under his belt.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.