(x264 README is listed below) x264android is a source project for Android NDK, which contains latest X264 codecs, and ANDROID-USE-ONLY libraries compiled with x264 encoders
Please make sure, before you follow "How to xxx" below, you already knew what's ndk-build
, environment-variable
and similar basic technologies.
##How to use
- Download Android NDK
- Put the whole
x264/*
folder (actually, onlyx264/android/*
is enough.) under$NDK_HOME/sources/x264/
- Add reference
$(call import-module, x264/android/arm)
into Android.mk of your project with NDK. - Now ndk-build should work. Tada~
##How to compile static libraries (DEFAULT) (BE CARE : LGPL limitation)
- Add path of ndk10 as environment variable :
$NDK_HOME
- Now you can copy
build_android.sh
into x264 folder and run it to compile. Tada~
##How to compile shared libraries
- Follow step 1 and 2 of "How to compile (shared libraries)"
- Use
--enable-shared
instead of--enable-static
inbuild_android.sh
- Now you can run
build_android.sh
to compile shared libraries. Tada~ - One more thing, modify
Android.mk
, usePREBUILT_SHARED_LIBRARY
instead ofPREBUILT_STATIC_LIBRARY
; And uselib***.so
instead oflib***.a
BTW, If want to compile into ffmpeg, please use @ffmpeg4android directly.
##Environment Android NDK only. T_T
##License Should be same as x264...
##Contact
Any problems please contact me @x264 or chloette.e@gmail.com
##x264
x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format, and is released under the terms of the GNU GPL.