Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Capture multiple same name webcams #68

Closed
ZachSundberg opened this issue Apr 4, 2017 · 5 comments
Closed

Unable to Capture multiple same name webcams #68

ZachSundberg opened this issue Apr 4, 2017 · 5 comments

Comments

@ZachSundberg
Copy link

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.

@timrolls
Copy link

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
Copy link

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
Copy link

LFSaw commented Oct 24, 2018

is there a similar solution for linux?

@codeanticode
Copy link
Member

codeanticode commented Aug 1, 2019

Support for multiple same name webcam added with 49382ce and 00562ff, next release of the library will include this fix.

@LFSaw
Copy link

LFSaw commented Aug 1, 2019

wonderful, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants