title: Metadata of ffmpeg is undefined in electron app
body: <p>I correctly installed ffmpeg I'm able to check it by writing <code>ffmpeg</code> in cmd which give me this result</p>
  
  <p><a href="https://i.stack.imgur.com/swU5q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/swU5q.png" alt="img"></a> </p>
  
  <p>Now in my electron app in my index.html I'm geting input from user and sending custom event to electron side of app which lays in index.js entry point</p>
  
  <p>index.html</p>
  
  <pre><code>&lt;script&gt;
      const electron = require('electron');
      const { ipcRenderer } = electron;
  
      document.querySelector('form').addEventListener('submit', (e) =&gt; {
          e.preventDefault();
          const { path } = document.querySelector('input').files[0];
  
          ipcRenderer.send('video:submit', path);
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>and using ffmpeg.ffprobe I'm trying to get metadata of video updated to input in electron side like so:</p>
  
  <pre><code>const electron = require('electron');
  const ffmpeg = require('fluent-ffmpeg');
  
  const { app, BrowserWindow, ipcMain } = electron;
  
  app.on('ready', () =&gt; {
      const mainWindow = new BrowserWindow({});
      mainWindow.loadURL(`file://${__dirname}/index.html`);
  });
  
  ipcMain.on('video:submit', (event, path) =&gt; {
      ffmpeg.ffprobe(path, (err, metadata) =&gt; {
          console.log(metadata);
          //console.log(metadata.format.duration);
      });
  });
  </code></pre>
  
  <p>And it console that metadata is undefined, when I uncomment <code>console.log(metadata.format.duration)</code> it says </p>
  
  <blockquote>
    <p>typeError: cannot read property 
    'format' of undefined</p>
  </blockquote>
  
  <p>What I'm doing wrong?</p>
  
  <hr>
  
  <p>So I set two new environment variables and now other error occure when I console.log(error):</p>
  
  <pre><code>{ Error: spawn C:\Users\Borys\Documents\videoinfo\ffmpeg\bin ENOENT
  at exports._errnoException (util.js:1024:11)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
  at onErrorNT (internal/child_process.js:374:16)
  at _combinedTickCallback (internal/process/next_tick.js:138:11)
  at process._tickCallback (internal/process/next_tick.js:180:9)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn C:\\Users\\Borys\\Documents\\videoinfo\\ffmpeg\\bin',
  path: 'C:\\Users\\Borys\\Documents\\videoinfo\\ffmpeg\\bin',
  spawnargs:
  [ '-show_streams',
   '-show_format',
   'C:\\Users\\Borys\\Documents\\portfolio\\img\\header_video.mp4' ] }`
  </code></pre>
  
  <p>( I had to paste it as code because it was saying that my post containt code that is not properly formatted)</p>