title: Capturing frames from an h264 stream with gst/ffmpeg
body: <p>I want to save (as jpegs) or reach the data of the frames streaming from my usb camera.
  Meaning that I want to use the h.264 hardware encoding (I running it on nvdia jetson) in order to get a sequence of compressed files (I prefer not save it on the disc and get an array, if possible).
  Can I do that?</p>
  
  <p>So far I tried this:</p>
  
  <pre><code>gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-h264,framerate=30/1,stream-format=byte-stream ! decodebin ! videorate ! video/x-raw,framerate=30/1 ! videoconvert ! jpegenc ! multifilesink location=img_%04d.jpg
  </code></pre>
  
  <p>but I get an internal data flow error from v4l2src0 element, and an error from gst_base_src_loop() after the pipeline was set to PLAYING.</p>
  
  <p>Can anybody please help me?</p>
  
  <p>b.t.w- It doesnt have to be neccecerly h.264 encoding, it also can be mpeg encoding or something else: I want to use the fact that it is pictures of a video, frames, in order to get smaller size frames.</p>
  
  <p>Thank you so much!</p>