UnityRenderStreaming
UnityRenderStreaming copied to clipboard
[REQUEST] Control RenderStreaming Resolution and Frame Rate
It would be great to be able to control the RenderStreaming resolution and frame rate to adapt to different bandwidth conditions. I noticed CameraSteamer.cs has a streamingSize attribute to change the resolution of streaming, but it seems like this attribute is private, and therefore cannot be modified via code. There does not seem to be an attribute to control the frame rate.
I got it. Thanks for your feedback
Thank you! Is there a way to control currently the streaming frame rate? I see the streamSize variable to control the resolution but I wonder if there is any hidden variable that can help control the rate.
WebRTC package has an API to control the bitrate. https://docs.unity3d.com/Packages/[email protected]/api/Unity.WebRTC.RTCRtpSender.html#Unity_WebRTC_RTCRtpSender_SetParameters_Unity_WebRTC_RTCRtpSendParameters_
Currently, Unity Render Streaming doesn't provide the API, so users need to custom the package.
If you are still looking for information on this I made a forum post where I shared some code on how to use streamingSize and how to change video parameters (bitrate, downscale resolution, ...)
memo: URS-330
(I'm not sure if my question relates to this ticket, just let me know if I need to update it)
@karasusan Is there a way to render the camera viewport based on the size of the connected device? For example, when I connect to the webserver with my mobile phone, I want to display the video player in fullscreen, instead of 16:9 as the current camera within Unity app, the same with other devices such as desktop or tablet.
Thanks,
@teexiii Are you saying that changing size of camera viewport on the sender side according to the size of receiver?
@teexiii Are you saying that changing size of camera viewport on the sender side according to the size of receiver?
I believe it's correct @karasusan
@mrgoonie @teexiii
It might be useful but there is no plan to support that at the moment.
This user posted the same issue in this thread. https://forum.unity.com/threads/resize-videostreamtrack-and-replacetrack-framerate-drops.1145414/
The original issue relates on them. https://github.com/Unity-Technologies/UnityRenderStreaming/issues/453 https://github.com/Unity-Technologies/UnityRenderStreaming/issues/446 https://github.com/Unity-Technologies/UnityRenderStreaming/issues/611