Files
UnrealEngineUWP/Samples/PixelStreaming/WebServers/SignallingWebServer/platform_scripts/cmd/setup.ps1
William Belcher 24ba7c4cc9 Merge /UE5/Dev-Tensorworks to /UE5/Main. This includes:
Refactor player sessions
Fix PixelStreamingAudioComponent had delayed audio.
Fix audio bitrate from Unreal Engine to browser was set to a low default causing compressed audio quality in stream. The new default is now Opus maximum value of 510kb/s.
Fix the Selective Forwarding Unit (SFU) not being added to the Pixel Streaming samples folder for a packaged project
Fix default max bitrate not being high enough to support 4k.
Fix reconnections not autoplaying in the browser.
Add datachannel support to SFU.
Add WebRTC c++ client behaviour to pixel streaming system. This is used for developing unit tests.
Add a unit test that will start streaming, connect a client and check that a data channel message can be sent.
Add the ability for a user to start/stop streaming as needed through the use of PixelStreaming.StartStreaming and PixelStreaming.StopStreaming
Add the ability for the stream resolution to be changed at runtime

Notes: AVEncoder no longer stores a width and height; These properties have been moved to the FVideoEncoderInput. This input is now the source of truth and both AMF and NVENC will adapt their resolution to the input resolution.

#rb luke.bermingham
#fyi mattias.jansson, nick.pace, matthew.cotton, aidan.possemiers, sandor.hadas
#preflight 6204c7aba65a8a28464df03c
#jira none

[CL 18948482 by William Belcher in ue5-main branch]
2022-02-10 21:16:24 -05:00

98 lines
3.4 KiB
PowerShell

# Copyright Epic Games, Inc. All Rights Reserved.
# Unclear if we need this?
# Set-ExecutionPolicy Bypass -Scope Process -Force
# Versions are from current working release versions
#
# Structure for installation preparation; please note | in "how to install" -> installer will split the command
# Need install Package name Version min/any how to get version how to install path to be added
$Packages = @(@("y", "chocolatey", "0.11.3", "min", "choco --version", "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | choco upgrade chocolatey"),
@("y", "node", "v17.0.1","min", "node --version", "choco install nodejs -y -x -f"),
@("y", "npm", "8.1.2", "min", "npm --version", "npm install -g npm -f")
)
# Install npm packages at the correct place
Push-Location $PSScriptRoot\..\..\
# Check what to install
foreach ($Item in $Packages) {
Write-Host "Checking for " $Item[1].padRight(12) " ..." -NoNewLine
if ($Item[3] -eq "any") {
Write-Host " any version ... " -NoNewLine
$IsInstalled = Get-Command $Item[4] -ErrorAction SilentlyContinue
if ($IsInstalled -eq $null) {
Write-Host " not found marked for installation"
} else {
Write-Host " found no install needed"
$Item[0] = "n"
}
} elseif ($item[3] -eq "min") {
Write-Host " minimum version: " $Item[2].padRight(12) -NoNewLine
$Wanted = $Item[2] -replace "[^0-9.]"
$Installed = Invoke-Expression -Command $Item[4] 2>&1
if ($Installed -eq $null) {
Write-Host " not found an installed version" $Item[4]
} else {
Write-Host " found version: " $Installed.padRight(15) -NoNewLine
$Current = $Installed -replace "[^0-9.]"
if ([System.Version]$Current -lt [System.Version]$Wanted) {
Write-Host "old marked for installation"
} else {
$item[0] = "n"
Write-Host "no install needed"
}
}
} else {
Write-Host "Code error, please check Packages setup for " $Item[1]
exit
}
}
# Do the installation
foreach ($Item in $Packages) {
if ($Item[0] -eq "n") {
continue;
}
if ($Item[5].Substring(0, 1) -eq ":") {
Write-Host "Will not install " $Item[1] " because " $Item[5]
} else {
$HasPipe = $Item[5].indexOf("|")
if ($HasPipe) {
$Arr = $Item[5].Split("|");
foreach($InstallExe in $Arr) {
$InstallExe = $InstallExe.trim()
Invoke-Expression $InstallExe
}
} else {
Invoke-Expression -Command $Item[5]
}
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
}
}
# Install Cirrus
npm install
# Reverse ..\.. location
Pop-Location
# Put us in the cmd scripts folder
Push-Location $PSScriptRoot
# Install CoTURN
Write-Host "Checking for Coturn..." -NoNewLine
if (-not(Test-Path -Path coturn/turnserver.exe -PathType Leaf)) {
Write-Host " ...installing... " -NoNewLine
Invoke-WebRequest -Uri https://github.com/mcottontensor/coturn/releases/download/v4.5.2-windows/turnserver.zip -OutFile ./turnserver.zip
Expand-Archive -Path ./turnserver.zip -DestinationPath ./coturn
Remove-Item -Path ./turnserver.zip
Write-Host " ...done. "
}
else {
Write-Host " ...found."
}
# Reverse location
Pop-Location