当前位置:网站首页>How to deal with the situation of repeated streaming and chaotic live broadcast in easydss?

How to deal with the situation of repeated streaming and chaotic live broadcast in easydss?

2022-06-23 21:52:00 Tsingsee green rhino video

Our common video stream access protocols include RTSP agreement 、RTMP agreement 、GB28181 There are three kinds of agreements , For these three kinds of agreements ,TSINGSEE Qingxi video has developed different video solutions , among EasyDSS It supports streaming protocol RTMP Access platform , It's different from other platforms in that EasyDSS It can support live video and on demand at the same time .

Of course we do EasyDSS It can also be customized according to the needs of the project , Many projects have used customized versions of EasyDSS. In a custom version ,EasyDSS There will be repeated push flow , Show the chaos of live broadcast .

In this article, we will talk about how to deal with this problem in the project , You can try it by yourself according to the method in this article .

First of all, let's talk about the problem of repeated streaming , This needs to be modified mediaserver/tsingsee.ini Inside repeat_push_enable=false, This parameter is used to turn off the function of allowing repeated streaming :

Then add a judgment at the place where the flow is pushed for protection , Because the user's version is pushed directly by the kernel flv flow , Therefore, before streaming, query whether there is a stream in the kernel , If there is a stream pushing, it will not be pushed again .

Then let's look at the chaotic state of the live broadcast , The live broadcast status displayed on the virtual live broadcast page switches frequently in multiple states :

Look up the code and find that the place where the state is modified in the program is very messy , Therefore, the logic of modifying the state is optimized , And write a public function to modify the State , Before modification, the kernel state will be queried for judgment , Modify the live broadcast status in the database through the status of the kernel :

原网站

版权声明
本文为[Tsingsee green rhino video]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/12/202112201847241588.html