Trying to setup a virtual webcam, but no matter the software I use (obs-studio, streamlabs) I don't get a webcam output.

Hendrik23053

New Member
I've been trying for a while to get this to work so I can use opencv's videocapture() function to run a tensorflow model over my captured screen. However for some reason I cannot get either obs-studio or streamlabs virtual webcam to work. On discord and also on the default windows 10 Camera app it says no video devices found.

I haven't used this software very often, however I have pretty much followed every troubleshooting video on youtube and none of the solutions worked for me.
I don't have a webcam on my pc.

I would greatly appreciate if someone could help me with a solution.

Thanks for your time,
-Hendrik
 

Lawrence_SoCal

Active Member
My go-to recommendation is to get Video (and Audio) inputs working at OIS layer first, then move onto OBS
If I understand your post correctly, the Windows 10 camera app does NOT recognize there being any video input device. As such, there is nothing for other software looking for a video device (OBS, etc)

do you know you have opencv working correctly?
a quick Google search shows opencv videocapture is for video capture (same thing as OBS)... so why duplicate function? use one or the other... I'd think
or have you configured an option on that software to not only capture the screen, but then also output as a video stream?
in which case, The other option (only a silly wild guess) is another input Source type (VLC, or ??) but only if you have opencv configured for such (if such is even possible)

But for screen capture, why use opencv at all, if you are planning overlays or other compositing, and planning to use OBS for that. Just do the screen capture with OBS?
what am I missing?
 

Hendrik23053

New Member
Thank you for the reply.
I'm currently learning tensorflow, and I am following this youtube tutorial: https://youtu.be/yqkISICHH-U?t=9537

The reason I'm trying to use a virtual webcam is because in this tutorial he was using opencv to use object detection model on the visual output of his webcamera so he can detect certain hand gestures and use them. However my goals differ from the tutorial. First off I don't have a webcam, and I don't really want to build an app that detects objects through a webcam. I want to make a script that detects objects on my screen and then use those object detections to make further choices such as download a picture that matches the object, catalog that website that matches the object so on and so forth. I've tried to look for a way to make the parameter for the cv2.VideoCapture() function to be maybe a video file that is recorded and then passed to the function by obs. But I realized that would create a large delay and wouldn't serve the functionality of my program i'm trying to develop. So the alternative I found was basically to create a virtual webcam and pass that output to the cv2.VideoCapture() function and then use the rest of the code in the tutorial above.
This stackoverflow forum post gives a rough idea https://stackoverflow.com/questions...bs-virtual-cam-in-my-python-code-using-opencv
I think this would work for most people, but something with my webcam detection settings/hardware is probably messed up and I'm trying to figure out what the issue is. I'll look into the OIS layer and see if I can solve it.

I'm sorry if I didn't explain it properly, I am only learning this stuff recently myself.
 

Hendrik23053

New Member
My go-to recommendation is to get Video (and Audio) inputs working at OIS layer first, then move onto OBS
If I understand your post correctly, the Windows 10 camera app does NOT recognize there being any video input device. As such, there is nothing for other software looking for a video device (OBS, etc)

do you know you have opencv working correctly?
a quick Google search shows opencv videocapture is for video capture (same thing as OBS)... so why duplicate function? use one or the other... I'd think
or have you configured an option on that software to not only capture the screen, but then also output as a video stream?
in which case, The other option (only a silly wild guess) is another input Source type (VLC, or ??) but only if you have opencv configured for such (if such is even possible)

But for screen capture, why use opencv at all, if you are planning overlays or other compositing, and planning to use OBS for that. Just do the screen capture with OBS?
what am I missing?
So I think I found a solution. Apparently I needed to download an HEVC codec for it to work, and I also ran the windows 10 video troubleshooting tool. That made it so the virtual webcam showed up on discord so I think it will work now on opencv.
Thanks for your help.
 
Top