ubuntu下编译AndroidFFmpegLibrary

环境:

ubuntu10.04  64位

ndk 8e

这里要非常注意,一定要NDK8,开始也是下最新版本的9 b,结果一堆问题。

需要安装:

  • autoconf
  • autoconf-archive
  • automake
  • pkg-config
  • git
  • svn

ubuntu使用 sudo apt-get install 安装吧

Before start

if you have a problem with certificate add GIT_SSL_NO_VERIFY=true before git submodule update line

GIT_SSL_NO_VERIFY=true  git submodule update

Im sorry about this certificate issue, but never is enough time to fix problems like those

If (only if) you have ssh key in appunite review system you should setup global alias in ~/.gitconfig file.

git config --global url.ssh://review.appunite.com.insteadOf https://review.appunite.com

Go to the work

downloading source code

git clone https://review.appunite.com/androidffmpeg AndroidFFmpeg
cd AndroidFFmpeg
git submodule init
git submodule sync #if you are updating source code
git submodule update
cd FFmpegLibrary
cd jni

download libyuv

# I hate svn too :)
svn checkout http://libyuv.googlecode.com/svn/trunk/ libyuv

setup freetype environemtn

cd freetype
./autogen.sh
cd ..

setup fribidi environemtn

cd fribidi
autoreconf -ivf
cd ..

setup libass environemtn

cd libass
autoreconf -ivf
cd ..

setup vo-aacenc environment

cd vo-aacenc
autoreconf
cd ..

setup vo-amrwbenc environment

cd vo-amrwbenc
autoreconf
cd ..

build external libraries

export NDK=/your/path/to/android-ndk
./build_android.sh
执行上面的脚步,一般会出现错误:
最经常出现的错误就是在64位的ubuntu下了
一会x86,一会x86_64

make sure that files FFmpegLibrary/jni/ffmpeg-build/{armeabi,armeabi-v7a,x86}/libffmpeg.so was created, otherwise you are in truble

build ndk jni library

ndk-build

make sure that files FFmpegLibrary/libs/{armeabi,armeabi-v7a,x86}/libffmpeg.so was created, otherwise you are in truble

build your project

android update lib-project -p FFmpegLibrary
android update project -p FFmpegExample
cd FFmpegExample
ant debug
ant installd

总之过程需要等待不少时间,需要耐心。。。
参考来源:https://github.com/appunite/AndroidFFmpeg/tree/master



最后顺带上传已经编译好的项目:

猜你喜欢

转载自dengzhangtao.iteye.com/blog/1986301