This is an API for controlling OBS Studio via HTTP requests. It is written in Java with Spring Boot and uses the obs-websocket plugin for OBS studio.
- Clone this repository.
- Run
mvn clean installin the root directory. - Run
java -jar obs-controller-api-0.0.1-SNAPSHOT.jarin thetargetdirectory. - The API is now running on port 8080.
- You can access Documentation via Swagger UI at
http://localhost:8080/docs.html.
- Start OBS Studio.
- Enable the Websocket Server in OBS Studio.
- Copy the ipAdresse, port and password of the Websocket Server.
- Send
POSTrequests tohttp://localhost:8080/obs/connectwith the following required parameters to connect to the Websocket Server:ipAddress: The ipAdresse of the Websocket Server.port: The port of the Websocket Server.password: The password of the Websocket Server.
- Send a
POSTrequest tohttp://localhost:8080/obs/authenticatewith the following required parameters to authenticate to the Websocket Server:ipAddress: The ipAdresse of the Websocket Server.port: The port of the Websocket Server.
- Send a
POSTrequest tohttp://localhost:8080/obs/startRecordingwith the following required parameters to start recording:ipAddress: The ipAdresse of the Websocket Server.port: The port of the Websocket Server.
- Send a
POSTrequest tohttp://localhost:8080/obs/stopRecordingwith the following required parameters to stop recording:ipAddress: The ipAdresse of the Websocket Server.port: The port of the Websocket Server.
- Send a
POSTrequest tohttp://localhost:8080/obs/disconnectwith the following required parameters to disconnect from the Websocket Server:ipAddress: The ipAdresse of the Websocket Server.port: The port of the Websocket Server.
This section lists the available API endpoints for the OBS integration service. Each endpoint is a POST request and
requires specific parameters as part of the query string.
-
Connect to OBS
POST /obs/connect- Parameters:
ipAddress,port,password - Example:
POST http://localhost:8080/obs/connect?ipAddress=<ipAddress>&port=<port>&password=<password>
- Parameters:
-
Authenticate with OBS
POST /obs/authenticate- Parameters:
ipAddress,port - Example:
POST http://localhost:8080/obs/authenticate?ipAddress=<ipAddress>&port=<port>
- Parameters:
-
Disconnect from OBS
POST /obs/disconnect- Parameters:
ipAddress,port - Example:
POST http://localhost:8080/obs/disconnect?ipAddress=<ipAddress>&port=<port>
- Parameters:
-
Reconnect to OBS
POST /obs/reconnect- Parameters:
ipAddress,port - Example:
POST http://localhost:8080/obs/reconnect?ipAddress=<ipAddress>&port=<port>
- Parameters:
- Start Recording
POST /obs/startRecording- Parameters:
ipAddress,port - Example:
POST http://localhost:8080/obs/startRecording?ipAddress=<ipAddress>&port=<port>
- Parameters:
- Start Recording to All clients
- `POST /obs/startRecordingToAllClients
- Example:
POST http://localhost:8080/obs/startRecordingAll
- Example:
- `POST /obs/startRecordingToAllClients
- Stop Recording
POST /obs/stopRecording- Parameters:
ipAddress,port - Example:
POST http://localhost:8080/obs/stopRecording?ipAddress=<ipAddress>&port=<port>
- Parameters:
- Stop Recording to All clients
- `POST /obs/stopRecordingToAllClients
- Example:
POST http://localhost:8080/obs/stopRecordingAll
- Example:
- `POST /obs/stopRecordingToAllClients
- Connected Clients
GET /obs/ipAddresses- Example:
GET http://localhost:8080/obs/ipAddresses
- Example:
- Number of Connected Clients
GET /obs/count- Example:
GET http://localhost:8080/obs/count
- Example:
- Test connection to a client
GET /obs/testConnection- Parameters:
ipAddress,port - Example:
GET http://localhost:8080/obs/testConnection?ipAddress=<ipAddress>&port=<port>
- Parameters:
This project is licensed under the MIT License - see the LICENSE file for details.


