Skip to content

Unable to Capture multiple same name webcams #68

Closed

Description

@ZachSundberg

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.

Activity

  1. timrolls commented on Nov 22, 2017

    @timrolls

    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?

  2. GeraintDavies commented on Apr 11, 2018

    @GeraintDavies

    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/

  3. LFSaw commented on Oct 24, 2018

    @LFSaw

    is there a similar solution for linux?

  4. codeanticode commented on Aug 1, 2019

    @codeanticode
    Contributor

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

  5. LFSaw commented on Aug 1, 2019

    @LFSaw

    wonderful, thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions