title: Gstreamer capture and store mjpeg from webcam
body: <p>I am trying to capture and store a webcam stream. The requirements are 1920x1080@30fps. And it must be done by a single-board-computer (Raspberry).
  The duration to capture is 10 minutes. (For the moment I only capture 10 seconds for testing)</p>
  
  <p>In general the camera (usbfhd01m from ELP) is able to provide an MJPEG stream in 1920x1080@30fps. I am just not able to store it. And I don't know why. I tried it with the following pipeline:</p>
  
  <pre><code>gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=300 do-timestamp=true ! image/jpeg,width=1920,height=1080,framerate=30/1 ! queue ! avimux ! filesink location=test.avi
  </code></pre>
  
  <p>The result is a video file which is far away from being fluent. What is missing in my pipeline?</p>
  
  <p>When I use the same pipeline, but decode the stream and save it in a raw file like this:</p>
  
  <pre><code>gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=300 do-timestamp=true ! image/jpeg,width=1920,height=1080,framerate=30/1 ! queue ! jpegdec ! filesink location=test.yuv
  </code></pre>
  
  <p>then the raw video is absolutely fluent. Therefore, I think the pipeline and the device is able to record in 1920x1080@30fps, but there seems to be something wrong for saving the stream.</p>
  
  <p>Storing the stream into matroska fileformat does not change my problem. And for transcoding on the fly to H264 the Raspberry Pi 3 doesn't seem to be powerful enough. (Even by using omxh264enc)</p>