【问题标题】:How to install ffmpeg and an app together on a Mac?如何在 Mac 上同时安装 ffmpeg 和应用程序?
【发布时间】:2016-10-28 00:45:16
【问题描述】:

我在 .app 文件中为 macOS 构建和打包了一个 electron app。该应用程序需要在最终用户的计算机上安装ffmpeg 才能使用。

目前,我必须在每个最终用户的计算机上手动安装 ffmpeg 才能运行该应用程序。

我想通过 ffmpeg 和应用程序的简单安装程序在线分发应用程序。我见过.dmg 文件,它可以让您轻松地将.app 拖到应用程序文件夹中,但是安装过程中仍然没有 ffmpeg 依赖。

如何在 Mac 上同时安装 ffmpeg 和应用程序?

也许在.app 内容中包含 ffmpeg 构建也是一种解决方案。 这可能是不可能的,因为a relevant question 提到只有 ffmpeg CLI 的抽象,而不是可以直接使用 ffmpeg 的东西。

【问题讨论】:

  • 您打算只在 MacOS 上部署还是在多平台上部署?
  • 多平台。 @ThomasAyoub
  • 所以你要在 Windows 上部署 .dmg 文件?
  • 不,我首先要问的是如何为 macOS 执行此操作。我将再次离开Windows安装过程
  • 试试this。这可能会有所帮助。

标签: xcode macos ffmpeg electron packagemaker


【解决方案1】:

您应该在 .app 中包含 ffmpeg。这样你……

  • 无需管理员权限即可安装或更新您的应用。
  • 不要冒险与用户计算机上的不同 ffmpeg 副本发生冲突。

有关 Electron 特定说明,请参阅此答案:How can I bundle a precompiled binary with electron

【讨论】:

    【解决方案2】:

    抱歉回复晚了,但万一它仍然与某人相关:我正是为此目的创建了 ffbinaries 模块。

    您可以在应用启动期间或在 CI/预打包场景中下载用户平台的二进制文件(如果您未自行指定平台,将自动检测平台)。

    【讨论】:

      【解决方案3】:

      您可以在 mac 中创建一个 PKG 文件,该文件可以与任何其他第三方应用程序一起安装您的应用程序。您可以尝试来自 here 的 Seema 的回答

      【讨论】:

        【解决方案4】:

        你可以试试这个在mac上安装ffmpeg,它对我有用:

        brew install --build-from-source ffmpeg

        【讨论】:

          【解决方案5】:

          这个问题还需要了解 ffmpeg 许可证。总之,由于许可问题,请不要将 ffmpeg 与您的应用程序捆绑,而是允许用户自行下载和安装 ffmpeg。

          您是否将您的应用分发为

          一个。 GPL - 开源,所有源代码均可公开获取

          b.非商业闭源应用

          c。商业应用

          在此处查看 ffmpeg 许可 - 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.
          
          

          即使使用开源应用程序 - 也建议谨慎。例如,Audacity 是一个使用 ffmpeg 的流行开源应用程序。看这里 - 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.
          

          【讨论】:

            猜你喜欢
            • 2012-02-17
            • 2013-01-02
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2018-02-15
            • 1970-01-01
            • 1970-01-01
            • 2016-12-17
            相关资源
            最近更新 更多