Udostępnij za pośrednictwem


Capturing Video in Managed Code

Dan Fernandez, Senior Product Manager in the Devloper Group answered a question on our internal list servers this week that I wanted to share because it answers a quesion that I myself have asked recently.

Are there rtesources for capturing video in Managed Code.

The answer is YES !

If you’re running Windows XP, you can use a little-known XP feature called Windows Image Acquisition (WIA) that has a COM library you can program against. This makes capturing either a single frame of a picture or video stream from a USB web cam as easy as 1-2 lines of code.

 

MSDN Windows Image Acquisition docs –

https://msdn.microsoft.com/library/default.asp?url=/library/en-us/wiaaut/wia/wiax/overviews/startpagewiaaut.asp

 

Code Samples:

https://www.codeproject.com/dotnet/wiascriptingdotnet.asp

https://www.codeproject.com/csharp/webcamservice.asp (DirectShow wrapper)

https://www.codeproject.com/csharp/Motion_Detection.asp

https://www.codeproject.com/cs/media/directshownet.asp

 

There is also an open source project to program a webcam across any operating system that may interest you - https://libusb.sourceforge.net/

Comments

  • Anonymous
    May 05, 2006
    hi, this is a bit of an old article, but links to or copies of it seem to come up a bit on google... I have the same question - "how do I capture VIDEO with WIA" but all of these resouces seem to focus on taking a single image snapshot.

    Do you have any info on storing or transmitting a video stream?

    Thanks

  • Anonymous
    November 22, 2006
    Hi, its me T. Siamginsuan Ngaihte, the topic and links help me alot. But I still wanted to know and learn how to Capture Video stream using DirectX SDK in Managed Code. Cheers for anyone who can help me out. Please contact me here: ngaihte.suan@rediffmail.com

  • Anonymous
    December 17, 2007
    sir can u tell me how to caputure the desktop as a video as we do screen caputure can we do screen caputur as a video