UnityRenderStreaming
UnityRenderStreaming copied to clipboard
[BUG] No setting RTCtpEncodingParameters
it's unuseful when i use 'ChangeVideoParameters' method. because the length of 'sender.GetParameters()'.
How can i set RTCRtpSendParameters?
We have similar requests so will work on it in near future. https://github.com/Unity-Technologies/UnityRenderStreaming/issues/450
thank you
If you are still trying to get this to work I made a forum post where I shared some code changes I made. Also how to use ChangeVideoParameters. The problem for me was that the parameters are not immediately available and therefore the array is empty. I just added a small delay before setting the parameters after the new sender was created and set. Something like this:
cameraStreamer.OnStartedStream += id => { StartCoroutine(HandleStreamStarted(cameraStreamer, id)); };
and
private IEnumerator HandleStreamStarted(CameraStreamer cameraStreamer, string connectionId)
{
// The parameters are not available right away so wait for them
yield return new WaitForEndOfFrame();
Debug.Log($"WebRTC stream connected: {cameraStreamer.name} has {cameraStreamer.Senders.Count} active connections");
cameraStreamer.ChangeVideoParameters(connectionId, maxBitrate, encodingFps);
}
memo: URS-330