title: Play local .avi videos in Node.js / Electron app
body: <p>Maddening gap in an app I'm developing is there appears to be little (or no) support for AVI in the HTML5 video implementation. So, I need a workaround that is cross-platform, and package-able with my electron app.</p>
  
  <ul>
  <li>Videos are hosted locally </li>
  <li>I'm not averse to encoding on the fly (ffmpeg avi -> mp4 and use HTML5 natively?) </li>
  <li>WebChimera appears dying due to VLC and Electron changes (devs can't keep up) (Is there another npm package that can do this?) </li>
  <li>A wrapper that calls a native VLC instance might work -- but how do I ensure that VLC is available on the system with my packaging? </li>
  <li>Should I just spawn a native app in a separate window (ie, Totem on Linux)? (seems clunky)</li>
  <li>Latest videoj-java plugin apparently has issue (<a href="https://github.com/Afterster/videojs-java/issues/2" rel="noreferrer">https://github.com/Afterster/videojs-java/issues/2</a>) and adding another layer (java) to the electron stack seems somehow unsavory.</li>
  <li>FFBinaries (<a href="https://github.com/vot/ffbinaries-node" rel="noreferrer">https://github.com/vot/ffbinaries-node</a>) seems promising... but oddly FFPlay is not available for Linux (though I suspect my linux consumers likely have a ffmpeg already installed).</li>
  </ul>
  
  <p>NB: Files are decidedly AVI. I can't change this.</p>
  
  <p>Any hints / pointers greatly appreciated!</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>On my system, using ffmpeg to convert:</p>
  
  <pre><code>ffmpeg -i infile.AVI -vcodec copy -acodec copy outfile.mp4
  </code></pre>
  
  <p>Takes no time at all (they are short videos):</p>
  
  <pre><code>real    0m0.138s
  user    0m0.100s
  sys     0m0.032s
  </code></pre>
  
  <p>So I'm leaning toward packaging ffmpeg with my program and converting before loading.</p>