Configuration
OBS connection settings are configured in your boofstream config:Enable automatic scene switching
OBS WebSocket host and port (default:
127.0.0.1:4455)OBS WebSocket password (set in OBS Tools > WebSocket Server Settings)
Scene to switch to when no game is active
Scene to switch to when a game starts
POST /obs/connect
Connects to OBS Studio via WebSocket.Request
No request body required. Connection settings are read from the config.Response
Returns a simple success response:200 OK
Example Request
Behavior
- Connects to
ws://{config.obs.host}with the configured password - Sets
obsConnectedstate totrueimmediately - Connection failures are handled asynchronously and set
obsConnectedtofalse - Updates are broadcast to all connected clients via Socket.IO
Automatic Scene Switching
WhendoSwitch is enabled and OBS is connected:
- Game Start: Switches to
gameScenewhen Slippi detects a game starting - Game End: Switches to
noGameScenewhen a game completes
Notes
- Connection errors do not throw - they’re caught and handled silently
- The endpoint returns success immediately, before confirming the connection
- Actual connection status is reflected in the
obsConnectedstate field
POST /obs/disconnect
Disconnects from OBS Studio.Response
Returns a simple success response:200 OK
Example Request
Behavior
- Closes the active OBS WebSocket connection
- Sets
obsConnectedstate tofalse - Safe to call even if not currently connected
- Updates are broadcast to all connected clients via Socket.IO
State Updates
The OBS connection status is reflected in the global state:/state endpoint to check the current connection status:
Error Handling
Connection errors are handled gracefully:- Failed connections set
obsConnectedtofalsebut don’t throw errors - Invalid credentials or wrong port will cause silent connection failures
- Check the
obsConnectedstate field to verify connection status
OBS WebSocket Setup
- In OBS Studio, go to Tools > WebSocket Server Settings
- Enable the WebSocket server
- Set a password (or use without authentication)
- Note the port (default: 4455)
- Configure these settings in your boofstream config
Supported OBS Version
This integration usesobs-websocket-js and supports OBS Studio 28.0+ with WebSocket protocol 5.x.