Pixel Streaming 4.27.2 can not start Turn Server

After try some connects via the internet to my local machine (behind NAT) with UE4.27, I saw that the STUN free server is not suite for my case.
I have take some days to try to run own TURN server in the same Windows machine, here below are steps I have taken to make the TURN Server works, hope this help the person who need Pixel Streaming:

Step 1: Open port that you want the TURN server listens to:

  • Get your local IP address, type ‘ipconfig’ in CMD, look around IPv4 Address to know your local IP
  • Access to the router address, common is 192.168.1.1, give the username and password, choose Network → NAT → Input External/Internal Port → Input Local IP Address
    (ask your sysadmin if you are not familiar or don’t have privilege)

Note: I assume that you have had a port for the client browser connect to, this is about how to setup the TURN server

Step 2: Firewall Inbound/Outbound Rules: add the same port (both UDP/TCP) for the TURN server (not test TURN server work without UDP or TCP yet)

Step 3: Edit the Start_TURNServer.ps1 file:

  • Add “.\” before “$ProcessExe” in the Start_TURNServer.ps1 file, like this:
    Start-Process -FilePath .$ProcessExe -ArgumentList $Arguments -NoNewWindow
  • Change the port of the $TurnPort=“…” to your port have been opened

Step 4: Edit the Start_Common.ps1 file:

  • Find your public IP, google to get it, “my public ip” is keyword
  • Change the line $global:PublicIP = “stun.l.google.com” to $global:PublicIP = “your public ip”, example: 14.234.234.10
  • Change $global:TurnServer = $global:PublicIP + “:” to $global:TurnServer = $global:PublicIP + “:your-port” (position 1)
  • $global:TurnServer = $global:publicip + “:” to $global:TurnServer = $global:publicip + “:your-port” (position 2)

Step 5: Run TURN server

  • Run the setup.ps1 file
  • Run Start_WithTURN_SignallingServer.ps1

Step 6: Test

  • Run UE Streaming Project with command:
    yourproject.exe -PixelStreamingIP=localhost -PixelStreamingPort=8888 -AudioMixer -RenderOffScreen
  • Open a Chrome/Firefox/Safari on other internet, type your public IP (with port if not default 80)
1 Like