Video streaming 如何使用GStreamer转发RTP流?

Video streaming 如何使用GStreamer转发RTP流?,video-streaming,gstreamer,Video Streaming,Gstreamer,在我的局域网中,我有一个IP摄像头和两台电脑。我可以录制和播放每台电脑的流媒体数据 例如,要记录流数据,请执行以下操作: gst-launch-0.10 rtspsrc location=rtsp://192.168.100.50/live.sdp latency=0 ! decodebin ! ffmpegcolorspace ! ffenc_mpeg4 ! avimux ! filesink location=sample.avi 要玩: gst-launch-0.10 playbin u

在我的局域网中,我有一个IP摄像头和两台电脑。我可以录制和播放每台电脑的流媒体数据

例如,要记录流数据,请执行以下操作:

gst-launch-0.10 rtspsrc location=rtsp://192.168.100.50/live.sdp latency=0 ! decodebin ! ffmpegcolorspace ! ffenc_mpeg4 ! avimux ! filesink location=sample.avi
要玩:

gst-launch-0.10 playbin uri=rtsp://192.168.100.50/live.sdp
现在,我希望PC1根据PC2的要求接收和转发流数据


GStreamer是否可以这样做?如果是,PC1和PC2需要什么命令?

问题解决了

位于PC1的管道:

gst-launch-0.10 rtspsrc location=rtsp://192.168.100.50/live.sdp latency=0 ! decodebin ! ffenc_mpeg4 ! udpsink host=192.168.100.95 port=51234
PC2的IP地址:192.168.100.95

位于PC2的管道:

gst-launch-0.10 udpsrc port=51234 ! decodebin ! ffmpegcolorspace ! autovideosink

不需要解码和编码就可以直接转发。。从而节省了处理时间


rtspsrc位置=rtsp://192.168.1.160:60661/test 延迟=0!rtph264depay!rtph264pay name=pay0 pt=96

我尝试此操作时出现以下错误。--------------------------------------------------------------错误:来自元素/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc2:内部数据流错误。其他调试信息:gstbasesrc.c(2948):gst_base_src_loop():/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc2:流任务暂停,原因未链接(-1)执行结束