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 install
in the root directory. - Run
java -jar obs-controller-api-0.0.1-SNAPSHOT.jar
in thetarget
directory. - 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
POST
requests tohttp://localhost:8080/obs/connect
with 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
POST
request tohttp://localhost:8080/obs/authenticate
with 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
POST
request tohttp://localhost:8080/obs/startRecording
with the following required parameters to start recording:ipAddress
: The ipAdresse of the Websocket Server.port
: The port of the Websocket Server.
- Send a
POST
request tohttp://localhost:8080/obs/stopRecording
with the following required parameters to stop recording:ipAddress
: The ipAdresse of the Websocket Server.port
: The port of the Websocket Server.
- Send a
POST
request tohttp://localhost:8080/obs/disconnect
with 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.