title: FFMPEG get jpeg data buffer from mjpeg stream?
body: <p>I'm using <code>FFMPEG</code> to decode video stream from IP Camera, I have the example code that can decode video stream with any codec into <code>YUI</code> frames format.</p>
  
  <p>But my case is special, I will describe as below</p>
  
  <p>The IP camera stream is <code>MJPEG</code>, and I want using <code>FFMPEG</code> to decode, but I don't want to decode frame into <code>YUV</code>, I want to decode frame under <code>jpeg</code> format, and save those <code>jpeg</code> buffer into image files <code>(*.jpg)</code>. </p>
  
  <p>So far, I can do it by converting <code>YUV</code> frame (after decoding) to <code>Jpeg</code>, but this will cause bad performance. Since video stream is <code>MJPEG</code>, I think I can get <code>jpeg</code> data before decoding to <code>YUI</code>, but I don't know how to do it.</p>
  
  <p>Someone can help me?</p>
  
  <p>Many thanks,</p>
  
  <p>T&amp;T</p>