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

Add ability to choose camera by ID #39

Open
bronzegoddess opened this issue Oct 23, 2022 · 2 comments
Open

Add ability to choose camera by ID #39

bronzegoddess opened this issue Oct 23, 2022 · 2 comments

Comments

@bronzegoddess
Copy link

bronzegoddess commented Oct 23, 2022

Currently when I run the program I go through a series of indexes until I find the right camera on my mac.
-index 1, 2, 3 etc

It would be nice if we could call the camera by its Unique ID.
Example:
Unique ID: 0x4015000005ac1112

Also, it would be even better if the program would tell us what those Unique Ids are (on our system)

Full Example

  1. Start the program by running it via index
    /Users/bronzemedia/Downloads/cam2ip -index 2 -bind-addr ":4444" -width 1920 -height 1080

  2. The system responds with:

_Listening on. :4444
CameraID.     : 0x4015000005ac1112_  
  1. Then next time we can call it like this:
    /Users/bronzemedia/Downloads/cam2ip -cameraid "0x4015000005ac1112" -bind-addr ":4444" -width 1920 -height 1080
@gen2brain
Copy link
Owner

Unfortunately, OpenCV which is used for macOS doesn't provide a name or ID, only an index. Even in native Linux and Windows implementations, I don't see a way, perhaps it is possible to dig that info on Windows. At least, on Linux is possible to always map the camera indexes via UDEV so they don't change.

@bronzegoddess
Copy link
Author

Thank you for the clarification.
I will look into disabling other cameras on my Mac so that the webcam is the only option.

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

No branches or pull requests

2 participants