【问题标题】:Playing mpeg2ts with Gstreamer-1.0 on Raspberry Pi在 Raspberry Pi 上使用 Gstreamer-1.0 播放 mpeg2ts
【发布时间】:2014-02-04 15:47:45
【问题描述】:

各位程序员,大家好, 我正在尝试直接在 RPi 上使用 gstreamer 播放 .ts 文件。 Gstreamer-1.0 和 gst-omx 已成功安装,此示例管道运行起来就像一个魅力: gst-launch-1.0 -v filesrc location=h264_720p_hp_5.1_6mbps_ac3_planet.mp4 ! qtdemux ! h264parse ! omxh264dec ! autovideosink

它实际上甚至可以使用gst-launch-1.0 playbin uri=file:/root/h264_720p_hp_5.1_6mbps_ac3_planet.mp4

但是,如果我尝试使用 playbin 播放 .ts 文件,它实际上会运行它,但帧速率非常低,这使得这种方法无法使用。

如果我尝试构建类似于上面显示的自定义管道,我会遇到“tsparse”显然与“omxmpeg2videodec”不兼容的问题。

这是我运行的:

gst-launch-1.0 -v filesrc location=parkrun1920_12mbps.ts ! tsdemux ! tsparse ! omxmpeg2videodec ! autovideosink

输出此错误:

erroneous pipeline: could not link mpegtsparse2-0 to omxmpeg2videodec-omxmpeg2videodec0

有人知道如何让 gstreamer 流畅地播放 mpeg2-ts 文件吗?

我的目标是在同一个 RPi 上播放 mumudvb 提供的 http 单播 mpeg2-ts 流。

感谢您的帮助,我们将不胜感激!

编辑:omxplayer 播放 .ts 文件非常流畅,所以我认为我的问题与硬件或文件无关。

【问题讨论】:

    标签: raspberry-pi gstreamer hardware-acceleration mpeg-2 dvb


    【解决方案1】:

    问题是我使用了 tsparse。对流进行解复用后,它不再是 TS 文件,因此必须使用 mpegvideoparse 或类似的解析器元素。

    【讨论】:

      【解决方案2】:

      我正在使用这样的方式在 Ubuntu 中播放 ts。 gst-launch-1.0 汤httpsrc location=http://xxx.xxx.x.xx/location/test.ts ! tsdemux 名称=d d.video_0324 !队列 ! h264解析! avdec_h264 !视频转换!视频缩放! ximagesink。

      仅供参考,如果 playbin 工作正常,您可以通过设置 GST_DEBUG_DUMP_DOT_DIR var 来生成 xdot grapfile。然后分析 xdot 并找到解决方案。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-03-06
        • 1970-01-01
        • 1970-01-01
        • 2015-07-10
        • 2013-05-26
        • 2017-01-23
        • 1970-01-01
        • 2017-07-18
        相关资源
        最近更新 更多