datachannel has a great latency
See original GitHub issueMy Code
https://github.com/tsonglew/aiortc-datachannel-delay
run python main.py to start the server, then visit localhost:8080 with a web browser
My Problem
I’m trying to process the video frames from video track, and send back the result with datachannel.
the result is replaced with time.time() in the above demo repo as following:
self.channel.send(
json.dumps({"now": time.time() * 1000})
)
the <client receive from datachannel time> - <datachennl.send() time> is considered as delay, and are console.loged with code:
ch.addEventListener("message", function (evt) {
console.log(Date.now() - JSON.parse(evt.data).now);
});
the datachannel config is {ordered: false, maxRetransmits: 0}
Output
as illustrated in the sreenshot, the delay is growing, but video and audio are fluent.
How can I get rid of the growing delay? Thx
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
python aiortc datachannel has a great latency - Stack Overflow
I'm trying to process the video frames from video track, and send back the result with datachannel. the result is replaced with time.time()...
Read more >Massive drop in data channel throughput when increasing ...
Does anyone know why SCTP data channel performance incurs a significant ... Seems like Firefox handles latency slightly by sending more data per...
Read more >Higher latency on WebRTC DataChannels than Chrome
Visit a WebRTC DataChannel powered game here: ... Expected results: Run the same example in Chrome and the host latency is 0-2ms. The...
Read more >Performance Evaluation of WebRTC Data Channels - Tuhat
Abstract—This paper covers a study on WebRTC data channel ... conditions and especially latency is not close to perfect. Changing.
Read more >Data Communication | WebRTC for the Curious
A data channel is datagram based, and each has its own durability settings. ... Large lower-priority user messages will not delay the sending...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

as a workaround, I altered my datachannel sending code like this
Could above be implemented as a option when creating a data channel?