编译fdk-aac的ios版本
2019-03-14 本文已影响0人
FullerZhang
1、github下载地址:https://github.com/mstorsjo/fdk-aac
2、打开终端,命令:brew install automake libtool ,安装automake和libtool
![](https://img.haomeiwen.com/i9196002/29244c83df5cd863.png)
3、 下载libfdk-aac的编译脚本:https://github.com/kewlbear/fdk-aac-build-script-for-iOS
4、把下载的脚本文件和从x264文件夹放在同一个文件夹下,建议路径不包含中文:
![](https://img.haomeiwen.com/i9196002/4c4d69fae7c8a8fd.png)
5、修改build-fdk-aac.sh脚本文件中SOURCE="",引号里内容就是将要编译的fdk文件夹名称,参考上一步,文件夹名称fdk-aac-master,先修改如下(注:本人只需要arm64和armv7,所以ARCHS仅剩下arm64):
修改前:
![](https://img.haomeiwen.com/i9196002/00c96ca9ec599600.png)
修改后:
![](https://img.haomeiwen.com/i9196002/e14faeb1829d6a6a.png)
6、打开终端,切换到目录fdk-aac-0.1.5目录下: cd fdk-aac-0.1.5,并执行./autogen.sh
![](https://img.haomeiwen.com/i9196002/a1125ad4fd3f5cb8.png)
7、返回上一层命令cd .. ,为脚本添加执行权限chmod u+x ./build-fdk-aac.sh ,然后执行./build-fdk-aac.sh
![](https://img.haomeiwen.com/i9196002/82be3667298e5df4.png)
![](https://img.haomeiwen.com/i9196002/cf6c85632836b0fd.png)
8、最终文件夹结果和lipo -info验证
![](https://img.haomeiwen.com/i9196002/750b9e20a70011ac.png)
![](https://img.haomeiwen.com/i9196002/b47ed9b9f2b3968b.png)