-
Generate a self signed root certificate using the instructions in /hack/tls
-
Copy
hack/svc/config.sample.yaml
tohack/svc/config.yaml
-
Create a user profile
$ cd /workspaces/strims $ go run ./cmd/svc add-profile -config ./hack/svc/config.yaml -username dev -password secret 2022/06/01 13:48:18 74880235203461122 2022/06/01 13:48:18 DnLta2pK2GlRLHTobM2jKecX/XNqD4OGDjwWSOs0o7s=
-
Copy the id and auth key into
config.yaml
insession/headless
like so:headless: - id: 74880235203461122 key: DnLta2pK2GlRLHTobM2jKecX/XNqD4OGDjwWSOs0o7s=
-
Run
svc
with live reloading using npm$ npm run dev:svc
Take note of the path from the line
ws vnic listener starting
- you'll need it to connect to the headless service from the ui.2022-06-01T13:54:33.545Z DEBUG vnic/ws_native.go:43 ws vnic listener starting {"path": "/0408549bb2971e6051c11c1caafbbd2b0f88b6937d0bf608f6d1a2d4c237a0f8"}
-
Run the webpack dev server
$ npm run dev:web
on Windows depending on the directory permissions this may throw an error, if this happens execute the command from the error message then retry the run command.
Error: Command failed: git rev-parse HEAD ...
$ git config --global --add safe.directory /workspaces/strims
-
In the web ui at
https://0.0.0.0:8080
clicknew login
and enter the username and password you used in theadd-profile
command. -
Toggle the advanced
advanced
options and enterwss://0.0.0.0:8083/api
or the IP of your dev machine or localhost.on Windows, this address might have to be set as be
wss://localhost:8083/api
.
-
Create a network
-
In video ingress, toggle
enable
and clicksave changes
-
Click
channels
at the bottom of the ingress form -
Enter a title for your stream, select your network from the dropdown, and click
create channel
.on Windows, the RTMP address for this channel ingress should be
rtmp://0.0.0.0:1935/live
-
In the channels table click the menu icon to the right of the ingress url and click
copy stream key
-
In OBS stream settings, choose
Custom...
from the service dropdown. Enterrtmp://0.0.0.0:1935/live
for the server and paste the stream key you copied from the channel list.on Windows, this address should be
rtmp://127.0.0.1:1935/live
-
In OBS output settings set the keyframe interval to 1 and the bitrate to 6000kbps
-
Close OBS settings and click
start streaming
-
Click the strims icon to exit settings and click the network gem in the left nav. click the stream thumbnail in the network directory to watch the stream.
This stream is looped back through the headless service's frontend api. Continue to connect a remote peer and watch the stream via p2p.
-
In the web ui while logged into your headless server open the networks list in settings.
-
In the networks table click the menu icon to the right of the certificate expiry and choose
create invite
. -
In the invite form click
create invite
-
Create or log into a browser profile in the web ui.
-
From the
add network
menu in the networks list in settings chooseadd invite code
, paste the invite code, and clickjoin network
-
In bootstrap settings create a bootstrap client using the path from the headless service log earlier eg
wss://0.0.0.0:8083/0408549bb2971e6051c11c1caafbbd2b0f88b6937d0bf608f6d1a2d4c237a0f8
-
Find the stream thumbnail in the network directory