2013-10-19 67 views
1

好日子同仁程序员, 我想用RPF上的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 在Raspberry Pi上用Gstreamer-1.0播放mpeg2ts

它实际上甚至工程使用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文件非常流畅,所以我不认为我的问题与硬件或文件有任何关系。

回答

2

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

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! videoconvert! videoscale! ximagesink。如果playbin正在工作,可以通过设置GST_DEBUG_DUMP_DOT_DIR var来生成xdot grapfile。然后分析xdot并找到解决方案。