Skip to content

afomi/obs_ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

obs_ex

Elixir client for the OBS WebSocket v5 API.

Implements all 137 request types: General, Config, Sources, Scenes, Inputs, Transitions, Filters, Scene Items, Outputs, Stream, Record, Media Inputs, UI.

Installation

def deps do
  [{:obs_ex, "~> 0.1.0"}]
end

Quick start

Enable the WebSocket server in OBS: Tools → WebSocket Server Settings → Enable.

{:ok, pid} = ObsEx.WebSocket.start_link(host: "localhost", port: 4455, password: "secret")

{:ok, %{"currentProgramSceneName" => scene}} = ObsEx.WebSocket.get_current_program_scene(pid)

:ok = ObsEx.WebSocket.set_current_program_scene(pid, %{"sceneName" => "Main"})

ObsEx.WebSocket.subscribe(pid, fn event -> IO.inspect(event["eventType"]) end)

Testing

mix test                  # unit + mock tests, no OBS required
mix test.integration      # all tests, requires OBS running locally

See CLAUDE.md for full test options, mock patterns, and integration setup.

Protocol reference

obs-websocket protocol spec — default port 4455, JSON over WebSocket text frames.

About

OBS Websockets + Elixir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages