GStreamer Launch RTSP Server for ReStreaming IP Camera H264

耗尽温柔 提交于 2019-12-11 05:18:38

问题


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.

Here is a test command line:

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

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

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

Any help is welcome.


回答1:


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

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



回答2:


To re-stream h.264 video from IP camera, below is the Gstreamer pipeline (this works for me)

rtspsrc location=rtsp://IP_CAMERA_URL ! rtph264depay ! video/x-h264, stream-format=byte-stream ! h264parse ! rtph264pay ! application/x-rtp,media=video,encoding-name=H264,payload=96 ! yoursink

On gst-launch-1.0 --version ---> gst-launch-1.0 version 1.14.5 GStreamer 1.14.5



来源:https://stackoverflow.com/questions/44131009/gstreamer-launch-rtsp-server-for-restreaming-ip-camera-h264

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!