2016-07-14 1 views
1

Je tente de composter trois flux en utilisant le plug-in videomixer de gstreamer. J'ai trouvé ce fil Combine multiple images with gstreamer et je peux réussir à mettre côte à côte deux de mes flux, mais je n'ai aucune idée de la façon d'en ajouter un troisième. Quelqu'un peut-il aider?Gstreamer Compositing image avec trois flux

La commande originale que j'utilise et fonctionne:

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. 

Ma version avec deux flux udp, fonctionne aussi:

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. 

Mais comment puis-je ajouter un troisième courant?

Répondre

0

Pourquoi arrêter à 3, 4 permet de faire :)

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. 

Lets son format peu plus agréable:

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. 

Il n'y a pas de problème avec le démarrage de la création d'éléments qui sont à la fin de traitement .. avec gst-launch vous venez de définir quels élelemnts sont liés à quels autres éléments .. le reste gst-launch peut se débrouiller seul ..

Vous venez de copier coller la pièce ates l'entrée quel qu'il soit et enfin lien vers m. .. alors vous devez ajouter un autre sink_XX :: some-pos = ZZZ.

Je pense que vous pouvez comprendre le reste.

HTH

+0

Merci, cela fonctionne et semble en effet bien formaté. Pour une raison quelconque, je reçois un message d'erreur disant qu'il n'y a pas d'élément glvideomixer, mais que l'utilisation de videomixer fonctionne. –

+0

@alainbaumann a changé pour videomixer .. si elle résout votre problème, vous pouvez accepter la question avec la coche ci-dessous vote count, si vous l'aimez vraiment, vous pouvez également upvote – nayana