title: Gstreamer - display and record video using Tee element hangs
body: <p>My target is to stream and record video at the same time.</p>
  
  <p>Gstreamer version: 1.16.1, OS: debian 11</p>
  
  <p>Initially I had more complex pipeline containing compositor on one branch and different custom filters. The simplified version of my constructed pipeline is as follows:</p>
  
  <pre><code>gst-launch-1.0 videotestsrc ! "video/x-raw,width=500,height=300,framerate=50/1"  !  tee name=t \
   t. ! queue !  x264enc ! splitmuxsink name=mux_sink  max-files=10000 next-file=5 max-size-time=600000000 location=video%02d.mp4 \
   t. ! queue !  "video/x-raw,width=500,height=300,framerate=50/1"  !  glimagesink
  </code></pre>
  
  <p>How this pipeline acts on my system is that it starts without problems but goes from NULL state to READY state and hangs there. The displayed video is also stationary and no video file is saved.</p>
  
  <p>Here is svg file generated from the dot dump null->ready state: <a href="https://drive.google.com/file/d/1oGwDufDdljbuKr8b0YURvg5VxPzMtQWb/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1oGwDufDdljbuKr8b0YURvg5VxPzMtQWb/view?usp=sharing</a></p>
  
  <p>I have already tried both branches separately without tee element - both working. I have also tried different combinations of caps filters on both queues. I tried raising gstreamer debug level to see if there was something suspicious there - nothing.</p>
  
  <p>The task should be quite straight-forward, I must be missing something here.</p>
  
  <p>Thanks in advance!</p>