1.copy follow file to ffmpeg directory.
build_android_dynamic.sh
build_android_static.sh
configure
2.make sure the script is executable by the command below
chmod +x build_android_dynamic.sh
chmod +x build_android_static.sh
chmod +x configure
3.compile dynamic lib or static lib
compile dynamic lib:
./build_android_dynamic.sh
compile static lib:
./build_android_static.sh
lib position:
./android/arm
----------------------------------
configure file from follow update
----------------------------------
Open configure file with a text editor, and locate the following lines.
------------------------------------------------------------------------
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
This cause ffmpeg shared libraries to be compiled to libavcodec.so.<version> (e.g. libavcodec.so.55), which is not compatible with Android build system. Therefore we��ll need to replace the above lines with the following lines.
------------------------------------------------------------------------
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
SLIB_INSTALL_LINKS='$(SLIBNAME)'
- 1
- 2
前往页