However, because ijkplayer has not been updated for many years, it can only be compiled and run on older platforms according to the way of package guide, for example, the Android platform supported by ijkplayer is limited to API 9~23, and the iOS platform supported by iOS is limited to iOS 7.0~10. In order to make ijkplayer work properly on newer development environments, you need to cross-compile ijkplayer's so files on Linux before you can import and call the so libraries in your app project. Here is how to compile ijkplayer's so library on Linux.
I. Preparing the Linux compilation environment
First install the compilation tool by executing the following command on your Linux system.
Then execute the following command to temporarily resize the tmp partition to ensure that the system has enough temporary space to avoid failing to decompress large files.
Second, install Android's SDK and NDK
Execute the following commands in order to download and install the SDK for Android, be careful not to use too high a version of the SDK, because ijkplayer does not adapt to high versions of the SDK.
Execute the following commands in order to download and install Android NDK, pay attention not to use too high version of the NDK, because ijkplayer is not adapted to a high version of the NDK, the official recommendation is to use the r10e version of the NDK can be.
Execute the following environment variable setting commands to set the environment variable ANDROID_SDK for the SDK and ANDROID_NDK for the NDK, respectively.
Three, download and compile ijkplayer
First execute the following command to download the ijkplayer source package.
Execute the following command again to check and initialize ijkplayer's Android compilation environment.
Then execute the following commands to compile the openssl and ffmpeg libraries needed by ijkplayer and the ijkplayer so library respectively. The reason why we add "arm64" to the end of the three scripts is to compile only the so files that are adapted to the arm64 directive.
If everything goes well, you can see the three compiled so libraries in the ijkplayer/android/ijkplayer/ijkplayer-arm64/src/main/libs/arm64-v8a directory: , , , . Copy the entire libs directory containing the three so files to the libs directory of the app project to complete the ijkplayer so library import.
For more details on FFmpeg development see