先下载文件:
1.https://github.com/libav/gas-preprocessor
2.gas-preprocessor.pl文件复制粘贴到 /usr/local/bin/目录下
3.安装yasm: ruby -e"$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"
4.执行 : ./build-ffmpeg.sh arm64
出现错误时:
Yasm not found
Trying to install Yasm...
Error: Permission denied - /Library/Caches/Homebrew/Formula/yasm.brewing
执行命令:
sudo chown -R $USER /Library/Caches/Homebrew/
中间安装过程中出现:
Operation not permitted,用命令chomd777改成读写
5.再次执行脚本文件即可:
./build-ffmpeg.sh arm64
6.添加
VideoToolbox.framework
libbz2.1.0dylib (CMD”+Shift+G (Go to folder)and type /usr/lib/)
libz.tbd
libiconv.tbd
PS:
rhc:FFmpeg-iOS-build-script-master$ ./build-ffmpeg.sh x86_64
Yasm not found
Trying to install Yasm...
Warning: yasm-1.3.0 already installed, it's just not linked
building x86_64...
yasm/nasm not foundor too old. Use --disable-yasm for a crippled build.
解决:sudo chmod777 /usr/local/opt