Skip to content

Use unique device path per registered camera #17

Open

Description

@letmaik

RegSetValueExA(hKey, "DevicePath", 0, REG_SZ, (LPBYTE)"foo:bar", (DWORD)sizeof("foo:bar"));

Applications which use the device path to differentiate cameras stumble since every registered Unity Video Capture instance uses the same device id. OBS has no problems with it, but for example Zoom shows all cameras but only allows to select the first one. Skype only shows the first one.

Quoting from the Microsoft docs:

The "DevicePath" property is not a human-readable string, but is guaranteed to be unique for each video capture device on the system. You can use this property to distinguish between two or more instances of the same model of device.

To be honest though, I'm not sure if this hack is needed anymore. The virtual camera from OBS doesn't have a device path and works in all apps incl Skype. Maybe it got fixed at some point in Windows? The forum thread referenced in the code is 9 years old.

Activity

  1. mirh commented on Jan 11, 2022

    @mirh

    Skype was indeed bugged/regressed when it started to require it, and it was fixed soon as you can read in the comments of the blog linked in the thread.
    But unity still requires it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions