com.unity.webrtc icon indicating copy to clipboard operation
com.unity.webrtc copied to clipboard

[BUG] RTCDataChannel bandwidth caps based on ping

Open ZeoWorks opened this issue 3 years ago • 10 comments

Hello, It appears that sending byte[] RTCDataChannel seems to hard cap based on ping. For instance, I have 40mbps download to an instance that has a ping of 119ms when transmitting video.

However, when sending data through RTCDataChannel, it locks at around 10mbps. Any thoughts as to why this is? How would we resolve the issue?

ZeoWorks avatar Oct 21 '21 23:10 ZeoWorks

@ZeoWorks Hi, I would like to know how you tested for checking this issue.

karasusan avatar Oct 22 '21 00:10 karasusan

Thanks, I'm simply sending 110kb worth of data every frame (void update) using channel.Send(byte[]). I have a suspicion it's to do with fragmentation, does this webRTC package automatically fragment packages? Thanks again.

ZeoWorks avatar Oct 22 '21 13:10 ZeoWorks

@ZeoWorks I read the article and the problem might be complex. https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Using_data_channels#understanding_message_size_limits

karasusan avatar Oct 23 '21 03:10 karasusan

InitProperty might be changed the limitation. https://stackoverflow.com/questions/40129119/what-is-the-upload-bandwidth-limit-over-webrtc-data-channels

karasusan avatar Dec 21 '21 06:12 karasusan

memo: WRS-192

karasusan avatar Dec 21 '21 06:12 karasusan

Any update on this?

qleguennec avatar Jan 18 '23 19:01 qleguennec

@qleguennec Sorry but there is no progress. I would like to know what kind of issues you have about this.

karasusan avatar Jan 20 '23 01:01 karasusan

Hello @karasusan , my use case is sending unity game frames to chrome through a webrtc data channel. The issue is when I increase the size of the data being sent through channel.Send(), the channel closes in unity, but stays open in chrome, without any error message in either side. Any idea why? It seems related to @ZeoWorks issue.

edit: need to mention, this is only localhost

qleguennec avatar Jan 20 '23 14:01 qleguennec

@qleguennec Thanks for your reply. How large is the data to send? I will check the issue the next milestone.

karasusan avatar Jan 23 '23 07:01 karasusan

@karasusan It could be as large as 1366 * 768 * 4 bytes, but ideally we'll switch to 1600 * 900 * 4.

qleguennec avatar Jan 23 '23 07:01 qleguennec