miaulightouch / obs-virtual-cam

GNU General Public License v2.0
96 stars 14 forks source link

Cannot support obs-websocket 5.1.0 Protocol #11

Closed coco-hkk closed 4 months ago

coco-hkk commented 4 months ago

I wanna open more than one virtual camera using obs-websocket, eg:

from obswebsocket import obsws, requests

...

virtual_cam_status = self.client.call(requests.GetVirtualCamStatus())
if virtual_cam_status.datain["outputActive"] is False:
    self.client.call(requests.StartVirtualCam())
    time.sleep(1)

...

there is an error:

if virtual_cam_status.datain["outputActive"] is False:
       ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'outputActive'

Portable version does not support obs-websocket after installing obs-virtualcam. However, the full install version works fine without obs-virtualcam.

https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#getvirtualcamstatus

miaulightouch commented 4 months ago

All virtual camera-related commands are for OBS's built-in virtual camera. The portable version of OBS may not register the virtual camera in Windows, which could cause this issue.

I have nothing that could help; this plugin does not support obs-websocket.

It's off-topic at this repository. Please report to the official OBS repository.