RawtohRawtoh/Docs
Documentation

OBS Module

Full OBS Studio control — scenes, sources, audio, streaming, recording, and more.

The OBS module connects OBS Studio to Rawtoh via the OBS WebSocket protocol. It gives you full control over your scenes, sources, audio, streaming, and recording — all from your automations.

Getting started

OBS runs on your machine, out of reach of a hosted service. The module therefore works in two halves: a hosted backend that holds the Rawtoh connection, and a browser tab on the streaming PC that talks to OBS on localhost and relays calls and events. Keep that tab open while you stream — calls fail with an explicit error while it's closed.

  1. In OBS, enable the WebSocket server (Tools → WebSocket Server Settings) and note the port and password
  2. Open the OBS module site, sign in with your Rawtoh account and pick your organization
  3. Add an OBS account with that host, port and password — the credentials stay on the server, never in browser storage
  4. Click Install with Rawtoh. The module creates the instance in your organization, enrolls its key pair and connects. No token to copy; you need the owner role
  5. Leave the tab open on the streaming PC. One account per OBS install — add more for a second machine

For a live show, prefer the local OBS module: a single binary that runs next to OBS, with no browser tab to keep open, and reconnects on its own when OBS or the network drops. Same events and methods. See Security & reliability for the setup.

Events

The OBS module emits events for everything that happens in OBS Studio. Use these as triggers to react automatically.

Scenes

EventDescription
scene.current_changedActive scene changed
scene.preview_changedPreview scene changed (studio mode)
scene.createdNew scene created
scene.removedScene removed
scene.name_changedScene renamed
scene.list_changedScene list changed
studio_mode.state_changedStudio mode enabled / disabled

Streaming & recording

EventDescription
stream.state_changedStreaming started / stopped
record.state_changedRecording started / stopped
replay_buffer.state_changedReplay buffer started / stopped
virtual_cam.state_changedVirtual camera toggled
exit.startedOBS is shutting down

Sources, inputs & transitions

EventDescription
input.mute_state_changedInput muted / unmuted
input.volume_changedInput volume changed
input.created / input.removed / input.name_changedInput added, removed or renamed
scene_item.enable_state_changedSource visibility toggled
filter.enable_state_changedFilter enabled / disabled
transition.started / transition.endedScene transition started / finished
transition.current_changedActive transition changed

Event payloads are forwarded unchanged from obs-websocket, so field names are camelCase — e.g. event.payload.sceneName.

What you can do

Call these methods from your actions to control OBS. Params use the obs-websocket names, in camelCase — e.g. module("obs").request("scene.set_current", { sceneName: "BRB" }):

Scenes & studio mode

Sources & inputs

Streaming & recording

Filters & transitions

Other

Example automations