Closed slnh312 closed 4 years ago
As stated by the error message, you need XRandR support installed. Make sure you have the relevant packages installed for your Linux distribution (e.g. for Ubuntu this would be libxrandr2 and x11-xserver-utils.)
thks a lot , but I still cannot start the PixelStreaming plug-in as you did in the video of “Pixel Streaming in Linux containers”. What should I do? I cannot find the executable files in Linux in the corresponding directory. All the files are similar to the .bat or .exe files in Windows.
what's more,I ran the command you recommended me for ue4-sample - project and the result was as follows, as if it was stuck?
Oops, it looks like I forgot to add the WebRTCProxy
target to the list that gets built when creating an Installed Build of the Engine. I've added that now in commit f713064, so in theory you should just need to rebuild the container image and the required files should be there. I'll perform a rebuild myself tomorrow to confirm that this is the case.
Don't SignalingWebServers need to be added to the list?
I used the latest version to rebuild, but an error was reported:
The signalling and matchmaking webservers are already present under Engine/Source/Programs/PixelStreaming/WebServers
, so no modifications are required in order to include them.
That's very strange, for some reason my modifications to WebRTC.Build.cs
weren't included in my initial commit, which is what's causing that error. I've re-added the changes in commit 7907a0e and double checked to make sure that nothing else is missing, so hopefully everything should build nicely now. I've restarted my build, so I'll have confirmation of that in a little while.
I rebuilt on Ubuntu 18.04(not in container), referring to the official build guide(https://wiki.unrealengine.com/Building_On_Linux). After the build, I did not find any difference than before. The files in the /UnrealEngine/Engine/Source/Programs/PixelStreaming/WebRTCProxy/bin directory are the same as those before the build, and there is no executable file of the Linux version.
My own rebuild of the container images based on the latest commit has now completed, and I can confirm that the WebRTCProxy
binary is indeed present:
ue4@2a6b15db6c23:~/UnrealEngine/Engine/Source/Programs/PixelStreaming/WebRTCProxy/bin$ ls -lsa
total 78428
4 drwxr-xr-x 2 ue4 ue4 4096 Mar 12 07:55 .
4 drwxr-xr-x 3 ue4 ue4 4096 Mar 12 07:55 ..
15064 -rwxr-xr-x 1 ue4 ue4 15421896 Mar 12 07:34 WebRTCProxy
57600 -rw-r--r-- 1 ue4 ue4 58978632 Mar 12 07:34 WebRTCProxy.debug
5756 -rw-r--r-- 1 ue4 ue4 5890051 Mar 12 07:34 WebRTCProxy.sym
Thank you. Is the build result in Docker different from that in Linux host? What are the differences in the build processes in the two environments? my rebuild of the container is running,I will check it after the build is over.
The build results should be exactly the same on the host system as they are in a container, so long as you run the same command to create the Installed Build of the Engine.
I built an image today using the latest version, and it doesn't work properly in the container. The attachment is the error log. Please help me to find out which part is the problem.following is my command in a container:
ue4@732300dcf4d0:~/UnrealEngine/Engine/Binaries/Linux$ DISPLAY='' ./UE4Editor -opengl4 -nosplash
following is the log: UE4_running1.log
I can't see any mention of your GPU or its OpenGL feature support in that output, which suggests that you're attempting to run the Editor inside a container without GPU acceleration enabled using the NVIDIA Container Toolkit. If so, crashing on RHI initialisation is the expected behaviour.
I am very sorry that I have missed the ue4-runtime build process,now rebuild it including the ue4-runtime,but a new error happens:
I'd suggest taking a look at the Cloud Rendering page of the Unreal Containers documentation, since I suspect that you're not running the container with the correct parameters to enable GPU acceleration.
Hi,Adam,I have rebuilt the UE4 project,and I ran a container with the new image,it shows as follow,but looks like it's stuck. In fact, I run the nvidia-smi command from the host to check the GPU usage. It is found that the process that uses the GPU contains the container instance.
Shipping builds of UE4 projects don't produce much log output, so it's very likely that it's actually running perfectly fine and just not printing any output. At this point you can start the WebRTCProxy
application and the signalling server and attempt to connect to the UE4 application via a web browser. For this to work correctly, you'll need to either run all three processes in a single container (or a Kubernetes pod), or else run three containers all with --network=host
so that they can communicate with one another over the loopback address.
Adam, I have successfully run the pixel streaming demo in the container. Thank you for your patience and guidance. I have several questions to ask you:
Awesome, I'm glad you finally managed to get it working nicely. Regarding your questions:
The only way of limiting the GPU memory consumption that I'm aware of is by setting the rendering resolution, which will in turn control the framebuffer size. You can set the rendering resolution using command-line flags when running the packaged project (e.g. -ResX=1920 -ResY=1080
) or by invoking the setres
command from an Execute Console Command blueprint node in your level blueprint (e.g. r.setres 1920x1080w
).
Take a look at Epic's Hosting and Networking Guide for details on using STUN/TURN servers. The Linux versions of the reference servers mentioned on that page are under the bin
directory in the WebRTC SDK tarfile for 4.23 and are named stunserver
and turnserver
.
I'm going to close this issue now that you've got everything working.
dear adam, After entering the container, switch to user root as user ue4. What is the password of user root?
The root user doesn't have a password set, which is most likely why you're unable to switch to that user using su
. If you want to run commands with root priveleges then you'll either need to do so using a RUN
directive in your Dockerfile, or else configure the container image with a root user password or an /etc/sudoers
file.
Note that general questions regarding the use of the ue4-runtime
image should be posted as issues on the ue4-runtime repository rather than this repository, which is only for asking questions about Pixel Streaming for Linux.
Hi,adam,I'm sorry to bother you again.I have tried your suggestion and I run the sample project: https://github.com/adamrehn/ue4-sample-project ,but it happens as follow, [2020.03.10-11.25.06:271][ 0]LogInit: Warning: Could not initialize SDL: XRandR support is required but not available [2020.03.10-11.25.06:271][ 0]LogInit: Error: FLinuxApplication::CreateLinuxApplication() : InitSDL() failed, cannot create application instance.