简体   繁体   English

有没有办法从RTCPeerConnection获取WebRTC流的吞吐量或延迟?

[英]Is there a way to get the throughput or latency of a WebRTC stream from a RTCPeerConnection?

I want to calculate either the latency or throughput of a receiving stream for WebRTC. 我想计算WebRTC接收流的延迟或吞吐量。 I know there is the getStats() but I can't seem to find an easy way of doing it. 我知道有getStats()但是我似乎找不到简单的方法。 Any ideas? 有任何想法吗?

https://webrtc.github.io/samples/src/content/peerconnection/bandwidth/ gives an example of how to use the getStats API to measure the bitrate of a video stream. https://webrtc.github.io/samples/src/content/peerconnection/bandwidth/提供了有关如何使用getStats API来测量视频流比特率的示例。 The general pattern is to call getStats twice in a time interval and divide the difference in the counts by the time difference. 通常的模式是在一个时间间隔内两次调用getStats,然后将计数差除以时间差。

https://webrtc.github.io/samples/src/content/peerconnection/constraints/ shows a more complete list of what statistics are available. https://webrtc.github.io/samples/src/content/peerconnection/constraints/显示了可用统计信息的更完整列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WebRTC RTCPeerConnection未建立 - WebRTC RTCPeerConnection not established 如何清除RTCPeerConnection(WebRTC)? - How to clear RTCPeerConnection (WebRTC)? webRTC - JavaScript getUserMedia 和 RTCPeerConnection 客户端:与 Zoom 相比,在大约 5-10 分钟问题后感知吞吐量延迟和崩溃 - webRTC - JavaScript getUserMedia and RTCPeerConnection client: perceived throughput delay and crash after about 5-10 minutes issue vs Zoom WebRTC RTCPeerConnection 有时无法连接 - WebRTC RTCPeerConnection sometimes fails to connect WebRTC - 删除/减少共享视频流的设备之间的延迟? - WebRTC - remove/reduce latency between devices that are sharing their videos stream? 获取 webrtc stream 的实际播放时间 - Get actual playtime of webrtc stream 如何获得从客户端到服务器的单程旅行的延迟时间 - How to get the latency time for a one way trip from client to server WebRTC-'RTCPeerConnection':无法添加ICE候选对象 - WebRTC - 'RTCPeerConnection': The ICE candidate could not be added WebRTC Firefox:RTCPeerConnection.setLocalDescription没有足够的参数 - WebRTC Firefox: Not enough arguments to RTCPeerConnection.setLocalDescription 有没有办法在没有 WebRTC 的情况下从客户端 A -> 服务器 -> 客户端 B 的 stream 视频进行一对多广播? - Is there a way to stream video from client A -> server -> client B for one-to-many broadcast without WebRTC?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM