Awesome
OBS Websocket GD
A Godot addon to interact with obs-websocket. Tested on Godot 4.0.2.
Game/App Quickstart
- Install obs-websocket for your platform. Recent distributions of OBS should come with obs-websocket already included
- Configure obs-websocket in OBS and set the password to something of your choosing
- Clone this project
- Add the
addons/obs-websocket-gd/obs_websocket.gd
node to your scene - By default, the addon tries to connect to
localhost:4455
with a password ofpassword
. Change the password inaddons/obs_websocket_gd/obs_websocket.gd
to the password set in step 2. The variables are exported for convenience - (OPTIONAL) Connect some listener to the
data_received(update_data)
signal inobs_websocket.gd
.data_received
outputs anObsMessage
data structure. This data structure stores the raw response and also maps the data to the expected OpCode fields. - Call
establish_connection()
on theobs_websocket.gd
node to connect to obs-websocket. Theconnection_established
,connection_authenticated
, andconnection_closed
signals are available to connect to - Call the
send_command(command: String, data: Dictionary = {})
method on theobs_websocket.gd
instance. Reference the obs-websocket protocol to find out what commands + data to send.