title: Gstreamer: how convert image/jpeg stream to video and send on RTSP?
body: <p>I'm trying to stream webcam video to a VLC player using gstreamer 1.0.<br/>
  Im use Logitech c270 webcam:</p>
  
  <pre><code>v4l2-ctl --list-formats
      ioctl: VIDIOC_ENUM_FMT
      Index       : 0
      Type        : Video Capture
      Pixel Format: 'YUYV'
      Name        : YUYV 4:2:2
      Index       : 1
      Type        : Video Capture
      Pixel Format: 'MJPG' (compressed)
      Name        : Motion-JPEG
  </code></pre>
  
  <p>gst-launch-1.0 v4l2src have <a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-v4l2src.html" rel="nofollow noreferrer">formats</a> <code>image/jpeg</code> and <code>video/x-raw, format=YUY2</code><br/>
  First I tried <code>video/x-raw, format=YUY2</code>, because it is more like a video, but there was no result (maybe it is very different from YUYV).<br/>
  Then i tried <code>image/jpeg</code> and it worked!<br/>
  Current command:</p>
  
  <pre><code>gst-launch-1.0 -v v4l2src device=/dev/video0 \
  ! 'image/jpeg,width=1280,height=720,framerate=30/1' \
  ! multipartmux \
  ! tcpserversink host=192.168.1.11 port=5000
  </code></pre>
  
  <p>Now Im open VLC: <code>tcp://192.168.1.11:5000</code> and see video.<br/>
  But this <code>image/jpeg</code> and I think that this has a bad effect on network speed.<br/>
  How can I convert this signal into video and broadcast it via RTSP to open at <code>rtsp://192.168.1.11:5000</code>?</p>