title: Using Pipe for input and output on FFMPEG?
body: <p>I want to use ffmpeg to convert video packets to mjpeg, and ideally, I want to pipe in the gob packet and receive the output via pipe also.</p>
  
  <p>I'm using a C# process to call ffmpeg like this:</p>
  
  <p>-f h264 -i pipe: -an -f mjpeg -q:v 1 pipe:</p>
  
  <p>I pipe in the source data stream using the process .StandardInput.BaseStream and get the returned data from .StandardOutput.BaseStream.</p>
  
  <p>The issue is, FFmpeg doesn't send data. It sits, apparently waiting. No errors. Nothing gets written to StandardOutput.</p>
  
  <p>If I try each pipe on its own, it works fine. These work:</p>
  
  <p>a) passing in a source file location and getting the returned frame data via pipe (bytes are written to StandardOutput)</p>
  
  <p>b) passing in source bytes via pipe and asking Ffmpeg to save result to file</p>
  
  <p>This doesn't work:</p>
  
  <p>c) piping in data, and getting data out via pipe.</p>
  
  <p>From a previous answer from @nmaier to this question (<a href="https://stackoverflow.com/questions/19634749/can-i-use-ffmpeg-to-output-jpegs-to-a-memory-stream-instead-of-a-file">Can I use ffmpeg to output jpegs to a memory stream instead of a file</a>) I think pipe-in/pipe-out should work. But it doesn't.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks. </p>