Streaming User Guide
Initial Setup
These setup/configuration steps need to be performed on both the Server and Viewer prior to any connection attempts. Currently the server only runs on Windows. The Linux version has been mothballed.
Server:
Determine Server IP Address
Some of the steps below require the server’s IP address. This depends on the network configuration of the server and client:
If the server and client are running on the same machine, then use
127.0.0.1instead oflocalhost.If both machines are running on the same LAN, then the server’s LAN IP address can be used (probably starting with
192.).If the client will be accessing the server from another network, then the server’s public IP, or external IP, address will be used.
OpenSpace Software
Checkout the
feature/streamingbranch of OpenSpace (Clone with--recurse-submodules). In addition, verify that the sgct submodule within OpenSpace (apps/OpenSpace/ext/sgct) is using thethesis/2022/streamingbranch (or at the correct commit to match).Configure and generate the OpenSpace project in CMake with the
SGCT_GSTREAMER_SUPPORTcheckbox enabledBuild OpenSpace (Preferably using RelWithDebInfo configuration).
Edit
openspace.cfgAdd the viewer(s) IP-address(es) to ModuleConfigurations > Server > AllowAddresses.
Make sure that ModuleConfiguration > Server > Interfaces > Type = “WebSocket” > DefaultAccess is set to
Allow.
Enable developer mode for the front-end GUI
Go to data/assets/customization/gui.asset and change the
webguiDevelopmentModeflag totrue.(Optional) Go to data/assets/util/webgui.asset to see how the ports and routes are setup.
OpenSpace-WebGuiFrontend Software
Install Node.js and npm if necessary.
Checkout the
feature/streaming-2024branch of OpenSpace-WebGuiFrontend.In
src/api/Environment.js, setwsAddressto the server IP address discussed above.In
environment.js, also setwsAddressto the server IP address.In
WebRTCStreaming.jsxset thesignalingServerto the server IP address.Verify that the GStreamer pipeline (
pipelineDescription) ingstreamerWebRTC.hlooks good for your use case.Setup the developer frontend GUI
Open a terminal, go to
OpenSpace-WebGuiFrontendRun
npm installwhen running first time, ensure that there are no errors. You can add the--legacy-peer-depsoption if there are dependency problems.
Setup the signaling server
Open another terminal, go to
OpenSpace-WebGuiFrontend/src/signalingserverRun
npm installwhen running first time.
Viewer:
Use a Chromium based browser (e.g. Google Chrome, Opera, Microsoft Edge)
The Chrome browser won’t trust the source of the video streaming if it comes from a non-secure server (plain http rather than https). If the server does not have an SSL certificate, go to
chrome://flagsand add the server’s IP-address and port under the “Insecure origins treated as secure”-section. An address entered here should look likehttp://192.168.1.39:4690. Note that this step is not necessary if running both the Server and Viewer on the same machine using127.0.0.1.
Starting a Remote Viewing Session
Do all of the following steps in one sequence, starting with the Server.
Server:
Start the developer frontend GUI in a terminal at
OpenSpace-WebGuiFrontend- Runnpm startto start frontend GUI (no need to restart if already running)Start the signaling server in a terminal at
OpenSpace-WebGuiFrontend/src/signalingserver- Runnode signalingserverto start the serverStart OpenSpace - Run OpenSpace.exe, and select the
remote_gstreamer_outputconfig option in theWindow Optionspopup menu - If desired, you can use a direct command to bypass the launcher:bin\RelWithDebInfo\OpenSpace.exe -c config\remote_gstreamer_output.json -b
Viewer:
In a browser, open the URL for the frontend GUI, which should look like:
192.168.x.xx:4690/frontend/#/streaming(bookmark this for convenience)In the GUI, open the streaming menu (icon of a computer with an arrow on it), and click “Join session”
After a few seconds, the video feed should appear in the GUI, and you should be able to control the camera view with the mouse in the browser window.
If there is a problem, refresh the browser and Join the session again. It won’t be necessary to restart the other components.