LiveStreamConnectorToOBS for Virt-A-Mate
Stream any VaM camera as MJPEG over HTTP. No Spout, no NDI, no native DLLs — just a URL that any browser or OBS Browser Source can open.
A maintained fork of LiveStreamConnectorToOBS by MahiroOyama (CC BY), rebuilt around a raw TcpListener so the stream can reach other devices on your network, with an access key, a throughput toggle, and live diagnostics.
What this fork adds
Network access — bind all interfaces instead of loopback only, so a phone, tablet or second PC can view the stream. No elevation, no netsh http add urlacl.
Access key — optional shared secret required as ?key=…; anything else gets 403.
GPU downscale — stream smaller than the source camera. Every cost scales with pixel count, so this is the strongest dial available.
Threaded JPEG encoding — the encode runs on a worker thread instead of the main thread, so streaming costs a buffer copy rather than a full encode.
No cost with no viewers — capture is skipped entirely while nothing is connected.
Live diagnostics — game fps, stream fps, encode ms, re-render ms and client count, refreshed once a second, so you can see which cost dominates before changing anything.
Hardened server — enforced 4-client cap, request timeouts, bounded send buffers, so a slow viewer drops frames instead of stalling the stream.
Installation
- Download FivelSystems.LiveStreamConnectorToOBS.<n>.var from Releases.
- Drop it into your AddonPackages folder and start VaM.
- Select any atom → Plugins → Add Plugin → LiveStreamConnectorToOBS.cslist.
Usage
- Pick a source camera. Entries are labelled with their resolution and parent atom.
- Copy the URL. The OBS URL field always shows the correct URL for the current settings, including host and access key. Default http://localhost:8088/stream.
- In OBS: add a Browser Source, paste the URL, set the source Width and Height to match the plugin's, and untick Shutdown source when not visible.
Framerate
AsyncGPUReadback never stalls the GPU, but only one request is in flight at a time and each takes 2–3 frames to return, so throughput is about game fps ÷ 2–3. Raising Target FPS above that ceiling does nothing.Threaded Encode (on by default) runs the JPEG encode on a worker thread using a built-in encoder, leaving the main thread with only a buffer copy. Turning it off falls back to Unity's EncodeToJPG on the main thread, which is what the main figure will then report. The built-in encoder produces files within a few percent of Unity's at the same quality setting.
If the worker is still busy when the next frame is captured, that frame is dropped rather than queued — the stream always shows the newest frame, never a backlog.
Bandwidth and cost dials, in order of effect: Width/Height (halving to 960×540 cuts both the copy and the encode by more than half), then JPEG Quality (75 → 45 saves a great deal for little visible loss), then Target FPS.
Network access and security
Allow Network Access off (the default) binds loopback only. On, it binds every interface, making the stream reachable from other devices — a live view of your scene, served to anything that can route to the host. An inbound firewall rule for the port may also be required.Access Key: leave it empty and no key is required. Set it and every request must carry ?key=…. The generated OBS URL and the built-in viewer page both include it automatically. It is a query parameter over plain HTTP: adequate over an already-encrypted transport, readable otherwise, and it lands in browser history. Put a reverse proxy in front of the port if that matters.
At most 4 concurrent stream clients are accepted; further requests get 503.
Windows Firewall
Binding every interface is not enough on its own -- Windows still has to let the traffic in. The first time the server binds with Allow Network Access on, Windows raises a Windows Security Alert asking whether to allow VaM to communicate. Tick both Private and Public and accept. That is the whole setup, and it needs no command line.Two things commonly go wrong:
- The prompt never appears. In VR or exclusive fullscreen it opens behind the game and is easy to miss. Turn network access on once with VaM in desktop windowed mode, answer the prompt, then go back to VR.
- The network is classified Public. Windows applies a separate firewall profile per network, and a Public network is filtered far more aggressively than a Private one. A stream that works on your home Wi-Fi can fail on another network for this reason alone. Check under Settings -> Network & Internet -> your connection -> Network profile type.
Known limitations
- IPv4 only. The listener binds IPAddress.Any; clients reaching the host over IPv6 will not connect.
- -- Create New Camera -- streams black. The created camera is never rendered. Pick an existing camera instead.
- Dragging Width, Height or Port restarts the server on every frame of the drag, which drops connected clients. Set the value, then reconnect OBS.
- Streaming still costs framerate. The encode runs on a worker thread, but at a large source resolution it can still fail to keep up and will contend for CPU. Lower Width to downscale on the GPU before anything else.
Credits
- MahiroOyama — original LiveStreamConnectorToOBS (CC BY). The capture pipeline and camera scanner are theirs.
- FivelSystems — TcpListener server rewrite, network access, access key, Sync Capture, diagnostics.
- MeshedVR — the MVRScript plugin framework.
Support
If you find this useful, consider buying me a coffee.
License
CC BY 4.0, inherited from the original work. See LICENSE.Since you can now change the port in each instance, you can stream multiple cameras at the same time!