<div>Eduardo,</div><div>Try adding a videorate element and queue to the end of each feed. It will probably also require forcing the caps on videomixer so that videorate knows what to match to. Videorate will duplicate or drop frames to sync the rates. Using &quot;videorate silence=false&quot; will show you each time a frame is added or dropped.  Remove it once you see it working. </div>

<div><br></div><div>The three queues will thread your three inputs up to videomixer2 sink. </div><div><br></div><div>I could not test this but here&#39;s a rough interpretation of my recommendation. Good luck.</div><div>
<br>
</div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "> gst-launch-0.10 \<br> videomixer2 name=mix ! </span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">video/x-raw-yuv,width=1536,height=1056, framerate=30/1 ! </span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">xvimagesink \</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">  v4l2src device=&quot;/dev/video0&quot; ! video/x-raw-yuv,width=640,height=480 ! videoscale ! video/x-raw-yuv,width=512,height=384 ! ffmpegcolorspace ! \<br>

    videobox border-alpha=0 top=-384 left=0 ! </span>&quot;videorate silence=false&quot; ! queue ! <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">mix. \</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">  v4l2src device=&quot;/dev/video1&quot; ! video/x-raw-yuv,width=720,height=576 ! videoscale ! video/x-raw-yuv,width=512,height=384 ! ffmpegcolorspace ! \<br>

    videobox border-alpha=0 top=0 left=0 ! </span>&quot;videorate silence=false&quot; ! queue ! <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">mix. \</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">  v4l2src device=&quot;/dev/video2&quot; ! video/x-raw-yuv,width=1024,height=768 ! ffmpegcolorspace  ! \<br>

     videobox border-alpha=0 top=0 left=-512 ! </span>&quot;videorate silence=false&quot; ! queue ! <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">mix.</span></div>

<div><br></div><div><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videorate.html">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videorate.html</a><br>

</div><br clear="all"><b>Mike Mitchell</b><div><b><br></b><br><br>
<br><br><div class="gmail_quote">On Wed, Oct 5, 2011 at 3:56 AM, Eduardo Herraiz <span dir="ltr">&lt;<a href="mailto:edu@ifisc.uib-csic.es">edu@ifisc.uib-csic.es</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi all,<br>
<br>
I am trying to mix 3 different sources with Gstreamer.<br>
<br>
I have 2 usb cams and a usb framegrabber capturing a VGA laptop exit.<br>
<a href="http://ifisc.uib-csic.es/~edu/screens_gstreamer/allsources.png" target="_blank">http://ifisc.uib-csic.es/~edu/screens_gstreamer/allsources.png</a><br>
<br>
It works, but with a very slow framerate. I suppose that is a problem with the different bitrates of the sources, because the framegrabber has a 10 fps an the others 25 fps.<br>
And in console I can see errors, every second, like this: &quot;There may be a timestamping problem, or this computer is too slow.&quot;<br>
This is the command I used:<br>
 gst-launch-0.10 \<br>
  videomixer2 name=mix ! xvimagesink \<br>
   v4l2src device=&quot;/dev/video0&quot; ! video/x-raw-yuv,width=640,height=480 ! videoscale ! video/x-raw-yuv,width=512,height=384 ! ffmpegcolorspace ! \<br>
     videobox border-alpha=0 top=-384 left=0 ! mix. \<br>
   v4l2src device=&quot;/dev/video1&quot; ! video/x-raw-yuv,width=720,height=576 ! videoscale ! video/x-raw-yuv,width=512,height=384 ! ffmpegcolorspace ! \<br>
     videobox border-alpha=0 top=0 left=0 ! mix. \<br>
   v4l2src device=&quot;/dev/video2&quot; ! video/x-raw-yuv,width=1024,height=768 ! ffmpegcolorspace  ! \<br>
      videobox border-alpha=0 top=0 left=-512 ! mix.<br>
<br>
When I try without the slow source, seems to work properly.<br>
<a href="http://ifisc.uib-csic.es/~edu/screens_gstreamer/twosources.png" target="_blank">http://ifisc.uib-csic.es/~edu/screens_gstreamer/twosources.png</a><br>
<br>
<br>
I have no idea how to solve this and if is possible to merge, in a correct way, different sources with variable bitrates,<br>
Anybody knows?<br>
<br>
This link was helpful for me and I based my work on it:<br>
<a href="http://www.oz9aec.net/index.php/gstreamer/347-more-gstreamer-tips-picture-in-picture-compositing" target="_blank">http://www.oz9aec.net/index.php/gstreamer/347-more-gstreamer-tips-picture-in-picture-compositing</a><br>


<br>
Thank you<br>
Edu<br>
<br>
<br>
--<br>
*****************************************************************<br>
Edu Herraiz - Web developer<br>
<a href="http://www.eduherraiz.com" target="_blank">http://www.eduherraiz.com</a><br>
<br>
IFISC<br>
Instituto de Física Interdisciplinar y Sistemas Complejos (CSIC-UIB)<br>
email: <a href="mailto:edu@ifisc.uib-csic.es">edu@ifisc.uib-csic.es</a><br>
*****************************************************************<br>
<br>
<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div>