emilianavt / OpenSeeFace

Robust realtime face and facial landmark tracking on CPU with Unity integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Camera opened by dshowcapture has changed?

TigerHix opened this issue · comments

The new dshowcapture DLLs in commit 89e1040 will open a different camera than the old DLLs in commit 92717a6.

For example, here's my camera list:
image

With --capture 1, the old DLLs open VTubeStudioCam:

Trying to open camera 1
Trying to open camera 1 with DShowCapture
Camera configuration: 640x360 333333 101
Final camera configuration: 640x360 30
Format: 0 Internal format: 101
Camera: "VTubeStudioCam" Capability ID: None Resolution: 640x360 Frame rate: 30 Colorspace: 101 Internal: 101 Flipped: False
Got frame
Got frame
Got frame
Got frame
Got frame
Got frame

With the new DLLs, 'WarudoCam' is opened instead:

Trying to open camera 1
Trying to open camera 1 with DShowCapture
Camera configuration: 640x360 333333 101
Final camera configuration: 640x360 30
Format: 0 Internal format: 101
Camera: "WarudoCam" Capability ID: None Resolution: 640x360 Frame rate: 30 Colorspace: 101 Internal: 101 Flipped: False
Got frame
Got frame
Got frame
Got frame
Got frame
Got frame

Is this because the new VTubeStudioCam has been blacklisted in the new dshowcapture DLLs, so that the IDs are off-by-one? Is it possible to blacklist the vcams without affecting their ID?

Thank you for this awesome library!

The IDs are not permanent and may change at any time (e.g. as cameras are connected or disconnected). When trying to open a specific camera, I would recommend looking for the name string. If you are using dshowcapture.py, you can call ´get_info()` (https://github.com/emilianavt/OpenSeeFace/blob/master/dshowcapture.py#LL110C16-L110C16), otherwise you can also retrieve JSON with camera information from the DLL.