Video Stream Test Setups - xrchisense/xrevent-broadcaster-unity GitHub Wiki

Test Setup Short Description Status
Local WebRTC Setup with Unreal Media Server This local media server is easy to setup for a one-to-many broadcasting architecture and good for learning about various protocols as the server has a simple GUI and is free or charge. It is useful for learning about WebRTC signaling the practical way. complete
Local WebRTC Setup with Unity WebRTC and Unity RenderStreaming
Local/Remote WebRTC Setup with OBS Studio WebRTC The Service seems to be discontinued, but this example shows OBS might be an option for video ingest for the artist. We could create a branded OBS version and distribute it for video source nodes. halted
Toms RTMP/HLS Server

LiveKit (PION)

Install React Client Development Toolchain

  1. Git clone https://github.com/livekit/livekit-react#development-setup
  2. Open project in VS Code
  3. Install yarn, for Windows e.g. using npm install -global yarn
  4. Switch to the project folder and yarn install

Local WebRTC Setup with WSL Ubuntu and Janus

As most of the WebRTC development is Linux cendtic, WSL is useful to get Ubuntu onto a Win10 or above PC. For Janus development this toolchain might be useful.

Prerequisites

  • Win10 or above

Setting up Ubuntu on Win10

  1. Open Win-Terminal in Admin Mode and type wsl --install to install WSL and Ubuntu.
  2. Restart and open Ubuntu. Ubuntu will ask you for User and Password to enter when you open it for the first time.
  3. Upgrade Ubuntu using sudo apt update && sudo apt upgrade
  4. Check your home directory in Ubuntu with explorer.exe .
  5. Follow: https://learn.microsoft.com/de-de/windows/wsl/setup/environment

Install Janus

  1. Install GCC sudo apt install build-essential
  2. Install OpenSSL sudo apt-get install libssl-dev
  3. Build libsrtp from source:
    wget https://github.com/cisco/libsrtp/archive/refs/tags/v2.4.2.tar.gz
    tar xfv v2.4.2.tar.gz
    cd libsrtp-2.4.2
    ./configure --prefix=/usr --enable-openssl
    make shared_library && sudo make install
  4. Follow https://www.arabicprogrammer.com/article/69642491441/
  5. Install Meson sudo apt-get install meson
  6. Dont forget the prefix when installing the libnice. meson build --prefix=/usr
    ninja -C build
    sudo ninja -C build install

Configure Janus

  1. Fire up Janus: /opt/janus/bin/janus
  2. Check http://172.31.156.43:8088/
  3. Check http://172.31.156.43:8188/

Setup FFMPEG and Webserver

  1. Follow https://www.saboit.de/blog/low-latency-rtp-stream-delivery

Local WebRTC Setup with Unity WebRTC and Unity RenderStreaming

Prerequisites

  • Unity
  • VS Code

Preparations

  1. Install Unity WebRTC preview package.
  2. Install Unity Render Streaming Package

Node signaling server

Android build

Quest 2 build

Browser-to-Unity streaming

Making changes to a Unity Package

  1. For development you might want to change a packages code. In Unity this is not possible for packages imported from the Unity registry.
  2. The easiest way to modify code anyway is to import the package as usually and move the created package folder from 'Libraries/../..' over to a different destination of your hard disk.
  3. Then import the package from this local destination from your harddrive.
  4. Now you can modify the scripts.

Local/Remote WebRTC Setup with OBS Studio WebRTC

There is a WebRTC enabled Verision of OBS Studio available.

Preparations

  1. Download OBS Studio WebRTC

Local WebRTC Setup with Unreal Media Server

The Unreal Media Server allows you to test WebRTC locally without the need for a webserver installation, any headache about NAT or https problems. It may be used for client WebRTC development on a local machine first and than expand to remote later.

Preparations

  1. Download Unreal Media Server.
  2. Download the SDK as it contains the 'WebRTC_Publisher' for capturing video and the 'WebRTC_Player' for playing it in a browser.

Setting up the Server

  1. 'Open Unreal Media Server Configuration' application.
  2. Create a 'New live broadcast ...' by clicking right mouse button on 'Live broadcasts'.
  3. Select 'Rebroadcast live RTMP / RTSP / WebRTC ...' and click OK.
  4. Insert a 'Live broadcast Alias' and remember it, as it ist the alias used to connect to this server thread.
  5. Select 'webrtc' protocol and provide a password.
  6. (Optional) Deselect 'Multicast delivery'.
  7. Click 'OK' and the 'live broadcast' server will start.
  8. (Hint!) The server might start on an network adapter you might not want. To be sure to slect the right network adapter select 'File > Properties' and select the appropriate 'Network Interface'. Also note the used ports. They neend no change.

Connecting the WebRTC Publisher

  1. Copy '\Unreal Streaming Technologies SDK v14.0\WebRTC_Publisher' from the 'UMediaSDK.zip' to a directory of your choice.
  2. Open the 'WebRTC_Publisher/publish.html' webpage.
  3. Enter 'Alias', 'Password' and 'IP Address'.
  4. Select 'TCP' and H.264 codec.
  5. Click 'Apply' and 'Publish'. This should show 'Publishing in progress ...' below the buttons. Also the 'Live Encoder Connections' are shown in the Server window in the correspondent tab.

Show video with WebRTC Player

  1. Copy '\Unreal Streaming Technologies SDK v14.0\WebRTC_Player' from the 'UMediaSDK.zip' to a directory of your choice.
  2. Open the 'WebRTC_Player/play.html' with an editor and change 'Alias', 'IP Address' and 'Protocol' in the function 'UnrealWebRTCPlayer()' to your settings.
  3. Save the file and open it with your Browser.
  4. The Live Broadcast should show.

Windows 7 Firewall

  1. You may need to modify Firewall settings on your Windows machine so that the WebRTC Player can connect the Unreal Media Server. This might only apply for Win7.
  2. Open 'Windows Firewall mit erweiterter Sicherheit'.
  3. Right click on 'Eingehende Regel' and select 'Neue Regel ...'
  4. Select 'Port' and 'weiter'.
  5. Enter the ports and protocols you are using for the server. Usually 5119 (Signaling Server) and 5135 (Port for the streaming media). You can look up the ports you are using in File > Properties ... in the Unreal Mediaserver Application.
  6. Do the same fo the 'Ausgehende Regeln'.
  7. The connection should work now.

Debugging in Firefox

  1. Use the 'Network Analyzer' (Shortcut STRG + SHIFT + i) to check the SDP negotiation process.
  2. Use 'about:webrtc' to see the WebRTC debug protocol.

Display WebRTC_Player with Oculus 2 Browser

  1. Copy '\Unreal Streaming Technologies SDK v14.0\WebRTC_Player' from the 'UMediaSDK.zip' to the download folder of your Oculus 2 by using the USB or other means.
  2. To acces the 'play.html' file and display the player open the browser and enter file:///sdcard/ . This will give you a file list in the browser.
  3. Navigate to the 'play.html' and play.
  4. The video should play now.
  5. (Hint!) Don't forget to edit the 'play.html' with your appropriate settings. See step 18. above.

Toms RTMP/HLS Server

Input:
rtmp://173.212.192.241:1935/show/streamkey
oder in OBS: rtmp://173.212.192.241:1935/show und streamkey in extra Feld.

Output:
https://vmd22715.contaboserver.net:8080/live/\_streamkey\_/index.m3u8