UnityRenderStreaming
UnityRenderStreaming copied to clipboard
[REQUEST]: Encode on a separate thread?
Is your feature request related to a problem?
Hi, when using either software or hardware encoding; It seems that the in-game frame rate is limited by the successful encoding frame rate.
Can we have the encoding done on a separate thread so the main thread is free to have as high of a frame rate as it likes?
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response
+1
We discussed about the same issues here. https://github.com/Unity-Technologies/com.unity.webrtc/issues/632#issuecomment-1110478225
We are going to support controlling framerate for the next milestone.
memo: WRS-229
We discussed about the same issues here. Unity-Technologies/com.unity.webrtc#632 (comment)
We are going to support controlling framerate for the next milestone.
Having the frame rate controlled by another variable is a different thing than it being encoded on a separate thread no?
+1 De-/Encoding video on its own thread would be absolutely essential for this type of application if this is not already the case.
@ZeoWorks In the next version of WebRTC package, the encoding process runs on the worker thread, not rendering thread. There was one more problem with that, the encoding framerate is limited by the in-game framerate.
@karasusan may you please share a link to the file where the encoding process takes place?
@rocco-haro The encoding process is implemented in the native code. https://github.com/Unity-Technologies/com.unity.webrtc/tree/develop/Plugin~/
@karasusan thanks, but that link leads to a 404 page.
~
Link seems broken, you need to include ~ at the end of it.
We already merged the fix which updates the dependencies of WebRTC package, so you can test the encoder on a separated thread and check the performance. https://github.com/Unity-Technologies/UnityRenderStreaming/pull/683