macOS 10.15.7 编译FFmpeg

macOS 10.15.7 编译FFmpeg

configure

./configure --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-appkit --enable-avfoundation --enable-coreimage --enable-audiotoolbox

Unknown option “–enable-libwavpack”.
See ./configure --help for available options.
删除此选项

nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.
yasm是汇编编译器,ffmpeg为了提高效率使用了汇编指令,如MMX和SSE等。所以系统中未安装yasm时,就会报上面错误。
解决错误:安装yasm编译器。安装方法如下:
1)下载:yasm的下载链接
2)解压:把下载下来的压缩包进行解压
3)切换路径: cd yasm-1.3.0
4)执行配置: ./configure
5)编译:make
6)安装:make install(提示:Permission denied,就执行sudo make install)

ERROR: gmp not found
下载:
$ xz -d gmp-6.2.0.tar.xz $ tar -xvf gmp-6.2.0.tar
cd gmp-6.2.0
$ ./configure --enable-cxx
$ make -j4 # 4 核心编译速度更快 也可以直接 make
$ make check
$ sudo make install

     解压gmp-6.2.0.tar.xz
zsh: command not found: xz        
        下载安装xz
        https://sourceforge.net/projects/lzmautils/files/xz-5.2.5.tar.bz2/download
        ./configure
        make
        sudo make install

ERROR: gnutls not found using pkg-config
下载安装GnuTLS
https://www.gnutls.org/download.html
Required libraries:

  • libnettle crypto back-end
  • gmplib arithmetic library

下载Libgcrypt
https://www.lysator.liu.se/~nisse/nettle/
Libnettle 3.4.1 was not found.

下面一些是摸索和网上找的可能有用的方法:
(1)下载3.4.1,下载最新的3.6.15可能没用
(2)nettle这货安装的时候,自己安装到了/usr/local/lib目录下了。gnutls安装时默认会到系统目录下/usr/lib下寻找依赖关系。
软件路径瞎按,系统依赖瞎找是问题的形成原因。
安装nettle结束后,没有跟我们说安装到哪里了,我们看下nettle的路径
find /usr -name ‘nettle

这个not found问题困扰了一整天,中文的文章都说是PKG_CONFIG_PATH 怎么拼,但无论我怎么拼都没用,最后在Stack Overflow上找到一篇,其中的一条评论给了正确方法
https://stackoverflow.com/questions/57730266/configure-gnutls-libnettle-3-4-1-was-not-found-os-x-lion
same issue for macOS 10.14.6: Libnettle 3.4.1 was not found. pkgconfig.freedesktop.org/releases can help.
我以为系统未安装pkgconfig工具,于是先下载源码安装碰到问题,再用brew安装发现系统已有,但不管怎样用brew重新安装了pkgconfig0.29.2,最关键的一步是
export PKG_CONFIG= /usr/local/Cellar/pkg-config/0.29.2/bin/pkg-config
重新./configure 就不报错了。

make: Nothing to be done for `all’
无解
使用brew install gnutls 安装,源码安装就不适合

ERROR: aom >= 1.0.0 not found using pkg-config
缺啥补啥,不多想了
brew install aom

ERROR: libass not found using pkg-config

ERROR: libmysofa not found
Cmake源码安装
git clone https://github.com/hoene/libmysofa.git
brew install cmake
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF
make install

ERROR: libopencore_amrnb not found
brew install opencore-amr

ERROR: libopenjp2 >= 2.1.0 not found using pkg-config
brew install openjpeg

ERROR: opus not found using pkg-config
brew install opus

ERROR: shine not found using pkg-config
git clone https://github.com/toots/shine.git
cd shine
./bootstrap
报错: ./bootstrap: line 4: autoreconf: command not found
解决方法: brew install autoconf
依然报错:
Can’t exec “aclocal”: No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
解决方法:
brew install automake

./configure --prefix=/usr/local --disable-shared
make && make install

ERROR: libsnappy not found
brew install snappy

ERROR: libsoxr not found
brew install libsoxr

ERROR: speex not found using pkg-config
brew install speex

ERROR: libtheora not found
brew install theora

ERROR: libtwolame not found
brew install twolame

ERROR: vidstab >= 0.98 not found using pkg-config
brew install libvidstab

ERROR: libvo_amrwbenc not found

https://sourceforge.net/projects/opencore-amr/files/vo-amrwbenc/vo-amrwbenc-0.1.3.tar.gz/download

curl -O https://iweb.dl.sourceforge.net/project/opencore-amr/vo-amrwbenc/vo-amrwbenc-0.1.3.tar.gz
tar -zxvf ./vo-amrwbenc-0.1.3.tar.gz
cd ./vo-amrwbenc-0.1.3
./configure --prefix=/usr/local --disable-shared
make && make install

libvpx enabled but no supported decoders found
brew install libvpx

ERROR: libwebp >= 0.2.0 not found using pkg-config
brew install webp

ERROR: libx264 not found
brew install x264 x265

ERROR: libxvid not found
brew install xvid

ERROR: zimg >= 2.7.0 not found using pkg-config
brew install zimg

ERROR: sdl2 requested but not found
brew install sdl2

非常有帮助的一个博客
https://lvv.me/posts/2020/04/14_build_ffmpeg/

make && make install

$ ffmpeg -version
ffmpeg version N-99816-g3da35b7cc7 Copyright © 2000-2020 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.21)

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 要在虚拟机上安装MacOS 10.15.7之前,你需要确保你的电脑满足一些必要的硬件和软件要求。 首先,你需要一台支持虚拟化的计算机,如英特尔VT-x或AMD SVM技术。你还需要足够的内存(至少8GB)和存储空间(至少30GB)来运行虚拟机。 其次,你需要一个虚拟化软件,例如VirtualBox。你可以从VirtualBox的官方网站下载安装程序。安装过程很简单,只需按照向导的指示进行操作即可。 在准备工作完成后,你可以按照以下步骤安装MacOS 10.15.7: 1. 在Mac App Store上下载MacOS 10.15.7安装程序。你需要一个合法的Apple ID来下载该文件。 2. 打开VirtualBox,点击“新建”来创建一个新的虚拟机。 3. 在设置向导中,选择一个合适的名称和操作系统类型(选择MacOS)。 4. 在内存大小选项中,分配足够的内存给虚拟机,建议至少8GB。 5. 在硬盘选项中,选择“现在创建虚拟硬盘”并为虚拟机分配所需的存储空间(建议至少30GB)。 6. 完成虚拟机设置后,点击“启动”以启动虚拟机。 7. 在启动过程中,选择之前下载的MacOS 10.15.7安装程序作为虚拟机的启动磁盘。 8. 虚拟机会开始安装MacOS 10.15.7。按照屏幕上的指示进行操作,直到安装完成。 9. 完成安装后,你可以在虚拟机上享受MacOS 10.15.7的功能。 需要注意的是,在虚拟机环境中安装MacOS可能不会提供与在真实的Mac上相同的性能和功能。虚拟机的性能和功能受到计算机硬件和虚拟化软件的限制。 ### 回答2: 要在虚拟机上安装 macOS 10.15.7,您需要按照以下步骤进行操作: 1. 确保您的虚拟机软件支持安装 macOS,并且已经更新到最新版本。常用的虚拟机软件有 VMware、VirtualBox 或 Parallels Desktop。 2. 下载 macOS 10.15.7 镜像文件。您可以在苹果官方网站或其他可信的软件下载网站上下载。请确保您下载的是合法且完整的镜像文件。 3. 打开虚拟机软件并新建一个虚拟机。选择操作系统类型为 macOS,并将镜像文件作为安装介质。 4. 配置虚拟机的硬件设置。您可以根据自己的需求调整内存、硬盘空间等设置。 5. 启动虚拟机并按照提示完成 macOS 10.15.7 的安装过程。您需要选择适当的语言、键盘布局以及安装位置等。 6. 完成安装后,虚拟机会自动重启。您需要按照屏幕上的指示完成一系列初始设置,包括创建管理员账户和设置系统偏好设置。 7. 安装好后,您可以在虚拟机中体验 macOS 10.15.7 的所有功能和应用程序了。 请注意,安装 macOS 的过程可能因不同的虚拟机软件有所不同。有些软件可能需要进行额外的设置或配置才能成功安装 macOS。确保您按照相应的软件提供的说明和指南操作,以确保顺利安装 macOS 10.15.7。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值