美文网首页
iOS下编译ffmpeg

iOS下编译ffmpeg

作者: ksnowlv | 来源:发表于2023-04-02 11:32 被阅读0次
一.下载FFmpeg安装文件

下载的文件,包含 build-ffmpeg-iOS-framework.sh,build-ffmpeg-tvos.sh,build-ffmpeg.sh三个脚本。

二.编译FFmpeg

切换到FFmpeg-iOS-build-script-master目录,编译armv7,x86_64库

./build-ffmpeg.sh armv7 x86_64
gas-preprocessor.pl not found. Trying to install...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 43674  100 43674    0     0  19688      0  0:00:02  0:00:02 --:--:-- 39667
FFmpeg source not found. Trying to download...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10.7M  100 10.7M    0     0  72184      0  0:02:36  0:02:36 --:--:-- 84227
building armv7...
xcrun -sdk iphoneos clang is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

使用

xx@localhost FFmpeg-iOS-build-script-master % sudo xcode-select --switch /Applications/Xcode.app

配置clang编译器,重新编译即可生成armv7,x86_64库。

同理:可生成arm64,x86_64的库。

截屏2023-04-03 11.07.10.png
三.编译生成头文件及库
截屏2023-04-03 11.09.39.png 截屏2023-04-03 11.09.52.png

相关文章

网友评论

      本文标题:iOS下编译ffmpeg

      本文链接:https://www.haomeiwen.com/subject/anfrddtx.html