ofVideoGrabber issue

#1

Hey all,

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?

Thanks

#2

Have you checked you’re using the correct deviceID? It looks like you have a number of devices in the console window. Your logitech camera is device 1

#3

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

#4

New info: for some reason, the isFrameNew() method is always returning false. Not sure if it has something to do with camera drivers, or with the OS itself. Still investigating.

#5

Tried using openCV’s VideoCapture, it can’t open any device index that I tried. I’m really not understanding this, as I can get the camera’s feed via javascript and on Unity, but nothing on oF or Cinder. Any new ideas on what may be causing it would be most appreciated.

#6

I just tested videoGrabberExample with Logitec web cam C925E and it works ok.
I didn’t even install a driver, no code change (deviceId = 0).

Tested on,

  • Windows 10
  • oF 0.10.0 (from github)
  • oF 0.10.1 official release version(from oF website downloaded right now)

Console output here

+Edit
Here is ideas I would suggest to find a solution.

  • remove USB extention cable (if any)
  • check device manager
  • uninstall driver, install again
#7

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?

#8

I’m not familiar but it seems so.
In the ofConstants.h, seems like we can switch to Quicktime.

#9

Nice observation, I’ll try that in a bit!

Thanks @hrs

1 Like
#10

So, things are still no good:

  • 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.

All in all, I’m pretty much on the same place. The worst part is not being able to identify the source of the issue. Any idea on how to debug it will be handy.

#11

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:
gst_ks_video_device_read_frame failed
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.

#12

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?

Anyway, thanks again everyone

1 Like
#13

Wow, thanks for report.
Might be because of registry setting or security settings?

#14

Maybe something in the registry, yes, but it’s another thing that would probably take longer to find than to reinstall the OS.

Thanks for all your help during these last days! :slight_smile:

1 Like