title: Ffmpeg command in nodejs
body: <p>I want to use ffmpeg commands in my nodejs application. I dont want to using any npm packages like fluent-ffmpeg.
  Till now I have done this :</p>
  
  <pre><code>var ffmpeg = spawn('ffmpeg', ['-i',fileName+'.wav' ,fileName+'.amr','-acodec libopencore_amrnb', '-ab 12200k', '-ac 1', '-ar 8000']);
              // input_file.pipe(ffmpeg.stdin);
              // ffmpeg.stdout.pipe(output_stream);
  
              ffmpeg.stderr.on('data', function (data) {
                  console.log(data.toString());
              });
  
              ffmpeg.stderr.on('end', function () {
                  console.log('file has been converted succesfully');
              });
  
              ffmpeg.stderr.on('exit', function () {
                  console.log('child process exited');
              });
  
              ffmpeg.stderr.on('close', function() {
                  console.log('...closing time! bye');
              });
  </code></pre>
  
  <p>In output it gives error like this :</p>
  
  <pre><code>Unrecognized option 'acodec libopencore_amrnb'
  </code></pre>
  
  <p>I have installed all binaries required. Just need to know what command i have to pass in <code>spawn()</code> like :</p>
  
  <pre><code>var ffmpeg = spawn('ffmpeg', ['-i',fileName+'.wav' ,fileName+'.amr','-acodec libopencore_amrnb', '-ab 12200k', '-ac 1', '-ar 8000']);
  </code></pre>
  
  <p>I have tried the command on terminal and works perfectly. All i want is the correct way to pass command (options) in <code>spawn()</code>. Any help would be appreciated. </p>