title: Capturing h.264 stream from camera with Gstreamer
body: <p>I'm trying to capture H264 stream from locally installed Logitech C920 camera from <code>/dev/video0</code> with <code>Gstreamer 1.0</code> <code>v4l2src</code> element.</p>
  
  <p><code>v4l2-ctl --list-formats</code> shows that camera is capable to give H264 video format:</p>
  
  <pre><code># v4l2-ctl --list-formats
  ioctl: VIDIOC_ENUM_FMT
          ...
  
          Index       : 1
          Type        : Video Capture
          Pixel Format: 'H264' (compressed)
          Name        : H.264
  
          ...
  </code></pre>
  
  <p>But pipeline </p>
  
  <p><code># gst-launch-1.0 -vvv v4l2src device=/dev/video0 ! video/x-h264, width=800, height=448, framerate=30/1 ! fakesink</code></p>
  
  <p>keeps giving me <code>not-negotiated (-4)</code> error:</p>
  
  <pre><code>/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-h264, width=(int)800, height=(int)448, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
  /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, width=(int)800, height=(int)448, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
  /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-h264, width=(int)800, height=(int)448, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
  /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-h264, width=(int)800, height=(int)448, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
  ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
  Additional debug info:
  gstbasesrc.c(2809): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
  streaming task paused, reason not-negotiated (-4)
  Execution ended after 67687169 ns.
  </code></pre>
  
  <p>Any help!</p>