


Import the compiled include header file into the CPP file.After compilation, an out-FFmpeg file will be generated in the ffmpeg4.2.2 directory and exported to the project Android Studio configuration 1. Note: If there is an error during compilation (generally there will be red error at the beginning), part of the need to install other libraries, please refer to the detailsĥ. out-ffmpeg/$ARCH # Replace this path with the current NDK path TOOLCHAIN=/home/jiang/ffmpeg/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64 /configure \ -prefix=$prefix \ -disable-static \ -enable-shared \ -enable-small \ -enable-gpl \ -disable-doc \ -disable-programs \ -disable-avdevice \ -enable-cross-compile \ -target-os=android \ -arch=$ARCH \ -cc=$TOOLCHAIN/bin/$ARCH2-linux-android$API-clang \ -cross-prefix=$TOOLCHAIN/bin/$ARCH2-linux-android- Make clean make -j4 make install Copy the code

This script file is used for configuration and compilation. Copy the following code into the android_build.sh script file under ffmpeg. This step basically names so as the common Android so nameĤ. SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)' Replace with SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)' SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)' Search LIB_INSTALL_EXTRA_CMD SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)' Go to the ffmpeg4.2.2 directory and modify the configure file in the root directory Decompress ffmepg to tar -xvjf ffmPEG-4.2.2.tar.bz2ģ. Sudo apt-get install unzip sudo apt-get install unzipĢ. Decompress the NDK and run the unzip android-ndk-r21e-liunx-x86_64.zip command by Murray Wilkinson Category:Ĭompilation environment: Ubuntu16, you can download the latest version of VMWare and baidu permanent license or install Ubuntu on the serverĬonditional is best compiled in Liunx platform, Windows platform compiled pit more, at the end of the article Github source code can be taken Begin to compileġ.
