I’m trying to get my webcam working with oF on windows 10, but it’s not working properly in any version that I have here (0.9.8, 0.10.0 and 0.10.1). In all of them, the result is just as displayed on the screenshot below, running the VideoGrabberExample
The camera itself is not the issue, as it works on the browser and other applications, and even its status LED turns on when running the videograbber example. Just the image that is grey all the time. Any ideas on that?
I am, as you may see in the logs, it’s setting up device 1 (Logitech Camera) and logging it as ready to capture. Also, as I mentioned on the original post, the camera’s LED lights up, indicating that it’s in use.
Thanks for testing @hrs. It’s most likely something related to my setup, but I have no idea even where to begin to investigate, and the fact that the camera works in every other application that I tested makes it even worse. Regarding your suggestions:
I have no USB extensions, it’s a brand new camera plugged directly into the computer. I tried switching USB ports, no success
Everything seems fine on device manager
I’ll try that and some system updates, let’s see if it makes any difference
The only other application where I’m having issues is TouchDesigner. In it, using DirectShow it outputs that cannot connect to device, and using MediaFoundation it gives no error, but also no image. AFAIK oF uses DirectShow right?
All the updates that windows had to me, plus uninstalling and resinstalling the webcam did nothing.
When commenting the OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP constant, on oF 0.10.1 it got a bunch of QuickTime related errors, which makes sense since the libs are not included anymore. On 0.9.8 those errors didn’t occur, but then I got some other errors about C externs (print below). I may try to include the QT libs on 0.10, but I believe I’ll get the same errors.
I found this post in which Arturo mentioned using GStreamer to get the webcam, so I decided to give it a try. Before running on oF I tried using the command line, and this is what happens:
gst-launch-1.0 ksvideosrc device-name='Logitech HD Webcam C270' ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0: read failed: DeviceIoControl returned 0x00000005: Access denied. [0x00000005]
Additional debug info:
../sys/winks/gstksvideosrc.c(977): gst_ks_video_src_create (): /GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0:
Execution ended after 0:00:00.387035000
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
I’ve never seen issues with webcam access permissions on windows before, and have no idea how to solve it. I’m starting to think that it’s really something related to the webcam itself, I’ll try to get another one to test today.
Ok, wrapping up this: I still have no idea what was causing the issue, so I went full berserk and reinstalled windows: problem solved, camera working as it should. Terrible, but what can we do about it?