Scenario:
We are using Pixel Streaming plugin from Unreal Engine to stream the game and interact with the player via browser. This plugin comes embedded inside the game to stream the video output in a specific port and listen for control inputs from the player. At the same time, pixel provides an additional software that serves as a web server and runs as signaligin server which allows the WebRTC connection between the game and the player’s browser.
This works ok, and has been tested in different setups as: windows server, windows 10 pro, dedicated servers and shared virtual instances, and with different GPU’s like RTX 3090, GTX 1660 super, GTX 1060 and Titan.
Problem:
We noticed that in all our different setups, with small hardware specs and even powerful dedicated servers (64GRAM, 2x RTX 3090) we are able to execute the game-pixel several times but up to only 3 instances, more than that will crash the game. Again: always only 3 instances no matter the hardware specs.
If we run the game but we do not connect with its stream, we can run a lot more than that, we were able to execute up to 25 instances with no issues and I estimate we could run 50 more easily, our hardware is powerful enough to accommodate this number.
Same with the signaling server, I can run multiple instances of the signaling server with no issues and I’m sure we could accommodate hundreds of those signaling servers since it is not resource intensive.
The problem comes when we combine them both game + signaling server. There is where we can have only up to 3 instances running.
The error:
Assertion Failed: Result == NV_ENC_SUCCESS. Which points to the NVVideoEncoder.cpp
An encoding problem with Nvidia and Unreal.
To reproduce the problem:
Following the instructions given in the official website of pixel streaming, but doing it in a way to have it multiple times in the same PC. Such as just assigning different ports per instance. We also pass the argument: -RenderOffScreen to make the game run headless.
In our setup we are using ports like:
- 7001 (pixel streaming port) and in the signaling connected to the game (web port 8001)
- 7002 (pixel streaming port) and in the signaling connected to the game (web port 8002)
- 7003 (pixel streaming port) and in the signaling connected to the game (web port 8003)
- Etc…
Expected behaviour:
Theoretically it should not be a problem to run limitless number instances except those imposed by hardware resources. If it is possible to accommodate 3 instances, why not more? The reason for this error remains unclear for us.