Gstreamer管道多个sink到一个src [英] Gstreamer pipeline multiple sink to one src

查看:1122
本文介绍了Gstreamer管道多个sink到一个src的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

寻找如何在一个模块中使用命名元素来混合两个输入。例如在一个mpegtsmux模式中混合音频和视频

Looking for explanation how to using named elements in respect with muxing two inputs in one module. For instance muxing audio and video in one mpegtsmux modle


gst-launch filesrc location = surround.mp4! decodebin name = dmux!排队!音频转换! lamemp3enc dmux。 !排队! x264enc! mpegtsmux name = mux!排队! filesink location = out.ts

gst-launch filesrc location=surround.mp4 ! decodebin name=dmux ! queue ! audioconvert ! lamemp3enc dmux. ! queue ! x264enc ! mpegtsmux name=mux ! queue ! filesink location=out.ts

以上管道提供如下的插件互连

Above pipeline gives plugins interconnection like below

不连接到mpegtsmus。

So it shows audio doesn't connect to mpegtsmus.

如何修改命令行以在mpegtsmux中有音频和视频混合?

How to modify command line to have audio and video muxedup in mpegtsmux ?


推荐答案

它没有链接,因为你的启动行不这样做。请注意如何将lamemp3enc元素连接到下游。

It is not linked because your launch line doesn't do it. Notice how the lamemp3enc element is not linked downstream.

将您的启动行更新为:


gst-launch filesrc location = surround.mp4! decodebin name = dmux!排队!音频转换! lamemp3enc! mux。 dmux。 !排队! x264enc! mpegtsmux name = mux!排队! filesink location = out.ts

gst-launch filesrc location=surround.mp4 ! decodebin name=dmux ! queue ! audioconvert ! lamemp3enc ! mux. dmux. ! queue ! x264enc ! mpegtsmux name=mux ! queue ! filesink location=out.ts

唯一的变化是!mux。

The only change is " ! mux." after the lamemp3enc to tell it to link to the mpegtsmux.

在更新内容时,请注意您正在使用gstreamer 0.10,这是多年过时和无故的,请升级到1.x系列以获得最新的改进和修正。

While you are updating things, please notice that you are using gstreamer 0.10 that is years obsolete and unmantained, please upgrade to the 1.x series to get latest improvements and bugfixes.

这篇关于Gstreamer管道多个sink到一个src的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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