1、解压ffmpeg2.6.3源代码,在根目录下新建文件myconfig,内容如下,执行命令chmod 777 ./myconfig
2、./myconfig
3、make
4、make install
5、make clean
编译好的库文件地址(指令集为armv7 armv7s arm64):http://pan.baidu.com/s/1pJ2xZIj
./myconfig内容如下:
#
#
#Toolchain options:
# --arch=ARCH select architecture []
# --cpu=CPU select the minimum required CPU (affects
# instruction selection, may crash on older CPUs)
# --cross-prefix=PREFIX use PREFIX for compilation tools []
# --progs-suffix=SUFFIX program name suffix []
# --enable-cross-compile assume a cross-compiler is used
# --sysroot=PATH root of cross-build tree
# --sysinclude=PATH location of cross-build system headers
# --target-os=OS compiler targets OS []
# --target-exec=CMD command to run executables on target
# --target-path=DIR path to view of build directory on target
# --target-samples=DIR path to samples directory on target
# --tempprefix=PATH force fixed dir/prefix instead of mktemp for checks
# --toolchain=NAME set tool defaults according to NAME
# --nm=NM use nm tool NM [nm -g]
# --ar=AR use archive tool AR [ar]
# --as=AS use assembler AS []
# --windres=WINDRES use windows resource compiler WINDRES [windres]
# --yasmexe=EXE use yasm-compatible assembler EXE [yasm]
# --cc=CC use C compiler CC [gcc]
# --cxx=CXX use C compiler CXX [g++]
# --dep-cc=DEPCC use dependency generator DEPCC [gcc]
# --ld=LD use linker LD []
# --pkg-config=PKGCONFIG use pkg-config tool PKGCONFIG [pkg-config]
# --pkg-config-flags=FLAGS pass additional flags to pkgconf []
# --ranlib=RANLIB use ranlib RANLIB [ranlib]
# --doxygen=DOXYGEN use DOXYGEN to generate API doc [doxygen]
# --host-cc=HOSTCC use host C compiler HOSTCC
# --host-cflags=HCFLAGS use HCFLAGS when compiling for host
# --host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host
# --host-ld=HOSTLD use host linker HOSTLD
# --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
# --host-libs=HLIBS use libs HLIBS when linking for host
# --host-os=OS compiler host OS []
# --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS []
# --extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS []
# --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS []
# --extra-ldexeflags=ELDFLAGS add ELDFLAGS to LDEXEFLAGS []
# --extra-libs=ELIBS add ELIBS []
# --extra-version=STRING version string suffix []
# --optflags=OPTFLAGS override optimization-related compiler flags
# --build-suffix=SUFFIX library name suffix []
# --enable-pic build position-independent code
# --enable-thumb compile for Thumb instruction set
# --enable-lto use link-time optimization
#
# -—extra-ldflags=-L/Applications/Xcode.app/Contents/Developer/Platforms/#iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/system
#--cpu=cortex-a15
#
./configure --prefix=/libs/ffmpeg/2.6.3/arm64 --disable-ffserver --disable-ffprobe
--disable-w32threads --enable-cross-compile --arch=arm64 --cc=clang
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk
--target-os=darwin
--extra-cflags='-arch arm64' --extra-ldflags='-arch arm64 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk' --arch=arm --disable-asm --logfile=/Users/musictom/Desktop/log_ffmpeg