title: Process.start System.nullreferenceexception: Object reference not set to an instance of an object
body: <p>Ok so I am trying to start the process with the following parameters</p>
  
  <p>When I try to start it though I get an System.nullreferenceexception: Object reference not set to an instance of an object</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>   Dim exepath As String = Application.StartupPath + "\bin\ffmpeg.exe"
      Dim sr As StreamReader
      Dim cmd As String = " -i """ + input + """ -ar 22050 -y """ + output + """"
      Dim ffmpegOutput As String
      proc.StartInfo.FileName = exepath
      proc.StartInfo.Arguments = cmd
      proc.StartInfo.UseShellExecute = False
      proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
      proc.StartInfo.RedirectStandardError = True  'redirect ffmpegs output 
      'to our application
      proc.StartInfo.RedirectStandardOutput = True 'we don’t really need this
      proc.StartInfo.CreateNoWindow = True
      proc.Start() 
  </code></pre>