5

I have an electron application that has the following dependencies:

  1. ffmpeg
  2. libmagic
  3. gdbm

Currently, I use Homebrew and run brew install ffmpeg etc. upon startup of the app.

However, this is terrible for distribution. Is there a way to distribute these dependencies packaged alongside my application so that the end user doesn't have to have Homebrew or deal with installation errors? I'm distributing my app using electron-packager to create a Desktop Mac app.

I gave the specific dependencies just for context -- hopefully there is a solution that would work with any generic dependency?

Varun Mathur
  • 898
  • 8
  • 11

1 Answers1

0

It is possible with dynamic linking

use https://www.npmjs.com/package/ffmpeg-static

Example Usage

Returns the path of a statically linked ffmpeg binary on the local filesystem.

var pathToFfmpeg = require('ffmpeg-static');
console.log(pathToFfmpeg);
/Users/j/playground/node_modules/ffmpeg-static/ffmpeg

check https://discuss.atom.io/t/information-about-bundled-ffmpeg/28456/6

flakerimi
  • 2,580
  • 3
  • 29
  • 49