- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 TokBox 构建一个视频 session 应用程序。我想向用户指示流的表现如何。我注意到 OTSubscriberKitNetworkStatsDelegate
让您可以查看订阅者丢失了多少音频和视频数据包。不清楚的是,这是否表明您或他们的连接状况良好。我假设我可以使用这个委托(delegate)来查看我自己丢弃的数据包(作为发布者和订阅者)。这是计算 TokBox 某种带宽指标的方法吗?
更新:很好的答案,也很快!令人印象深刻的 OpenTok 社区。最后,OTNetworkTest 很棒,实际上使用 OTSubscriberKitNetworkStatsDelegate
来计算流的质量,正如我所怀疑的那样。它的唯一问题是它被设计为在您开始 session 之前运行。我需要一个可以作为现有 session 的一部分运行的测试;因此,我将去掉计算部分并创建一个使用您自己的订户数据的此类版本。感谢大家的帮助。
最佳答案
实际上有几种方法。
粗略但简单地计算帧的大小并将其乘以帧率(实际帧率,未指定),然后加上声音的 kbps。您应该非常准确地了解实际带宽。对于帧速率计算,请阅读 Dynamic frame rate controls
我敢打赌,一个好的用户体验解决方案不是显示一切都不好,而是调整流质量,仅在完全失败的情况下指示错误(就像 Skype 所做的那样)。看看这个:
Starting with our 2.7.0 mobile SDK release, you can start a publisher with per-determined video resolution and frames per seconds (fps). Before using the API, you should be aware of the following:
- Though HD video sounds like a good idea at first, from a practical standpoint you may run into issues with device CPU load on low to medium range devices. You may also be limited by the user’s available bandwidth. Lastly, data charges for your users could run high.
- Available on the device. The actual empirical values for these parameters will vary based on the specific device. Your selection can be seen as a maximum for the resolution and frame rate you are willing to publish.
Automatically adjusted based on various parameters like a user’s packet loss, CPU utilization, and network bandwidth/bit-rate. Rather than attempting to do this dynamically on your own, we recommend picking meaningful values and allowing OpenTok to handle the fine tuning.
Bandwidth, set your publisher video type property to “screen” instead of the default “camera” value.
取自here
所以,这是你应该做的:实现 <OTSubscriberKitNetworkStatsDelegate>
协议(protocol)第一。它有一个方法叫做 - (void)subscriber:(OTSubscriberKit *)subscriber videoNetworkStatsUpdated:(OTSubscriberKitVideoNetworkStats *)stats
如您所见,其中有一个 OTSubscriberKitVideoNetworkStats
传递给它的对象。接下来,您可以从此对象中提取三个属性:
@property (readonly) uint64_t videoPacketsLost
- 此订阅者丢失的估计视频数据包数。@property (readonly) uint64_t videoPacketsReceived
- 此订阅者收到的视频数据包数。@property (readonly) uint64_t videoBytesReceived
– 此订阅者收到的视频字节数。@property (readonly) double timestamp
– 收集这些统计数据的时间戳,自 Unix 纪元以来以毫秒为单位。因此,请随意尝试这些值(value)观并为您的应用实现最佳解决方案。
此外,他们还发表了一篇专门针对管理电话 session 不同带宽的文章。 Check it out .
当我在写答案时,@JaideepShah 提到了一个惊人的例子。通读 this example 的解释.有一张表指示我上面提到的正确值的正确分辨率。
关于ios - 我可以使用 TokBox OTSubscriberKitNetworkStatsDelegate 来计算带宽吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35803911/
USRP2 可以处理的最大带宽是多少? 最佳答案 100MS/s I & Q 下的 USRP2 A/D 样本被缩减为 25MS/s 复杂。我们使用 16 位 I & Q。 这在 USRP2 的千兆以太
使用下面的脚本来检测连接到网络的系统的互联网速度。引用javascript to detect internet speed 但是,https://fast.com/ 的速度结果和 http://ww
我需要能够使用java监视内部网络的速度。我当时想我可以使用一个包含服务器和客户端的两部分系统。我不需要响应时间(例如使用ping生成的响应时间),但不需要上载和下载时的mbps实际速度。 我的想法是
我正在使用 HttpWebRequest 调用页面并使用 HttpWebResponse 获取结果, 我的问题是如何获取或计算返回页面的总大小(以字节为单位)。此外,我还想知道我用来调用该页面的流量/
使用 Firebase,我为字段指定易于理解的名称,例如“timestamp”、“last_changed”、“message_direction”等。 字段名称是每个“行”数据交换的一部分吗? 意思
使用 Firebase,我为字段指定易于理解的名称,例如“timestamp”、“last_changed”、“message_direction”等。 字段名称是每个“行”数据交换的一部分吗? 意思
最近我接到了一项任务,要在 Nexus 7 平板电脑上开发 Android 应用程序,该应用程序将使用 wifi 通过 tcp 套接字与电脑连接。 特别是我必须将图像流(例如未压缩的 BMP)传递给平
我正在编写一个在服务器上运行的应用程序,我需要能够为每个以太网端口设置最大带宽(最多有 6 个端口)。 显然我可以限制我的应用程序使用的带宽,但我还没有找到任何关于限制计算机上实际以太网端口带宽的信息
我有一个 gRPC用 Go 编写的服务,它有很长的运行流。我想要一种方法来测量每个流的网络/带宽使用情况,并将该信息提供给 prometheus . 我找到了 grpc.StreamServerInt
我制作了一个 OpenCL 程序并使用固定内存 (CL_MEM_ALLOC_HOST_PTR) 来获得从设备到主机的更高传输速率。 传输速率按我的预期增加(使用 AMD APP Profiler 2.
有什么方法可以在 Xcode 中以编程方式检查互联网连接速度或带宽。我正在尝试这样做,因为慢速连接给某些图像上传带来了问题。 最佳答案 如果你真的需要知道,你将不得不测试它。 设置与具有低延迟的已知服
我已将大小为 876MB 的文件推送到 git lfs,这分别显示了我总共 0.9 的可用存储空间和带宽,但是,然后我做了一些更改,例如删除了旧存储库并卸载了 git lfs,因为我将图像大小从 90
关闭。这个问题需要更多focused .它目前不接受答案。 想改善这个问题吗?更新问题,使其仅关注一个问题 editing this post . 8 个月前关闭。 Improve this ques
这个问题在这里已经有了答案: How to programmatically check Internet bandwidth in VC++? (3 个答案) 关闭 8 年前。 我想在 vc++
这让我发疯,所以我想看看是否有人能给我一个线索。我有一个小型 VPS,运行 Centos 5、最新的 Apache、MySQL 和 PHP。 大约 1% 的用户报告页面加载速度非常慢,即使对于静态 H
在 Win32 中有没有什么方法可以在不实际传输任何数据的情况下以编程方式确定给定网络接口(interface)的带宽?我只想区分不同类型的接口(interface)(例如拨号 vs DSL vs L
我了解延迟 - 消息从发件人到收件人所需的时间 - 和带宽 - 在给定时间内可以传输的最大数据量 - 但我正在努力寻找合适的术语来描述相关事物: 如果协议(protocol)是基于对话的——负载在端点
我试图找到内存泄漏,我已将其归零到这部分代码,但我找不到内存泄漏的位置或如何修复它,当我让一些人调查时他们建议它与此处提到的“代码”有关: https://golang.org/src/time/ti
我正在使用 WCF 编写客户端和服务器代码,我需要知道客户端和服务器之间的“感知”流量带宽。我可以使用 ping 统计信息单独收集此信息,但我想知道是否有一种方法可以在 WCF 中配置 channel
我知道可以在对等连接上使用“setParameter”来限制上传(发送)带宽。我正在寻找一种方法来限制下载(已接收)但找不到。(我没有控制权 我错过了这个概念吗?或者有办法做到这一点? 谢谢 最佳答案
我是一名优秀的程序员,十分优秀!