Error cases (the different error cases depends on differnt resolutions, e.g. 700x400 or 1280x720 or 400x800):
The video resize only gets updated when reloading the html site. Only after reloading the new resolution is taken over.
Sometimes the videosize is not resized at all and after reloading the html site the webrtc connection hangs here “WebRTC data channel connected… waiting for video” and no video is shown
Sometimes when the resolution is changed the new video resolution preserves the old video width and height so that the new video will be stretched to fill the old video container size
I tried many combinations of the following blueprint “Execute Console Commands” before setting the new resolution command:
But the result of these different combinations is that sometimes some new video resolutions will work but others not and it is not predictibale which combitation to use for which resolution.
Does somebody know how to set new resolutions correctly with the right blueprint commands? Is this a bug in the new version of UE5 Preview 1? Are there any solutions out there?
The Unreal 5 EA version used an older pixel streaming version and there were no problems with the video resizing so you can change via “r.setres wxh” console command and the videostream gets immediatly updated/resized without any issues.
With Unreal 4.27.2 version the video gets also correctly resized with this command set on event begin play:
PixelStreaming.WebRTC.DisableResolutionChange false
Not an answer to your question, but i where are the Pixel Streaming files in UE5 P2? There is no Engine\Source\Programs\PixelStreaming\WebServers\SignallingWebServer folder or files.
Logging in again (or with another player) re-initializes the video stream and it resizes to the last resolution that was set… But of course that doesn’t really solve the issue.
There are 3 possible routes to solve this headache:
When client requests for a resolution change, send a freeze frame which the client can display as a static image, client disconnects and reconnect, automatically restart the video. A potential problem here is that browsers generally block video autoplay if audio is present.
Somehow adjust the video output from the streamer. It seems quite difficult. In 4.27 there is a Capturer, which you can call a method to change the capture resolution. This class and the capture context has been removed in 5.0, thus there is no comparable solutions.
Create new video track with the correct resolution, make client switch to the new track, and finally destroy the old track. I have not checked how viable this it.
This issue has come up a few times in the forum, I’d like to share the answer we’ve posted elsewhere to help clarify the issue!
So the lack of stream resolution changing in Pixel Streaming in UE 5.0 - 5.0.3 is a known regression. With the changes needed to fix the issue, it couldn’t quite make it into the hot-fix release, much to our chagrin.
Good news however, is that it is already fixed in the ue5-main branch on Github!
Sorry for the inconvenience, but know that we’re aware and tackling these issues.