GStreamer启动RTSP服务器以重播IP摄像机H264 [英] GStreamer Launch RTSP Server for ReStreaming IP Camera H264

查看:779
本文介绍了GStreamer启动RTSP服务器以重播IP摄像机H264的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将在不同的计算机上使用多个客户端,以便能够查看IP摄像机流URL的视频.由于Ip摄像机在连接的客户端数量上有限制,因此我想为此设置一个拖缆.我用不同的命令行选项搜索并尝试了GStreamer,但没有成功.

I am going to use multiple clients on different computers to be able to view video of an IP Camera stream url. Because the Ip camera has limitations on the number of connected clients, I want to setup a streamer for this purpose. I googled and tried GStreamer with different command line options but not yet successful.

这是一个测试命令行:

gst-launch-1.0 rtspsrc location ="rtsp://root:root@192.168.1.1/axis-media/media.amp?videocodec = h264& resolution = 320x240& fps = 10& compression = 50" 等待时间= 10! rtph264depay! h264parse! tcpserversink host = 127.0.0.1 port = 5100 -e

gst-launch-1.0 rtspsrc location="rtsp://root:root@192.168.1.1/axis-media/media.amp?videocodec=h264&resolution=320x240&fps=10&compression=50" latency=10 ! rtph264depay ! h264parse ! tcpserversink host=127.0.0.1 port=5100 -e

但是当我想用vlc对其进行测试时,没有任何反应.与SDP有关吗? gstreamer可以从源流式处理sdp吗?

But when I want to test it with vlc, nothing is played. Is it related to SDP? Does gstreamer can restream sdp from source?

找到正确的命令行后,我想将其集成到c#应用程序中以自动执行此过程.

After finding the correct command line, I want to integrate it into a c# application to automate this process.

欢迎任何帮助.

推荐答案

您需要 gst-rtsp -服务器.要使用它,您必须编写小型C/C ++应用程序-

You need gst-rtsp-server. And to use it you have to write small C/C++ application - example here

更新:如果您的rtsp源提供了h264视频流,则可以使用以下管道重新传输视频,而无需进行转码:

upd: If your rtsp source provide h264 video stream you could use following pipeline to restream it without transcoding:

rtspsrc location=rtsp://example.com ! rtph264depay ! h264parse ! rtph264pay name=pay0 pt=96

这篇关于GStreamer启动RTSP服务器以重播IP摄像机H264的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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