# Build-FFmpeg-For-iOS-README
OS: macOS Mojave 10.14 (18A391)
Xcode: Version 10.0 (10A255)
FFmpeg version: 4.0.2
Tools Needed:
1. gas-preprocessor
2. FFmpeg-iOS-build-script
3. yasm : brew install yasm
1. Download FFmpeg-iOS-build-script from github(https://github.com/kewlbear/FFmpeg-iOS-build-script);
2. Change the ffmpeg version before compiling. FFmpeg: FF_VERSION="4.0.2",iOS:DEPLOYMENT_TARGET="8.0";
3. Open the Terminal, cd the FFmpeg-iOS-build-script folder, Execute the following command "$ ./biuld-ffmpeg.sh";
4. Execute the following command "$ ./build-ffmpeg.sh lipo" to merge ".a" files after step 3 is completed;
5. Drag the "FFmpeg-iOS" folder to your target project after the step 4 is completed;
6. Setting the target project: Build Settings -> Header Search Paths Add the file search path: $(SRCROOT)/YourProject/FFmpeg-iOS/include;
7. Add libz.dylib, libbz2.dylib, libiconv.dylib or libz.tbd, libbz2.tbd, libiconv.tbd to the project;
8. Final add the VideoToolbox.framework to the project;
Questions:
1. compiling failed,sh File contains the href:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Execution to this sentence indicates that yasm is not installed, and installing yasm requires
homebrew, so the above statement is incorrect when installing homebrew.
---------------Solution:
Install homebrew before installing yasm
2. compiling failed
xcrun -sdk iphoneos clang is unable to create an executable file.
C compiler test failed.
---------------Solution:
First
1) Check your Git version
2) Make sure you are using the lastest version from Git
Second
1) Find "ffmpeg-armv7/ffbuild/config.log" search the detail error with keyword like "xcrun: error"
2) My case ,found the detail "xcrun: error: SDK "iphoneos" cannot be located"
Third
1) Terminal input "sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/"
2) Input password
3) Try again
Build FFmpeg for iOS-2018-10-26
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...