UWP get live webcam video stream

2019-02-17 12:31发布

问题:

I was looking into the MediaCapture class, however it doesn't seem to expose what I'm looking for. I want the live Stream from the web cam - not to record it or preview it. I'm working on the Microsoft Cognitive Services Emotion API and I want to follow this example, but instead of getting a local video stream from the file system - I want to get a Stream from a web cam.

回答1:

The Microsoft Cognitive Services Video APIs, including Emotion, are REST APIs, not streaming APIs, so your scenario is not supported.

What you can do instead is periodically capture a frame and make RESTful calls to one of the image APIs.