title: How do I set ffmpeg pipe output?
body: <p>I need to read ffmpeg output as pipe.
  There is a code example:</p>
  
  <pre><code>    public static void PipeTest()
      {
          Process proc = new Process();
          proc.StartInfo.FileName = Path.Combine(WorkingFolder, "ffmpeg");
          proc.StartInfo.Arguments = String.Format("$ ffmpeg -i input.mp3 pipe:1");
          proc.StartInfo.UseShellExecute = false;
          proc.StartInfo.RedirectStandardInput = true;
          proc.StartInfo.RedirectStandardOutput = true;
          proc.Start();
  
          FileStream baseStream = proc.StandardOutput.BaseStream as FileStream;
          byte[] audioData;
          int lastRead = 0;
  
          using (MemoryStream ms = new MemoryStream())
          {
              byte[] buffer = new byte[5000];
              do
              {
                  lastRead = baseStream.Read(buffer, 0, buffer.Length);
                  ms.Write(buffer, 0, lastRead);
              } while (lastRead &gt; 0);
  
              audioData = ms.ToArray();
          }
  
          using(FileStream s = new FileStream(Path.Combine(WorkingFolder, "pipe_output_01.mp3"), FileMode.Create))
          {
              s.Write(audioData, 0, audioData.Length);
          }
      }
  </code></pre>
  
  <p>It's log from ffmpeg, the first file is readed:</p>
  
  <blockquote>
    <p>Input #0, mp3, from 'norm.mp3':
      Metadata:
        encoder         : Lavf58.17.103
      Duration: 00:01:36.22, start: 0.023021, bitrate: 128 kb/s
        Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 128 kb/s
        Metadata:
          encoder         : Lavc58.27</p>
  </blockquote>
  
  <p>Then pipe:</p>
  
  <blockquote>
    <p>[NULL @ 0x7fd58a001e00] Unable to find a suitable output format for '$'
    $: Invalid argument</p>
  </blockquote>
  
  <p>If I run "-i input.mp3 pipe:1", the log is:</p>
  
  <blockquote>
    <p>Unable to find a suitable output format for 'pipe:1' pipe:1: Invalid
    argument</p>
  </blockquote>
  
  <p>How do I set correct output? And how should ffmpeg know what the output format is at all?</p>