title: FFMPEG waiting for images in image2pipe mode
body: <p>I'm creating a Node JS application which takes an m-jpeg image stream, and constructs an MPEG-1 stream on the fly. I'm leveraging fluent-ffmpeg at the moment. The steam is intended to be continuous and long-lived. The images flow in freely at a constant framerate.</p>
  
  <p>Unfortunately, using <code>image2pipe</code> and input <code>-vcodec mjpeg</code>, it seems like ffmpeg needs to wait until all the images are ready before processing begins.</p>
  
  <p>Is there any way to have ffmpeg pipe in and pipe out immediately, as images arrive?</p>
  
  <p>Here is my current Node JS code:</p>
  
  <pre><code>var proc = new ffmpeg({ source: 'http://localhost:8082/', logger: winston, timeout: 0 })
    .fromFormat('image2pipe')
    .addInputOption('-vcodec', 'mjpeg')
    .toFormat('mpeg1video')
    .withVideoBitrate('800k')
    .withFps(24)
    .writeToStream(outStream);
  </code></pre>
  
  <p>And the ffmpeg call it generates:</p>
  
  <pre><code>ffmpeg -f image2pipe -vcodec mjpeg -i - -f mpeg1video -b:v 800k -r 24 -y http://127.0.0.1:8082/
  </code></pre>