一.下載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的庫弄抬。