Capture video of external display webcam, instead of laptop?

Hello everybody,

I’m a beginner when it comes to openFrameworks and this is my first post here! I have some experience when it comes to programming, especially in Python and C++.

I’m currently following @lewislepton’s amazing tutorial series on YouTube to get accommodated a little better, and have stumbled upon a small issue with video capturing using ofxOpenCv (i.e. ofVideoGrabber).

When I compile and run the code in Xcode, the app wants to capture video from my main camera - which works great -, however I use a MacBook Pro in clamshell mode (closed) with an external display. The captured image is thus black. :wink:

Does anybody know how to switch to the webcam of the display instead?

Any help is greatly appreciated!


The videoGrabber example shows you how to select a device (setDeviceID())
Good luck


Thank you, @Jildert .