From 8a852c013733d0170ac80a761e6b9414c02a2078 Mon Sep 17 00:00:00 2001 From: yum Date: Tue, 14 Oct 2025 13:36:14 -0700 Subject: switch to HLS, works better --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 9c21585..d84fb76 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,19 @@ -Shitty service to proxy data from OBS into a low-latency MPEG-DASH stream VRChat understands. +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:///live` and the pre-shared key stored in `STREAM_PSK`. -2. Start the Python service (see `etc/systemd/system/obsproxy.service` for a sample unit). -3. When the service starts it prints a session-specific manifest URL like `https:///dash//manifest.mpd`; share that exact URL with your VRChat video player. Multiple viewers can consume the feed concurrently. +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:///hls//stream.m3u8`; share that exact URL with your VRChat video player. Multiple viewers can consume the feed concurrently. Environmental knobs: -- `STREAM_PSK`: required PSK for the single ingest client. -- `DASH_SEGMENT_TIME` / `DASH_FRAGMENT_TIME`: tweak DASH segment/fragment durations to balance latency vs resilience. +- `OBS_STREAM_KEY` / `STREAM_PSK`: required PSK for the single ingest client. +- `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`). +- `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 DASH fragments under `/live/`. The manifest and segments are only exposed under `/dash//`, making it infeasible to guess a live session path. +The server seeds a fresh 128-bit session ID on every restart and writes HLS artifacts under `/live/`. The playlist and segments are only exposed under `/hls//`, making it infeasible to guess a live session path. -- cgit v1.2.3