【问题标题】:How to stream an mp4 filesrc to a rtspsink using GStreamer 0.10如何使用 GStreamer 0.10 将 mp4 filesrc 流式传输到 rtspsink
【发布时间】:2019-10-20 19:53:38
【问题描述】:

我必须使用 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 流进行流式传输?

【问题讨论】:

标签: gstreamer gstreamer-0.10


【解决方案1】:

以下是对我有用的步骤:

sudo apt-get install libgstrtspserver-1.0 libgstreamer1.0-dev

wgethttps://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c

gcc test-launch.c -o test-launch $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-rtsp-server-1.0)

./test-launch "filesrc location=<full-path-to-your-mp4-video-file>!qtdemux!队列!h264parse!rtph264pay name=pay0 pt=96"

在客户端机器上,为了测试,我运行 ffplay 或 VLC Player:

ffplay rtsp://<your-server-ip>:8554/test

【讨论】:

    【解决方案2】:

    要获取 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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-06-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-02
      • 1970-01-01
      相关资源
      最近更新 更多