Engine:
UE 5.7
Platform:
Windows 10/11, D3D12, NVIDIA GPU, H264 NVENC
Plugin:
PixelStreaming / PixelStreaming2
Issue:
When using H264 Pixel Streaming, process commit size continuously grows.
The growth is faster when remote clients have packet loss or unstable network.
VP9 does not show the same commit growth.
Reproduction:
- Create/open a UE 5.7 project with PixelStreaming2 enabled.
- Run with H264:
-PixelStreamingEncoderCodec=H264
-PixelStreamingWebRTCMaxFps=60
-PixelStreamingEncoderMaxBitrate=30000000
-PixelStreamingWebRTCMaxBitrate=30000000
- Connect from a remote browser/client.
- Observe Windows Task Manager Commit Size or VMMap committed heap.
- Commit size keeps growing over time.
- The growth accelerates under packet loss / poor network.
Expected:
Commit size should stabilize after streaming starts.
Actual:
Commit size keeps increasing. In our case it could grow many GB within minutes.
Investigation:
UMDH/VMMap show the growth is heap commit under nvEncodeAPI64.dll.
Top stack includes:
nvEncodeAPI64.dll
FEncoderNVENC::ApplyConfig
FVideoEncoderNVENCD3D12::ApplyConfig
FVideoEncoderNVENCD3D12::SendFrame
TEpicRtcVideoEncoder::Encode
EpicRtc::Video::EncoderWebRtc::Encode
webrtc::VideoStreamEncoder::EncodeVideoFrame
We instrumented FEncoderNVENC::ApplyConfig and found WebRTC/EpicRTC frequently changes bitrate/FPS.
Each rate-only change calls nvEncReconfigureEncoder.
Workaround verified:
If FEncoderNVENC::ApplyConfig skips nvEncReconfigureEncoder when only bitrate/maxBitrate/framerate/derived VBV fields changed, commit size stops growing.
Resolution changes are still allowed to reconfigure.
Fields ignored in workaround:
averageBitRate
maxBitRate
frameRateNum
frameRateDen
vbvBufferSize
vbvInitialDelay
Engine:
UE 5.7
Platform:
Windows 10/11, D3D12, NVIDIA GPU, H264 NVENC
Plugin:
PixelStreaming / PixelStreaming2
Issue:
When using H264 Pixel Streaming, process commit size continuously grows.
The growth is faster when remote clients have packet loss or unstable network.
VP9 does not show the same commit growth.
Reproduction:
-PixelStreamingEncoderCodec=H264
-PixelStreamingWebRTCMaxFps=60
-PixelStreamingEncoderMaxBitrate=30000000
-PixelStreamingWebRTCMaxBitrate=30000000
Expected:
Commit size should stabilize after streaming starts.
Actual:
Commit size keeps increasing. In our case it could grow many GB within minutes.
Investigation:
UMDH/VMMap show the growth is heap commit under nvEncodeAPI64.dll.
Top stack includes:
nvEncodeAPI64.dll
FEncoderNVENC::ApplyConfig
FVideoEncoderNVENCD3D12::ApplyConfig
FVideoEncoderNVENCD3D12::SendFrame
TEpicRtcVideoEncoder::Encode
EpicRtc::Video::EncoderWebRtc::Encode
webrtc::VideoStreamEncoder::EncodeVideoFrame
We instrumented FEncoderNVENC::ApplyConfig and found WebRTC/EpicRTC frequently changes bitrate/FPS.
Each rate-only change calls nvEncReconfigureEncoder.
Workaround verified:
If FEncoderNVENC::ApplyConfig skips nvEncReconfigureEncoder when only bitrate/maxBitrate/framerate/derived VBV fields changed, commit size stops growing.
Resolution changes are still allowed to reconfigure.
Fields ignored in workaround:
averageBitRate
maxBitRate
frameRateNum
frameRateDen
vbvBufferSize
vbvInitialDelay