如何在Gstreamer中获取playbin以文本格式创建的管道? [英] How to get Pipeline created by playbin in textual format in Gstreamer?

查看:357
本文介绍了如何在Gstreamer中获取playbin以文本格式创建的管道?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下管道播放传输流文件(* .ts):

I'm playing a transport stream file (*.ts) using the following pipeline:

gst-launch-0.10 playbin2 uri=file:///c:/bbb.ts

但是我需要自己将其转换为管道.我不确定如何实现这一目标.

But I need to convert that into a pipeline myself. I'm not sure how to achieve this.

到目前为止,我已经尝试过:(工作正常)

So far I have tried: (works fine)

gst-launch-0.10 -v filesrc location=c:/bbb.ts ! tsdemux ! audio/x-ac3 ! fakesink

但是,如果我用autoaudiosink替换了fakesink,它将失败,并出现未链接的错误.

But if i replace fakesink with autoaudiosink it fails with a not-linked error.

甚至假钞也不适用于视频:

And even the fakesink doesn't work for video:

gst-launch-0.10 -v filesrc location=c:/bbb.ts ! tsdemux ! video/x-mpeg2 ! fakesink

所以我有两个问题:

  1. 如何找出playbin元素创建的管道.
  2. 如何使用gstreamer管道播放mpeg2-ts文件.

推荐答案

问题1的答案-

有一种方法可以获取基本教程11 .

页面摘要

获取管道图

对于那些您的管道开始变得太大而您又 忘记了与什么有关的东西,GStreamer拥有 输出图形文件的能力.这些是.dot文件,可通过以下方式读取 GraphViz 之类的免费程序,它们描述了您的拓扑 管道,以及每个链接中商定的上限.

For those cases where your pipeline starts to grow too large and you lose track of what is connected with what, GStreamer has the capability to output graph files. These are .dot files, readable with free programs like GraphViz, that describe the topology of your pipeline, along with the caps negotiated in each link.

在使用诸如

This is also very handy when using all-in-one elements like playbin2 or uridecodebin, which instantiate several elements inside them.

我希望这能解决您想要的问题

I hope this resolves what you want

这篇关于如何在Gstreamer中获取playbin以文本格式创建的管道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆