FFMpeg & x264 compile for using with Android NDK on Mac OSX
来源:互联网 发布:linux 在线安装ant 编辑:程序博客网 时间:2024/05/17 00:57
1. Toolchain for compile (This NDK version is r8)
a. Android’s NDK allows we to create toolchain installation using “make-standalone-toolchain.sh” script.
b. Execute like below.
$> /home/bywyu/android/android-ndk-r8b/build/tools/make-standalone-toolchain.sh –platform=android-14 –install-dir=/home/bywyu/work/video/lib/x264/build/new-android-toolchain
c. You can use directly with PATH, CC setting.
export PATH=/home/bywyu/work/video/lib/x264/build/arm-linux-androideabi-4.6/bin:$PATH
export CC=arm-linux-androideabi-gcc
d. Done
2. Compile & Build x264 project for FFMpeg library.
a. Download x264 project (http://www.videolan.org/developers/x264.html)
b. Configuration for arm compile. (prefix option is very important for FFMpeg compiling.)
$> ./configure –host=arm-linux \
–cross-prefix=arm-linux-androideabi- \
–enable-shared \
–enable-static \
–prefix=/home/bywyu/work/video/lib/x264/build/arm-linux-androideabi-4.6/sysroot/usr
c. make / install
$> make
$> make install
d. Done. You can find the library & include files in –prefix option’s directory.
3. Compile & Build FFMpeg project.
a. Download FFMpeg source code from http://ffmpeg.org/download.html (This case is FFmpeg 0.10.3 “Freedom” version)
b. Configuration for arm compile.
$> ./configure –enable-shared \
–enable-libx264 \
–cross-prefix=arm-linux-androideabi- \
–enable-cross-compile \
–target-os=linux \
–arch=arm \
–enable-gpl \
–prefix=/work/my-android-toolchain/sysroot/usr
c. Configuration for detailed module selection.
$> ./configure –prefix=../ffmpeg_build \
–enable-gpl \
–enable-shared \
–disable-doc \
–disable-ffmpeg \
–disable-ffplay \
–disable-ffprobe \
–disable-ffserver \
–disable-avdevice \
–disable-debug \
–disable-network \
–disable-protocols \
–disable-devices \
–disable-encoders \
–disable-decoders \
–disable-muxers \
–disable-demuxers \
–disable-parsers \
–disable-bsfs \
–disable-filters \
–enable-encoder=h264 \
–enable-libx264 \
–extra-cflags=-U__STRICT_ANSI__ \
–target-os=linux \
–extra-cflags=”-fno-short-enums” \
–extra-ldflags=”-mandroid -lm” \
–enable-cross-compile \
–cross-prefix=arm-linux-androideabi- \
–arch=arm
d. Make
$> make
e. Make install
$> make install
f. Done. You can see the library and header in ../ffmepg_build directory (in the prefix option)
http://bongjaemoon.wordpress.com/2012/05/25/ffmpeg-x264-compile-for-using-with-android-ndk-on-mac-osx/
a. Android’s NDK allows we to create toolchain installation using “make-standalone-toolchain.sh” script.
b. Execute like below.
$> /home/bywyu/android/android-ndk-r8b/build/tools/make-standalone-toolchain.sh –platform=android-14 –install-dir=/home/bywyu/work/video/lib/x264/build/new-android-toolchain
c. You can use directly with PATH, CC setting.
export PATH=/home/bywyu/work/video/lib/x264/build/arm-linux-androideabi-4.6/bin:$PATH
export CC=arm-linux-androideabi-gcc
d. Done
2. Compile & Build x264 project for FFMpeg library.
a. Download x264 project (http://www.videolan.org/developers/x264.html)
b. Configuration for arm compile. (prefix option is very important for FFMpeg compiling.)
$> ./configure –host=arm-linux \
–cross-prefix=arm-linux-androideabi- \
–enable-shared \
–enable-static \
–prefix=/home/bywyu/work/video/lib/x264/build/arm-linux-androideabi-4.6/sysroot/usr
c. make / install
$> make
$> make install
d. Done. You can find the library & include files in –prefix option’s directory.
3. Compile & Build FFMpeg project.
a. Download FFMpeg source code from http://ffmpeg.org/download.html (This case is FFmpeg 0.10.3 “Freedom” version)
b. Configuration for arm compile.
$> ./configure –enable-shared \
–enable-libx264 \
–cross-prefix=arm-linux-androideabi- \
–enable-cross-compile \
–target-os=linux \
–arch=arm \
–enable-gpl \
–prefix=/work/my-android-toolchain/sysroot/usr
c. Configuration for detailed module selection.
$> ./configure –prefix=../ffmpeg_build \
–enable-gpl \
–enable-shared \
–disable-doc \
–disable-ffmpeg \
–disable-ffplay \
–disable-ffprobe \
–disable-ffserver \
–disable-avdevice \
–disable-debug \
–disable-network \
–disable-protocols \
–disable-devices \
–disable-encoders \
–disable-decoders \
–disable-muxers \
–disable-demuxers \
–disable-parsers \
–disable-bsfs \
–disable-filters \
–enable-encoder=h264 \
–enable-libx264 \
–extra-cflags=-U__STRICT_ANSI__ \
–target-os=linux \
–extra-cflags=”-fno-short-enums” \
–extra-ldflags=”-mandroid -lm” \
–enable-cross-compile \
–cross-prefix=arm-linux-androideabi- \
–arch=arm
d. Make
$> make
e. Make install
$> make install
f. Done. You can see the library and header in ../ffmepg_build directory (in the prefix option)
http://bongjaemoon.wordpress.com/2012/05/25/ffmpeg-x264-compile-for-using-with-android-ndk-on-mac-osx/
- FFMpeg & x264 compile for using with Android NDK on Mac OSX
- compile x264 for Android on Mac
- compile x264 for Android on Mac
- ffmpeg compile with neon support for android
- Qt for Android on Mac OSX部署
- How to Compile SQLite for Android using NDK
- android ndk 编译ffmpeg+x264
- compile ffmpeg for android
- Compile ffmpeg for Android
- ffmpeg for mac osx 64bit 小记
- Ubuntu 14.04 Build FFmpeg with ndk for Android
- qmake for simple makefile on mac osx
- Compile mplayer for arm with xvid and x264
- http://www.roman10.net/how-to-compile-sqlite-for-android-using-ndk/
- Compile libx264 with android-ndk-r4b
- FFmpeg for Android compiled with x264, libass, fontconfig, freetype and fribidi
- Compile zmap in Mac OSX
- <android编译ffmpeg+x264+faac> <Android/NDK环境下FFmpeg及AAC,MP3,X264的编译>
- SVN 网址
- 使用Servlet实现文件下载的时候,避免浏览器自动打开文件
- Error: Can't continue timing simulation because delay annotation information for design is missing
- Visual studio 2008 Winforms程序安装部署说明——图解
- WMware 网络设置
- FFMpeg & x264 compile for using with Android NDK on Mac OSX
- Java中getResourceAsStream的用法
- D_REENTRANT宏
- 标签因结构而生
- 开发板+GSM模块彩信发送实现
- C#匿名类型
- 对ListView新的理解
- 程序员不成熟的若干个特征
- Android自带播放器字符串显示乱码问题的一个解决方法