8

Can I stream a live video in WPF application from my web cam? If yes, then How?

Ramesh Soni
  • 15,867
  • 28
  • 93
  • 113
  • 1
    it is possible, I did this for my entry for the codemaster competition a few years ago. See in action here - http://video.google.ca/videoplay?docid=-2891564165965980591&ei=Xw1iSdn-NIyG-wHX94yrCA&q=dradis+codemaster&hl=en I'll dig up the code and post more when I get home from work – dfasdljkhfaskldjhfasklhf Jan 05 '09 at 13:39

1 Answers1

9

You will have to use DirectX Capture or something (is not in WPF right know, so use DirectX API's directly).

Look at: WPF Media Kit. It can grab the Vista Windows desktop manager DirectX Direct3D shared Surface, and use it as a visual brush in WPF. He does some nice things with it. Look at his blog where he explains it.

I hope this helps you on your way...

UPDATE 2009-11-06: The VideoRenderElement Codeplex project has an example on how to stream webcam content. This project looks like it would fit your requirment perfectly.

UPDATE 2013-02-18: Alternatively one can use the Expression Encoder SDK. For an example you can look at the WPF-Webcam-Control article on CodeProject

Cohen
  • 2,720
  • 26
  • 24
  • 1
    Are we still have to use WPF Media Kit no days or there is something else? Any updates? Thank you! – NoWar Feb 07 '13 at 18:09
  • 1
    @Peretz: actually today I saw this article: http://www.codeproject.com/Articles/285964/WPF-Webcam-Control He uses the Expression Encoder SDK. I've updated my answer based on this. – Cohen Feb 18 '13 at 15:18
  • Yeah... I know this article. I have used it. The main problem that streaming presets are limited for FREE version. :( We have to pay 200 dollars to use ALL possible streaming presets. – NoWar Feb 19 '13 at 00:53