issue with 4 idenitcal cameras. Max give different name in the same patch

F_Dos's icon

In Device Manager, I have four C270 cameras, which appear under these names:

(For some reason, they don’t have the same name, even though they are the same camera.)

In Max, I have a patch that opens and records from all four cameras.

For some reason, the drop-down menu is not the same for all of them.

Max Patch
Copy patch and select New From Clipboard in Max.

Any idea what can it be? I do something wrong in my max patch?

Edit: I did not refresh the devicelist....

Rob Ramirez's icon

i’m reminded of your previous posts on these issues. did you ever get in touch with support so that we could get all your details? i’ve got 2 logitechs that i can try and reproduce with

F_Dos's icon

Yes but I could not get an help from them..

The main issue I'm facing is change of camera id when I shut down the computer and then open again, or changing the USB ports of the cameras.

If I'm doing restart the id is remain the same.

Is this could be solved in some way?

F_Dos's icon

Is this a problem I'm facing that could be solved with a Python script or something similar? Meaning, maybe this issue only exists in Max and can be bypassed with another script?

F_Dos's icon

Found a workaround - not a Max fix, but bypasses the issue entirely using Python.

(Built this together with Claude AI)

Since Max's uniqueid is derived from DevicePath (enumeration-order dependent), it breaks on full shutdown/restart or port changes - exactly what you're describing.

The fix: identify each camera by its USB LocationPath instead (via Windows' DEVPKEY_Device_LocationPaths), which reflects physical port topology and stays stable regardless of enumeration order.

Flow:

  1. A Python script (PowerShell + opencv-cam-idx) does a one-time calibration: opens each camera, you label it (e.g. cam1, cam2...), and saves LocationPath → label to a JSON file.

  2. On every session, the script re-reads current LocationPaths, matches them against the saved labels, and resolves the current cv2/DirectShow index for each label - regardless of what Windows assigned this time.

  3. It sends the result to Max via OSC (/camera/cam1 → 2, etc.).

  4. In Max: udpreceiveroute (by label) → prepend indexjit.grab per camera, with an open message.

Tested through multiple restarts and full shutdowns - LocationPath stayed consistent every time, even when the raw cv2 index shifted between sessions.