You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been around for years, The only solution I've found online is renaming camera's through the registry, but that doesn't actually work. If you have two webcams with the same name, Capture.list(); will list them, but you can only get the first instance.
In this example I happen to know that the 3rd and 48th camera's are:
"name=Microsoft LifeCam HD-3000,size=1280x720,fps=10"
But since list() just produces an array of Strings, assigning the camera's to new captures just grabs the first camera with that name.
void getCamysByIndex() { String[] cameras = Capture.list(); if (cameras.length == 0) { println("There are no cameras available for capture."); exit(); } else { cam[0] = new Capture(this, cameras[3]); cam[0].start(); cam[1] = new Capture(this, cameras[48]); cam[1].start(); } }
I'm using this to count standing bowling pins. Right now I can get by just fine with two different brands of camera, but it's not very extensible. Seems like there should be a better way.
Have worked out Parsing the individual devices (Logitech c920), but each lists 3 entries for 640x480/30 (is this because color modes aren't shown?).
Looks like the constructor ultimately boils down to device name, though. So I'm unable to set device directly to an index in the list of devices.
Has anyone successfully set multiple capture devices with the same name?
Activity
timrolls commentedon Nov 22, 2017
Also running into this problem.
Have worked out Parsing the individual devices (Logitech c920), but each lists 3 entries for 640x480/30 (is this because color modes aren't shown?).
Looks like the constructor ultimately boils down to device name, though. So I'm unable to set device directly to an index in the list of devices.
Has anyone successfully set multiple capture devices with the same name?
GeraintDavies commentedon Apr 11, 2018
you can create/edit the camera friendly name, i've got 4 working all been edited i followed this guide https://www.avoiderrors.net/rename-devices-device-manager/
LFSaw commentedon Oct 24, 2018
is there a similar solution for linux?
codeanticode commentedon Aug 1, 2019
Support for multiple same name webcam added with 49382ce and 00562ff, next release of the library will include this fix.
LFSaw commentedon Aug 1, 2019
wonderful, thanks!