1.编译x264:
下载最新版的x264
ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
1.解压到指定的目录
2.切换当前目录为该目录
3.创建一个shell脚本build_x264.sh,内容如下:
#!/bin/bash
export NDK=/home/android/android-ndk-r14b
export SYSROOT= N D K / p l a t f o r m s / a n d r o i d − 21 / a r c h − a r m / e x p o r t T O O L C H A I N = NDK/platforms/android-21/arch-arm/ export TOOLCHAIN= NDK/platforms/android−21/arch−arm/exportTOOLCHAIN=NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
function build_one
{
./configure
–prefix=KaTeX parse error: Expected 'EOF', got '\ ' at position 8: PREFIX \̲ ̲--enable-static…TOOLCHAIN/bin/arm-linux-androideabi-
–sysroot=$SYSROOT
–extra-cflags="-Os -fpic KaTeX parse error: Expected 'EOF', got '\ ' at position 14: ADDI_CFLAGS" \̲ ̲--extra-ldflags…ADDI_LDFLAGS"
KaTeX parse error: Expected 'EOF', got '}' at position 27: …CONFIGURE_FLAG }̲ CPU=arm PREFIX…(pwd)/android/$CPU
ADDI_CFLAGS=""
build_one
2.编译ffmpeg:
下载最新版的ffmpeg
http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
1.解压到指定的目录
2.切换当前目录为该目录
3.创建一个shell脚本build_android.sh,内容如下:
#!/bin/bash
export NDK_HOME=/home/android/android-ndk-r14b
function build
{
echo “start build ffmpeg for KaTeX parse error: Expected 'EOF', got '\ ' at position 37: …arget-os=linux \̲ ̲ --prefix=PREFIX --arch=KaTeX parse error: Expected 'EOF', got '\ ' at position 5: CPU \̲ ̲ --disable-doc …CROSS_COMPILE
–enable-cross-compile
–sysroot=$SYSROOT
–enable-small
–enable-protocols
–enable-libx264
–extra-cflags=”-I/home/android/libx264/include"
–extra-ldflags="-L/home/android/libx264/lib"
–extra-cflags="-Os -fpic KaTeX parse error: Expected 'EOF', got '\ ' at position 14: ADDI_CFLAGS" \̲ ̲ --extra-ldflag…ADDI_LDFLAGS"
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
echo “build ffmpeg for $CPU finished”
}
#arm
PLATFORM_VERSION=android-14
ARCH=arm
CPU=armeabi
PREFIX= ( p w d ) / a n d r o i d a l l / (pwd)/android_all/ (pwd)/androidall/CPU
TOOLCHAIN= N D K H O M E / t o o l c h a i n s / a r m − l i n u x − a n d r o i d e a b i − 4.9 / p r e b u i l t / l i n u x − x 8 6 6 4 C R O S S C O M P I L