title: Gstreamer : internal data flow error : H264 to Mjpeg to TCP
body: <p>I want to take a h264 video, decode it, re-encode it in <strong>mjpeg</strong> and stream it over <strong>tcp</strong>. </p>
  
  <p>For this, I use a <a href="https://www.raspberrypi.org/documentation/usage/camera/raspicam/raspivid.md" rel="nofollow">raspivid</a> video caputre which give a h264 output video piped with Gstreamer which decode, re-encode and transmit using tcp:</p>
  
  <pre><code>raspivid -n -t 0 -b 7000000 -fps 25 -o - | \
  gst-launch-1.0 fdsrc ! video/x-h264,framerate=25/1,stream-format=byte-stream ! decodebin ! videorate ! video/x-raw,framerate=10/1 ! \
  videoconvert ! jpegenc ! tcpserversink host=192.168.24.5 port=5000 &amp;
  </code></pre>
  
  <p>To receive I use: </p>
  
  <pre><code>gst-launch-1.0 tcpclientsrc host=192.168.24.5 port=5000 ! jpegdec ! autovideosink
  </code></pre>
  
  <p>On my tcp <em>server</em> my CPU work at 90% and I have no error. We could think it's ok, but ...</p>
  
  <p>On my tcp <em>client</em> I have this error: </p>
  
  <pre><code>ERROR: from element /GstPipeline:pipeline0/GstTCPClientSrc:tcpclientsrc0: Internal data flow error.
  Additional debug info:
  gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstTCPClientSrc:tcpclientsrc0:
  streaming task paused, reason not-negotiated (-4)
  ERROR: pipeline doesn't want to preroll.
  </code></pre>
  
  <p>Did you have any ideas why my pipeline is broken ?</p>