obs-websocket - Remote-control OBS Studio using WebSockets

obs-websocket - Remote-control OBS Studio using WebSockets 5.0.1

dqm

Member
Could this plugin be used to set the streaming key?

Instead of having to enter an event specific steam key under settings > stream key, I'd love to use a browser dock or similar to present a text input field to paste the current stream key to use.
This is possible: one could write a browser dock to accept a text input field and use it to set the stream key in configuration settings. That said, with latest versions of OBS, you can use the integrated websockets and do not need this addon.
 

jeffdyer

New Member
I am struggling to add monitors to a scene. I can get a list of monitors, I can create a scene item and then set it's transform but the monitor does not display. I can see the monitors listed in the "Sources" panel but In the central bar I just see "[Device not connected or not available]" until I open and close the properties panel (don't have to change anything) and then the monitor display appears exactly as I want it. Can any one advise which calls I need to make to get both my monitors into the scene properly purely via code?
 

jeffdyer

New Member
I am struggling to add monitors to a scene. I can get a list of monitors, I can create a scene item and then set it's transform but the monitor does not display. I can see the monitors listed in the "Sources" panel but In the central bar I just see "[Device not connected or not available]" until I open and close the properties panel (don't have to change anything) and then the monitor display appears exactly as I want it. Can any one advise which calls I need to make to get both my monitors into the scene properly purely via code?
I have exported the "Scene Collection" and the only difference between the JSON files is that the working one has a different Monitor ID in the source settings section e.g.
"monitor_id": "\\\\?\\DISPLAY#DEL415D#5&461e0e2&0&UID4352#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}"
instead of this which I gave as the monitor ID
"monitor_id": "DELL U2419H (2)(1)",

Can anyone identify what I am doing wrong?
 

macmar

New Member
Hi All,
I'm new here, and at this moment I need to know where can I configure the obs web service in OBS 29, once in the 29 version no need to install the OBS web service plugin, but it does not appear in the Tool menu.
Could you help me, please?
Thanks in advance.
 

macmar

New Member
Hi All,
I'm new here, and at this moment I need to know where can I configure the obs web service in OBS 29, once in the 29 version no need to install the OBS web service plugin, but it does not appear in the Tool menu.
Could you help me, please?
Thanks in advance.
Just to share it with you, I just ran File Check Integrity, and the OBS was restarted, so the WebSocket Server Settings just appeared after that. So, if it is not necessary to understand it I will understand.
 

notsofast

New Member
Could someone provide or point me to a simple example of how to receive a WebSocket message in an OBS Python script? I assume the script needs to register a callback to receive the incoming message, but I haven't found how to do that in the API or scripting docs.
 
  • Like
Reactions: fpn
Could this plugin be used to set the streaming key?

Instead of having to enter an event specific steam key under settings > stream key, I'd love to use a browser dock or similar to present a text input field to paste the current stream key to use.
FWIW I believe you can use Advanced Scene Switcher to automate changing stream keys.
 

EB123

Member
does anyone know if its possible to control the specific settings of plugins using web sockets ? or does it just control main OBS functions ? I have installed source switcher plugin... id like to find a way to change the "duration" value in the "time switch" mode, also the "duration" value of the "transition"... i have got web sockets working to do basic scene switching but im trying to understand how to change parameters in filters or if its even possible ?
 

bcoyle

Member
does anyone know if its possible to control the specific settings of plugins using web sockets ? or does it just control main OBS functions ? I have installed source switcher plugin... id like to find a way to change the "duration" value in the "time switch" mode, also the "duration" value of the "transition"... i have got web sockets working to do basic scene switching but im trying to understand how to change parameters in filters or if its even possible ?
Hi I don't know if this applies to obs 28+, but in the obs v4 socket api you can use the following command to
TALK TO SOME FILTERS". I use these commands to set opacity.

I don't know if Adv SS will handle these remote commands.

Anyway, hope that helps



"sourceName", SourceName, "filterName", Filtername, "filterSettings", Settings)

"sourceName" =OVERLAY_BLACK
"filtername" = FADE_CONTROL
"settings = {"opacity":0.99}

Sample command string

{"request-type":"SetSourceFilterSettings","message-id":"77,134,OVERLAY_BLACK,FADE_CONTROL","sourceName":"OVERLAY_BLACK","filterName":"FADE_CONTROL","filterSettings":{"opacity":0.99}}


1735346567541.png


SetSourceFilterSettings​

  • Added in v4.5.0

Update settings of a filter


Request Fields:


Name
Type​
Description
sourceName
String
Name of the source to which the filter belongs
filterName
String
Name of the filter to reconfigure
filterSettings
Object
New settings. These will be merged to the current filter settings.

Response Items:


No additional response items.




SetSourceFilterVisibility​

  • Added in v4.7.0

Change the visibility/enabled state of a filter


Request Fields:


Name
Type​
Description
sourceName
String
Source name
filterName
String
Source filter name
filterEnabled
Boolean
New filter state
 

EB123

Member
thanks for the help.. been a while since i looked at it but i did eventually work out what i was trying to do at the time..
 

yukon92

New Member
I'm sending command SetCurrentProgramScene code below. It works, but there's a 2 second delay between OBS websocket receiving the command to it executing it (live log).
I've tried other json websocket commands, like start or stopping stream, and the reaction is immediate.
Anyone encounter this?

{
"d": {
"requestData": {
"sceneName": "Scene1"
},
"requestType": "SetCurrentProgramScene",
"requestId": "99999"
},
"op": 6
}
 

yukon92

New Member
I'm sending command SetCurrentProgramScene code below. It works, but there's a 2 second delay between OBS websocket receiving the command to it executing it (live log).
I've tried other json websocket commands, like start or stopping stream, and the reaction is immediate.
Anyone encounter this?

{
"d": {
"requestData": {
"sceneName": "Scene1"
},
"requestType": "SetCurrentProgramScene",
"requestId": "99999"
},
"op": 6
}
AND after I posted this, i discovered my destination OBS machine had a blank "stinger" file playing on each transition without me seeing it. DOh!
 
Top