blob: b2e6aeb4ffc8a32f1831fc21c4bf2db335b860b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
Shitty service to proxy data from OBS into an HTTP Live Streaming (HLS) feed VRChat understands.
## Usage
1. Configure OBS with a custom server pointing at `rtmp://<your-domain>/live` and the pre-shared key stored in `STREAM_PSK`.
2. Install runtime dependencies: `pip install -r opt/obsproxy/requirements.txt`.
3. Start the Python service (see `etc/systemd/system/obsproxy.service` for a sample unit). The bundled entrypoint now runs under [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/) so you get a production-grade WSGI server out of the box.
4. When the service starts it prints a session-specific playlist URL like `https://<your-domain>/hls/<session-hex>/stream.m3u8`; share that exact URL with your VRChat video player. Multiple viewers can consume the feed concurrently.
Environmental knobs:
- `OBS_STREAM_KEY` / `STREAM_PSK`: required PSK for the single ingest client.
- `INGEST_THREAD_QUEUE_SIZE`: RTMP demux queue depth before frames are dropped (defaults to `4096`).
- `HLS_SEGMENT_TIME`: length (in seconds) of the `.ts` segments emitted by FFmpeg (defaults to `2`).
- `HLS_PLAYLIST_SIZE`: number of segments retained in the rolling playlist (defaults to `6`).
- `HLS_DELETE_THRESHOLD`: additional historical HLS segments to keep on disk before pruning (defaults to `2`).
- `HOST`: interface Waitress binds to (defaults to `0.0.0.0`).
- `PORT`: TCP port Waitress listens on (defaults to `5000`).
- `FFMPEG_LOGLEVEL`: override the log verbosity passed to FFmpeg (defaults to `info`).
The server seeds a fresh 128-bit session ID on every restart and writes HLS artifacts under `<STREAM_DIR>/live/<session-hex>`. The playlist and segments are only exposed under `/hls/<session-hex>/`, making it infeasible to guess a live session path.
|