先下载文件:
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
本文档提供了一份详细的FFmpeg在iOS平台上的构建流程,包括必要的依赖项安装、环境配置及常见错误处理方法。从下载必备工具到解决权限问题,直至成功编译FFmpeg,适合iOS音视频开发者参考。
627

被折叠的 条评论
为什么被折叠?



