Pixel streaming setres not resizing correctly in ue 5 preview 1

There is a problem in ue5 preview 1 pixel streaming when you want to resize the videostream with…

let descriptor = {
        command: 'r.' + 'SetRes ' + width + 'x' + height
    };
    emitUIInteraction(descriptor);

Error cases (the different error cases depends on differnt resolutions, e.g. 700x400 or 1280x720 or 400x800):

  1. The video resize only gets updated when reloading the html site. Only after reloading the new resolution is taken over.
  2. 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
  3. 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:

A:
PixelStreaming.Capturer.UseBackBufferSize false
PixelStreaming.WebRTC.DisableResolutionChange true

B:
PixelStreaming.Capturer.UseBackBufferSize true
PixelStreaming.WebRTC.DisableResolutionChange false

C:
PixelStreaming.Capturer.UseBackBufferSize true
PixelStreaming.WebRTC.DisableResolutionChange true

D:
PixelStreaming.Capturer.UseBackBufferSize false
PixelStreaming.WebRTC.DisableResolutionChange false

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.

Me, too. I can not test Pixel Streaming with UE5 PV2.

1 Like

Same problem here with the resizing. One weird thing: If another player joins the stream it resizes correctly once for all players.

This command appears to have been removed from the Pixel Streaming source in 5.0.2.

It seems all these commands have been removed compared to 4.27.2:

PixelStreaming.WebRTC.DisableResolutionChange
PixelStreaming.Capturer.CaptureSize
PixelStreaming.Capturer.UseBackBufferSize

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.

Seems we really hit a bit of a wall here.

@voltaire585: You can find the files you need in:
\Epic Games\UE_5.0\Samples\PixelStreaming\WebServers\SignallingWebServer

There are 3 possible routes to solve this headache:

  1. 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.
  2. 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.
  3. 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.

Fun detail: In the UE5-0 release notes it says:

* Removed the following unused console variables from Pixel Streaming:
  * PixelStreamingUseBackBufferCaptureSize
  * PixelStreamingCaptureSize
  * PixelStreamingWebRTCDisableResolutionChange
  * PixelStreamingMaxNumBackBuffers

Ha, unused…

This sounds like the best way on paper… but I have no idea how to approach it yet.

Hey guys!

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.

Hey, thanks for the information. Do you know when will this update be released, 5.0.3 or 5.1 ?

BTW the repo https://github.com/EpicGames/PixelStreamingInfrastructure either does not exist or not accessible.

Since 5.0.3 is a hot-fix release, I would say it’s going to be available only in 5.1…

Ah my apologies!

The repo will be made public very soon, keep an eye out!
It’ll be the go to source for Pixel Streaming updates.

And what about the public release, when can we expect to get the fix?