参考文章:iOS开发 - 超详细集成 FFmpeg 步骤
iOS集成FFmpeg及视频格式转码
以下是在编译过程遇到的问题:
1.编译出现以下错误信息.
xcrun -sdk iphoneos clang is unable to create an executable file.
C compiler test failed.
Ifyou think configure made a mistake, make sure you are using the latestversion from Git.Ifthe latest version fails, report the problem to [email protected] mailinglistorIRC#ffmpeg on irc.freenode.net.Includethe log file"config.log"produced by configureasthis will helpsolve the problem.
问题链接:https://github.com/kewlbear/FFmpeg-iOS-build-script/issues/119
这时只需执行以下命令即可:
sudo xcode-select --switch /Applications/Xcode.app
2.'libavcodec/avcodec.h' file not found 说是找不到
因该是 headerSearchPath 里面的路径添加的不对.
一种写法:
$(SRCROOT)/FFmpeg_iOS/FFmpeg/include
这个写法 我这边 不得行.
第二中写法:
$(SRCROOT)/$(PRODUCT_NAME)/FFmpeg-iOS/include
我的项目里面这个可以使用