title: Gstreamer picture-in-picture - two files playing in parallel
body: <p>I need to compose a pipeline for "picture-in-picture" effect to combine media from two files:</p>
  
  <p>1) video content from the first file is showed on the full window 
    2) video from the second file is resized and is showed in the top-left corner of a window,
    3) audio from both files mixed 
    4) the content from both files should be played simultaneously</p>
  
  <p>So far I got the following pipeline:</p>
  
  <pre><code>gst-launch-1.0 -e \
    filesrc name="src0" location=$FILE0 \
      ! decodebin name="decodebin0" ! queue ! videoscale ! capsfilter caps="video/x-raw,width=120" ! videoconvert ! videomixer.sink_0  decodebin0. ! queue ! audioconvert ! audiomixer.sink_0 \
    filesrc name="src1" location=$FILE1 \
      ! decodebin name="decodebin1" ! queue ! videoscale ! capsfilter caps="video/x-raw" ! videoconvert ! videomixer.sink_1  decodebin1. ! queue ! audioconvert ! audiomixer.sink_1 \
     videomixer name="videomixer" ! autovideosink \
     audiomixer name="audiomixer" ! autoaudiosink
  </code></pre>
  
  <p>However, it plays streams one by one, not in parallel. Does anyone know what should be changed here in order to play streams simultaneously ?</p>
  
  <p>Ps: attaching the diagram of this pipeline visualized: <a href="https://i.stack.imgur.com/sQ5QN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sQ5QN.jpg" alt=""></a></p>