Ffmpeg (libx264) compiling for IOS

Refer to the article: https://blog.csdn.net/cairo123/article/details/78808763
MacOS: 10.13.5 f77 (17)
FFmpeg: 2.7.7
1. The x264 compilation

The source code download: https://github.com/mstorsjo/fdk-aac
Compile script: https://github.com/kewlbear/x264-ios
Brew install NASM
$ nasm -v
NasM version 2.13.03 Compiled on Feb 8 2018

Compile scripts in X264 source code equivalent directory. Execute the compile script.

To fit the project requirements, modify the compiled script as follows:

CONFIGURE_FLAGS=”–enable-static –enable-pic”

ARCHS=”arm64 armv7 armv7s”

I’m just going to leave the ARM64, the ARMv7, the ARMv7s and I’m going to get rid of the i386 x86_64 of the simulator and the idea here is to reduce the size of the library.
Flags are as simple as possible to avoid the hassle of having fewer compilations, so just keep –enable-static –enable-pic
The modified compiled script: https://download.csdn.net/download/wangyubin2010n/10486377

2. Compile FFmpeg
To download the script: https://github.com/kewlbear/FFmpeg-iOS-build-script
Modify the script:
A. Remove i386, x86_64 architecture support,
B. Modify FFMPEG version to 2.7.7;
C. Streamline FFMPEG to remove unnecessary compilation such as binary compilation and DOCS, save time, and simplify the size of the library.
Because the script downloads the FFMPEG source code automatically, the script is executed directly after the modification is completed.     
The modified script: https://download.csdn.net/download/wangyubin2010n/10486405

3. Complete

X264 -iOS: Static library containing x264
FFMPEG-IOS: Holds FFMPEG libraries.
Library download address: https://download.csdn.net/download/wangyubin2010n/10486418

Read More: