https://github.com/xaionaro-go/obs-grpc-proxy
A gRPC proxy to forward requests to OBS WebSocket
https://github.com/xaionaro-go/obs-grpc-proxy
go golang grpc obs proxy websocket
Last synced: 5 months ago
JSON representation
A gRPC proxy to forward requests to OBS WebSocket
- Host: GitHub
- URL: https://github.com/xaionaro-go/obs-grpc-proxy
- Owner: xaionaro-go
- License: cc0-1.0
- Created: 2024-07-13T16:08:20.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-18T16:21:35.000Z (over 1 year ago)
- Last Synced: 2025-06-25T19:41:10.225Z (12 months ago)
- Topics: go, golang, grpc, obs, proxy, websocket
- Language: Go
- Homepage:
- Size: 510 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About
In [`cmd/obsgrpcproxy`](./cmd/obsgrpcproxy/) a [gRPC](https://grpc.io/) proxy for [OBS WebSocket server](https://obsproject.com/kb/remote-control-guide) is provided.

# Motivation
I was experimenting with making a mobile application for IRL streaming. The app communicates with the backend server via gRPC. But at the same time the app needs full access to controlling OBS. So I made this separate proxy to OBS which I can attach to the same gRPC port as the rest of the backend functionality.
# Quick start
One terminal:
```sh
go install github.com/xaionaro-go/obs-grpc-proxy/cmd/obsgrpcproxy@latest
"$(go env GOPATH | awk -F : '{print $1}')"/bin/obsgrpcproxy --obs-password
```
Another terminal (to test if the proxy works):
```sh
go install github.com/xaionaro-go/obs-grpc-proxy/cmd/obsgrpccli@latest
"$(go env GOPATH | awk -F : '{print $1}')"/bin/obsgrpccli --method-name GetStats --request-data '{}'
```
An example (of testing if the proxy works):
```
xaionaro@void:~/go/src/github.com/xaionaro-go/obs-grpc-proxy$ go run ./cmd/obsgrpccli/ --method-name GetStats --request-data '{}'
{
"memoryUsage": 695,
"availableDiskSpace": 296551,
"activeFps": 30,
"averageFrameRenderTime": 1,
"renderSkippedFrames": 280,
"renderTotalFrames": 10508211,
"webSocketSessionIncomingMessages": 2,
"webSocketSessionOutgoingMessages": 2
}
```