首页 > 解决方案 > 如何使用 GStreamer 0.10 将 mp4 filesrc 流式传输到 rtspsink

问题描述

我必须使用 gstreamer 0.10 并尝试流式传输 mp4 文件。

为此我尝试了

gst-launch-0.10 文件rc location=./test.mp4 !qtdemux !队列 !h264解析!视频/x-h264,映射=/流!udpsink rtsp://192.168.192.100:12345/test

并收到警告:警告:错误管道:没有元素“h264parse”

如何将文件流式传输为 rtsp 流?

标签: gstreamergstreamer-0.10

解决方案


要获取 h264parse 插件,请运行“sudo apt install gstreamer1.0-plugins-bad”

管道

发件人

gst-launch-1.0 filesrc 位置= ~/file.mp4 !qtdemux !队列 !h264解析!rtph264pay 配置间隔=10 !udpsink 主机=ip_address_to_stream_to 端口=9999 -v

接收者

gst-launch-1.0 udpsrc port=9999 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, payload=(int)96, encoding-name=(string)H264" !rtph264depay!身份沉默=0!avdec_h264 !视频转换!ximagesink


推荐阅读