1

我正在尝试使用 gstreamer 的 videomixer 插件合成三个流。我发现这个线程将多个图像与 gstreamer 结合起来,我可以设法将两个流并排放置,但我不知道如何添加第三个。任何人都可以帮忙吗?

我使用和工作的原始命令:

gst-launch-1.0 uridecodebin uri=http://old.koniclab.info/fileadmin/images/koniclab_logo_negro.png ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! videomixer name=m sink_1::xpos=320 ! autovideosink uridecodebin uri=http://old.koniclab.info/fileadmin/images/koniclab_logo_negro.png ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! m.

我的带有两个 udp 流的版本也可以:

gst-launch-1.0 -v udpsrc port=9000 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' ! rtph264depay ! video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264 ! videoconvert ! videomixer name=m sink_1::xpos=640 ! autovideosink -v udpsrc port=9001 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' ! rtph264depay ! video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! avdec_h264 ! videoconvert! m.

但是如何添加第三个流?

4

1 回答 1

1

为什么只停在 3,让我们做 4 :)

gst-launch-1.0 uridecodebin uri=http://old.koniclab.info/fileadmin/images/koniclab_logo_negro.png ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! videomixer name=m sink_1::xpos=320 sink_2::ypos=240 sink_3::xpos=320 sink_3::ypos=240 ! autovideosink uridecodebin uri=http://old.koniclab.info/fileadmin/images/koniclab_logo_negro.png ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! m.  uridecodebin uri=http://old.koniclab.info/fileadmin/images/koniclab_logo_negro.png ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! m. uridecodebin uri=http://old.koniclab.info/fileadmin/images/koniclab_logo_negro.png ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! m.

让我们把它格式化好一点:

gst-launch-1.0 \
videomixer name=m sink_1::xpos=320 sink_2::ypos=240 sink_3::xpos=320 sink_3::ypos=240 ! autovideosink \
uridecodebin uri=http://old.koniclab.info/fileadmin/images/koniclab_logo_negro.png ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! m. \
uridecodebin uri=http://old.koniclab.info/fileadmin/images/koniclab_logo_negro.png ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! m. \
uridecodebin uri=http://old.koniclab.info/fileadmin/images/koniclab_logo_negro.png ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! m. \
uridecodebin uri=http://old.koniclab.info/fileadmin/images/koniclab_logo_negro.png ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! m.

在处理结束时开始创建元素没有问题..使用gst-launch您只需定义哪些元素与哪些其他元素相关联..其余的gst-launch可以自行解决..

您只需复制粘贴创建输入的部分,然后最终链接到 m。.. 然后你需要添加另一个 sink_XX::some-pos=ZZZ。

我想你可以弄清楚其余的。

高温高压

于 2016-07-14T08:24:22.583 回答