Skip to content

Unable to Capture multiple same name webcams #68

@ZachSundberg

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions