Capture client:
DIRECT_CONNECT
mode)Server:
DIRECT_CONNECT=true
- peer to peer, the viewers connect directly to the capture client. In this mode, no video/audio goes through the server. The server only helps to establish the connection between the peers. The capture client(s) seperately send data to each viewer(higher upload bandwidth usage on the capture client, lower latency)DIRECT_CONNECT=false
(default) - the server acts as a forwarding unit, only one connection is maintained for each active(has viewers) capture client(lower bandwidth usage, higher latency, higher server cpu usage)docker run --pull always --network host nitedani/gstreamer-go-wrtc-remote:latest
The server will be listening on :4000.
Default server config:
The server respects the host environment variables over the config file.
PORT=4000
DIRECT_CONNECT=false
STUN_SERVER_URL=stun:stun.l.google.com:19302
STUN_SERVER_USERNAME=
STUN_SERVER_PASSWORD=
TURN_SERVER_URL=
TURN_SERVER_USERNAME=
TURN_SERVER_PASSWORD=
Default capture client config.json:
{
"settings": {
"server_url": "http://localhost:4000/api",
"stream_id": "stream_test",
"private": false,
"remote_enabled": false,
"direct_connect": true,
"bitrate": 10388600,
"resolution": "1920x1080",
"framerate": 60,
"encoder": "nvenc",
"threads": 4
}
}
With the configuration above, the stream is available on: http://localhost:4000?streamId=stream_test direct_connect set on the client overrides the server setting private will hide the stream on the list streams page (/)
Requirements: same as build requirements
npm i
npm run start:dev
this command:
http://localhost:3000/stream/stream_test
The result should be similar:
Requirements:
npm i
npm run build
produces binaries and config files in /distHow to install chocolatey:
Set-ExecutionPolicy Bypass -Scope Process -Force; `
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))