12

I have an electron app built and packaged for macOS in a .app file. The app requires ffmpeg to be installed on the end-user's computer to be used.

Currently, I've had to manually install ffmpeg on each end-user's computer to run the app.

I want to distribute the app online with an easy installer for both ffmpeg and the app. I've seen .dmg files which allows you to drag the .app into the applications folder easily, but the ffmpeg dependency is still absent in the installation process.

How can I install ffmpeg and the app together on a mac?

Perhaps including the ffmpeg build in the .app content is a solution as well. This may not be possible though because a relevant question mentions there are only abstractions of the ffmpeg CLI instead of something that can directly use ffmpeg.

Community
  • 1
  • 1
Patrick
  • 1,410
  • 2
  • 19
  • 37

5 Answers5

1

This question also requires an understanding of the ffmpeg license. In summary, due to licensing issue, do not bundle ffmpeg with your app but allow the user to download and install ffmpeg on her own.

Are you distributing your app as

a. GPL - open source with all source code publicly available

b. non-commercial closed source app

c. commercial app

See the ffmpeg licensing here - https://www.ffmpeg.org/legal.html

FFmpeg is licensed under the GNU Lesser General Public License (LGPL) version 2.1 or later. However, FFmpeg incorporates several optional parts and optimizations that are covered by the GNU General Public License (GPL) version 2 or later. If those parts get used the GPL applies to all of FFmpeg.

Read the license texts to learn how this affects programs built on top of FFmpeg or reusing FFmpeg. You may also wish to have a look at the GPL FAQ.

Note that FFmpeg is not available under any other licensing terms, especially not proprietary/commercial ones, not even in exchange for payment.

Even with an open source app - discretion is advised. For example, Audacity is a popular open source app that uses ffmpeg. See here - https://manual.audacityteam.org/man/installing_ffmpeg_for_windows.html

Because of software patents, Audacity cannot include the FFmpeg software or distribute it from its own websites. Instead, use the following instructions to download and install the free and recommended FFmpeg third-party library.
moi
  • 467
  • 4
  • 19
0

You should include ffmpeg in the .app. That way you…

  • Don't need admin privileges to install or update your app.
  • Don't risk conflicting with a different copy of ffmpeg on the user's computer.

See this answer for Electron-specific instructions: How can I bundle a precompiled binary with electron.

s4y
  • 50,525
  • 12
  • 70
  • 98
  • From the app architecture side this is the easiest solution, but keep in mind what @moi says. ffmpeg uses LGPL license, which means legally you can not distribute a static build of ffmpeg. – soundflix Jul 09 '23 at 09:39
0

sorry for late response but in case it's still relevant to someone: I created ffbinaries module exactly for this purpose.

You can download binaries for user's platform either during app boot or in CI/prepackaged scenario (platform will be automatically detected if you don't specify it yourself).

Vot
  • 199
  • 2
  • 6
0

you can create a PKG file in mac which can install your app along with any other third party apps.You can try Seema's answer from here

Praveen Reddy
  • 33
  • 1
  • 9
0

You can try this one to install ffmpeg on mac, it worked for me:

brew install --build-from-source ffmpeg