How to get Pipeline created by playbin in textual

2020-07-23 04:29发布

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

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

So I have two questions:

  1. How to find out pipeline created by playbin element.
  2. How to play mpeg2-ts file using gstreamer pipeline.

1条回答
别忘想泡老子
2楼-- · 2020-07-23 05:04

Answer to question 1 -

There is a way to get the graphs of the pipeline created mentioned in documentation of basic tutorial-11.

A brief from the page

Getting pipeline graphs

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

查看更多
登录 后发表回答