1

gstreamer の videomixer プラグインを使用して 3 つのストリームを合成しようとしています。このスレッドを見つけました複数の画像を gstreamerで結合すると、2 つのストリームを並べて配置できますが、3 つ目のストリームを追加する方法がわかりません。誰でも助けることができますか?

私が使用して動作する元のコマンド:

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.

2 つの 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.

しかし、どうすれば 3 番目のストリームを追加できますか?

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 を追加する必要があります。

残りは把握できると思います。

HTH

于 2016-07-14T08:24:22.583 に答える