当前位置:网站首页>EasyGBS网络不稳定情况下重复请求视频拉流问题的优化
EasyGBS网络不稳定情况下重复请求视频拉流问题的优化
2022-07-01 18:44:00 【EasyGBS】
EasyGBS是基于国标GB28181协议的视频云服务平台,支持将国标协议的设备统一接入并进行集中管理。平台具备优秀的视频能力,包括视频监控直播、录像、云存储、回放、平台级联、语音对讲、智能告警等功能,在线下场景中已有大量落地应用。
我们在项目测试中发现,EasyGBS通过web页面请求拉流时,在网络不稳定的情况下,用户多次点击播放,会造成后端重复拉流的情况,消耗了设备的流量。此类操作会产生一定的流量费用,尤其是在流量较为敏感的项目中,造成了不必要的花费。因此针对上述情况,我们进行了代码优化。
在网络不稳定的情况下,用户有可能点击多次,导致多次传给后端,后端则会同时多次请求invite,导致这个设备有两路推流,因此设备持续发流,消耗了设备流量,如下图:
解决方法:在请求拉流的方法中,加入锁来控制每个设备同时只能进行一次invite。代码如下:
这样一来,就不会造成设备的重复拉流了。
在视频能力上,EasyGBS可将GB/T28181设备/平台推送的PS流转成ES流,并提供RTSP、RTMP、FLV、HLS、WebRTC等多种格式视频流的分发服务,实现Web浏览器、手机浏览器、微信端、PC客户端等各终端无插件播放。平台基于云边端架构优势,已经在大量的线下场景中应用,包括明厨亮灶、雪亮工程、平安乡村等等。感兴趣的用户可以前去演示平台进行体验或部署测试。
边栏推荐
- Summary of cases of players' disconnection and reconnection in Huawei online battle service
- Shell array
- Specification of lumiprobe reactive dye indocyanine green
- ECS summer money saving secret, this time @ old users come and take it away
- Superoptimag superconducting magnet system - SOM, Som2 series
- Dom4j parsing XML, XPath retrieving XML
- Getting started with kubernetes command (namespaces, pods)
- Go language self-study series | go language data type
- Nacos configuration file publishing failed, please check whether the parameters are correct solution
- Solidity - truncated and checked modes of arithmetic operations - new features of 0.8.0
猜你喜欢
6月刊 | AntDB数据库参与编写《数据库发展研究报告》 亮相信创产业榜单
Lake shore M91 fast hall measuring instrument
论文阅读【Discriminative Latent Semantic Graph for Video Captioning】
Junit单元测试框架详解
pickle.load报错【AttributeError: Can‘t get attribute ‘Vocabulary‘ on <module ‘__main__‘】
Enabling "new Chinese enterprises", SAP process automation landing in China
机械设备行业数字化供应链集采平台解决方案:优化资源配置,实现降本增效
Witness the times! "The future of Renji collaboration has come" 2022 Hongji ecological partnership conference opens live broadcast reservation
【pytorch记录】自动混合精度训练 torch.cuda.amp
论文阅读【Learning to Discretely Compose Reasoning Module Networks for Video Captioning】
随机推荐
Solidity - contract structure - error - ^0.8.4 NEW
Extensive reading of the paper [film: visual reasoning with a general condition layer]
Learning notes - steps of JDBC connection database operation
Lake Shore—OptiMag 超导磁体系统 — OM 系列
Dlib+opencv library for fatigue detection
ETL development of data warehouse (IV)
Solution of intelligent supply chain management platform in aquatic industry: support the digitalization of enterprise supply chain and improve enterprise management efficiency
The intelligent epidemic prevention system provides safety guarantee for the resumption of work and production at the construction site
XML语法、约束
Implement a Prometheus exporter
Huawei game failed to initialize init with error code 907135000
pickle.load报错【AttributeError: Can‘t get attribute ‘Vocabulary‘ on <module ‘__main__‘】
Redis 实现限流的三种方式
Go language self-study series | go language data type
The difference between indexof and includes
前4A高管搞代运营,拿下一个IPO
Lumiprobe 活性染料丨吲哚菁绿说明书
【Go ~ 0到1 】 第四天 6月30 defer,结构体,方法
学习笔记【gumbel softmax】
ECS summer money saving secret, this time @ old users come and take it away