Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Use webcam as input with Intel media SDK

SURABHI_G_Intel
Employee
244 Views

Hi,

I am new to media SDK and any gfx development in general. I want use the sample 'simple_decode_d3d11' provided in tutorial to read the input from my webcam or USB camera connected to my system instead of a video file. I could not figure out how to specify camera as input in MSDK_FOPEN/fopen_s. I am using Intel(R) Media SDK 2018 R2 on wondows10. Appreciate any help regarding this.

-Surabhi

 

0 Kudos
1 Reply
Mark_L_Intel1
Moderator
244 Views

Hi Surabhi,

Sorry for the late response.

Your problem is how to input the video stream from a webcam, Media SDK inputs raw video stream only and this is why we are only show with the tutorial code.

fopen() is a function call can only handle files but not stream.

There are several ways to do this, you can use OpenCV functions, or FFmpeg/GStreamer library. Or you can use FFmpeg or GStreamer directly, both of them support Intel hardware accelerated codec(QSV), you can check following site for how to install them:

https://01.org/linuxmedia/quickstart/overview

Hope this helps and let me know if you have any questions.

Mark

Reply