PixelStreaming Memory Leak in 5.7+

When running PixelStreaming2 plugin and using h264 as the encoder, the application begins to leak and eventually crashes. This has been reported several times for past versions, but we didn’t experience this on 5.6, we started experiencing it after upgrading to 5.7 and I’ve tested the very latest on github ue5-main and it still has this issue, so I believe there’s been a regression of some kind. We have switched encoders but want to get back to h264 because it’s hardware encoded rather than software, and not all devices support AV1 still. Is anyone else dealing with this?

1 Like

You should seperate PixelStreaming S.S and APP .

I use 5.6 and PixelStreaming2 plugin. After running a UE project for an extended period, I encountered the following error: LogPixelCapture: Error: Failed to obtain a produce buffer. Have you ever encountered this issue before? How do you fix it?

Hi there!

This memory leak is unfortunately a result of the recent Nvidia drivers.
However, there is a workaround that will prevent the issue in the meantime.
You can:
Use AVCodecs.NvEnc.D3D12UsesCUDA=trueas a launch arg for your project.
or
Add D3D12UsesCUDA=1 to the AVCodecs.NvEnc section of your DefaultGame.ini

There should be a fix for this in the near future, but this should help prevent any issues in the mean time.