Open koko-DL opened 11 months ago
Hi, is there any update on this issue?
Hi @koko-DL,
Thanks for sending your test scene - I see you're sleeping the main thread for 3 seconds which in turn blocks any new frames being rendered/sent to the video encoder, but as Unity's audio is on another thread it is still amassing samples. Then when the main thread unblocks the mismatched data is causing the low-level video encoder to massively stall to attempt to re-sync.
We're looking at a possible solution that may avoid the stalls in this scenario but fundamentally blocking the main thread is unadvised (yielding, coroutines etc.. are better).
Cheers,
Hi, thank you for your reply.
In the sample project, I sleep in the main thread to simulate the condition that reproduces the issue. However, in our real project, it only occurs when switching scenes. Additionally, we are using coroutines with yield instructions to prevent main thread blocks.
Our project is intended to run on a console for several days, so freezing is a critical problem. It would be acceptable for us if the stalls and memory leaks can be resolved, even if the recording result is not satisfactory in this condition.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug Program freezes (or drop at less than 0.03FPS) when using dual monitor and audio capture when recording. (Also, it seams memory leak is happenning)
Your Setup (please complete the following information):
To Reproduce Steps to reproduce the behavior:
Logs N/A
Screenshots N/A
Videos N/A