在Raspberry Pi上用Gstreamer-1.0播放mpeg2ts

时间:2013-10-19 13:29:45

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

美好的一天同事们, 我正在尝试使用gstreamer直接在RPi上播放.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 unicast mpeg2-ts流。

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

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

2 个答案:

答案 0 :(得分:2)

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

答案 1 :(得分:1)

我正在使用这样在Ubuntu中玩ts。 gst-launch-1.0 souphttpsrc location = http://xxx.xxx.x.xx/location/test.ts! tsdemux name = d d.video_0324!排队! h264parse! avdec_h264!视频转换!视频! ximagesink。

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

相关问题