【问题标题】:Playing H264 stream from a local socket with gstreamer使用 gstreamer 从本地套接字播放 H264 流
【发布时间】:2011-02-06 14:20:23
【问题描述】:

我遇到了使用 gstreamer 播放 H.264 流的问题(该流来自没有 RTSP 的 RTP 数据包)。我的应用程序将数据发送到本地套接字,我希望 gstreamer 播放此流。你知道我怎么能做到这一点,或者我可以开始阅读这个的任何链接吗? 我想我也需要提供一些关于这个流的信息。我真的不知道该提供什么。这也有任何链接吗? 我可以使用命令行管道完成所有这些操作,还是需要使用 gstreamer 编写一个小应用程序来完成此任务? 感谢您提供任何信息!

【问题讨论】:

    标签: video h.264 gstreamer rtp


    【解决方案1】:

    试试这个脚本

    #! /bin/bash
    gst-launch -v                 \
      udpsrc                      \
        multicast-group=127.0.0.1 \
        port=${PORT}              \
        caps="application/x-rtp   \
             ,media=video         \
             ,clock-rate=90000    \
             ,encoding-name=H264" \
      ! gstrtpjitterbuffer        \
      ! rtph264depay              \
      ! ffdec_h264                \
      ! xvimagesink
    
    • udpsrc 监听 ${PORT} 上的 UDP 数据包
    • rtph264depay 从 RTP 包中获取 H.264 数据
    • ffdec_h264 解码 H.264 流

    【讨论】:

      【解决方案2】:

      试试这个

      gst-launch -v rtspsrc location="rtsp://<user>:<password>@localhost/folder/media.amp" debug=1 ! rtpmp4vdepay ! mpeg4videoparse ! ffdec_mpeg4 ! ffmpegcolorspace! autovideosink
      

      根据您的要求更改位置属性。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-04-25
        • 1970-01-01
        • 2011-06-13
        • 2023-04-01
        • 2016-08-01
        • 1970-01-01
        • 2023-01-17
        • 2021-12-28
        相关资源
        最近更新 更多