我如何在多个rtsp视频流之间切换而不停止管道[无间隙流式传输] [英] How do i switch between multiple rtsp video streams without stopping pipeline [gapless streaming]

查看:90
本文介绍了我如何在多个rtsp视频流之间切换而不停止管道[无间隙流式传输]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用5个IP摄像机,每个摄像机都给了我5个RTSP流.我正在选择这些RTSP视频流中的任何一个,并将它们与我的麦克风(音频RTSP流源)混合,然后将其广播到RTMP服务器.

I'm using 5 ip cameras and each of them gives me 5 RTSP streams. I am picking any one of these RTSP video streams and I'm mixing them with my microphones (audio RTSP stream source) and broadcasting it to my RTMP server.

我试图进行无缝流传输,这意味着从摄像机切换到摄像机时不应有任何延迟.在摄像头切换到摄像头期间,服务器应该会从我的流客户端PC看到连续的流.

I trying to do gapless streaming meaning there should not be any delay when a camera to camera switch happens. The server should see a continuous stream from my streaming client PC during a camera to camera switch.

我看到管道随机崩溃,并给了我很多错误消息.知道如何解决吗?

I am seeing the pipeline is crashing randomly and giving me lots of error messages. Any idea how to solve it ?

推荐答案

使用gstreamer输入选择器元素在多个视频之间切换,使用flvmux元素将单个音频源与来自输入选择器的单个视频混合.

Use gstreamer input-selector element to switch between multiple videos and flvmux element to mix single audio source with single video coming from input-selector.

这帮助我实现了目标.使用此功能,我可以在youtube直播门户中看到连续的视频和音频流.

This helped me to achieve my goal. I can see continuous video and audio stream in youtube live broadcast portal using this.

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-input-selector.html

这是帮助我理解和编写代码的示例:

This is the example which helped me to understand and write code for it:

查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆