millicast / millicast-publisher-unreal-engine-plugin

Unreal engine to stream game content to millicast platform.
Other
21 stars 13 forks source link

RP - Couldn't get capture buffer #34

Closed Neosettler closed 8 months ago

Neosettler commented 1 year ago

Having an issue where the MillicastViewportCapturer stops rendering:

LogMillicastPublisher: Error: Couldn't get capture buffer....

Cause is unknown. Very random and difficult to reproduce but on a long enough timeline, it will eventually happen.

dbaldassi commented 1 year ago

This log is related to audio capture, when the windows API fails to capture the audio buffer. Not sure why the rendering stops.

rweber89 commented 1 year ago

@Neosettler just to clarify, does this happen on a continuously running instance of the game? Or are there restarts inbetween inbetween, like multiple usage of PIE inside the editor? Clarifying the exact circumstances of when you get this to appear might be helpful.

The log message will also contain the reason why it is happening, if you could provide us with the entire message that would be great 🙏

Neosettler commented 1 year ago

just to clarify, does this happen on a continuously running instance of the game?

Yes, in a shipping build running but I've been abled to reproduce this in editor running on a long enough timeline. SV_Sunset-backup-2023.01.30-04.51.24 (2).log

rweber89 commented 1 year ago

@Neosettler thank you! I have put up a PR to fix our logging a bit. I will be in touch - I cannot promise how quickly I will get to this, as I am still getting acquainted with the project.

Once this happens, it stops rendering and never starts again?

Neosettler commented 1 year ago

the mechanic is that we have over 100s cameras and we switch from one to another by enabling which MillicastViewportCapturer writes to a unique render target 2d like so:

image

after a while, the switch has no effect and it sticks to the last camera that was last activated, any other calls to activate or deactivate has no affects. Technically, before activate a new camera we deactivate the previous camera.

rweber89 commented 1 year ago

@Neosettler quick clarification, does it still update the render target from that camera? Like if a player moves in front of it?

Because it could simply no longer be drawing to the render target, rather than still being on the last active camera, which is what I would probably expect to be happening. So you'd always see whatever was last drawn to it.

Neosettler commented 1 year ago

Still rendering, yes!