Help needed with Web Socket API

jeffdyer

New Member
Hi,

I have been working on a dual-screen capture web-socket API link from our application which works fine when I have already created a Scene with Inputs defined, it's a really good solution!.

I'm now working on setting a scene up from scratch and can set up the scene and create the scaled "Sources" with the right transforms BUT the sources aren't quite complete because I have to go into each one and select the monitor - otherwise they appear blank. When I click on the source entry first time in the Display panel it just says [Device not connected or not available] but all I have to do is view the properties and then it appear.
I'm obviously missing something - I've attached my log file, would appreciate any suggestions!

What I'm trying to do is get a list off all the monitors and then use CreateInput to add them to the scene, then set their transforms.
Any suggestions much appreciated

1694186419728.png

1694187149141.png
 

Attachments

  • 2023-09-08 16-28-25.txt
    26.3 KB · Views: 40

Bu1c

New Member
Have you tried using the input_settings parameter with the CreateInput command? I encountered a similar issue when creating a input source through WebSocket for a capture card and display capture on a Windows machine. I was able to resolve this issue by providing the `input_settings` parameter with the `device_id` for the capture card and `monitor_id` for the display capture. Below are some examples:

Display Capture​

Code:
{
  "d": {
    "eventData": {
      "inputName": "Desktop Capture",
      "inputSettings": {
        "monitor_id": "\\\\?\\DISPLAY#Default_Monitor#xxxxxxx"
      },
      "inputUuid": "xxxxxxxx"
    },
    "eventIntent": 8,
    "eventType": "InputSettingsChanged"
  },
  "op": 5
}

Capture Card​


Code:
"input_settings": {
  "last_video_device_id": "Game Capture HD60 S:\\\\?\\usb#2xxxxxxxx",
  "video_device_id": "Game Capture HD60 S:\\\\?\\usb#22xxxxxxx"
}

Once the settings was updated I was able to see the respective scenes.
You can retrieve the `device_id` or `monitor_id` from the OBS logs (Help -> Log Files -> View Current Log). Double-click on the source or click on the properties button, and then click OK. The OBS logs should display the `device_id` or `monitor_id`.
I would be interested to know if there is any better way to do this.
 
Top