[GH-ISSUE #39] Add ability to choose camera by ID #29

Closed
opened 2026-03-02 04:08:52 +03:00 by kerem · 2 comments
Owner

Originally created by @bronzegoddess on GitHub (Oct 23, 2022).
Original GitHub issue: https://github.com/gen2brain/cam2ip/issues/39

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
Originally created by @bronzegoddess on GitHub (Oct 23, 2022). Original GitHub issue: https://github.com/gen2brain/cam2ip/issues/39 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_ ``` 3. Then next time we can call it like this: `/Users/bronzemedia/Downloads/cam2ip -cameraid "0x4015000005ac1112" -bind-addr ":4444" -width 1920 -height 1080`
kerem closed this issue 2026-03-02 04:08:53 +03:00
Author
Owner

@gen2brain commented on GitHub (Oct 26, 2022):

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.

<!-- gh-comment-id:1292075488 --> @gen2brain commented on GitHub (Oct 26, 2022): 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.
Author
Owner

@bronzegoddess commented on GitHub (Nov 2, 2022):

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

<!-- gh-comment-id:1299665765 --> @bronzegoddess commented on GitHub (Nov 2, 2022): Thank you for the clarification. I will look into disabling other cameras on my Mac so that the webcam is the only option.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cam2ip#29
No description provided.