SoFunction
Updated on 2025-04-10

Fully automatic compilation script and final compilation package of ijkPlayer player

ijkPlayer compiles full format support .so library basic steps

  • Pull the docker image
//Execute the following command on the command linedocker pull adajqd/ijkplayer-buildenv:1.0
  • Check in the native docker directoryijkplayerProject, if you have an agent, it is best to hang up the agent yourself.
# 2. Execute the command clone to bring ijkplayer clone to the local"I don't need to do steps 5, 6, 7 by cloning this repository, I did it in this repository"
git clone /jsonzcz/ ijkplayer-android
"Clone this repository library requires you to do the steps 5, 6, 7 yourself"
git clone /Bilibili/ ijkplayer-android
  • Start docker and mount the specified directory
# docker run -it -v Host directory 1: directory 1 IMAGEID# Host directory 1 is the directory of the check projectdocker run -it -v /Users/koolearn/Downloads/docker/ijkplayer-android:/opt/ijkplayer-android 776a4c5affdd
  • Enter the docker command line (because the command line automatically enters the container after execution of 3, so it can be omitted here)
docker exec -it Container name /bin/bash
  • Create an automated initialization script, put it under /opt/ijkplayer-android
# 1. Enter the source code directorycd /opt/ijkplayer-android
# 2. Refresh system environment variablessource ~/.profile
# 3. Specify branchgit checkout -B latest k0.8.8
# 4. Full Compilationcd config
rm 
ln -s  
  • Manual part Note if checkThe following modifications are not required for the projects in the warehouse. Because I have already modified them
1. turn up""and""document
 Will "  --toolchain=$FF_TOOLCHAIN_NAME \ Afterwards --system=linux-x86_64  "
 2. Find ""document
在document尾最后增加 export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-linux-perf"
  • Create automated compilation scripts, put it under /opt/ijkplayer-android
# Handle environment variablessource ~/.profile
# Switch to project directorycd /opt/ijkplayer-android
#initialization./
#Download OpenSSL./
#Switch to the Android/contrib directory, and compile the script in this directorycd android/contrib
#Compile OpenSSL./ clean
./ all
#Or replace all with armv7a arm64, and only compile these two architectures (it seems not very easy to use, so use all)#Compile FFmpeg./ clean
./ all
#Or replace all with armv7a arm64, and only compile these two architectures (it seems not very easy to use, so use all)#Return to the ijkplayer/android directory and compile the ijkplayer's so librarycd ..
./ all
#Or replace all with armv7a arm64, and only compile these two architectures (it seems not very easy to use, so use all)
  • Just run the following command
cd /opt/ijkplayer-android
./
./

Partial explanation

  • Always not understanding when developinggit checkout -B latest k0.8.8This command finally arrived at Baidu:

git checkout -b tag-1.4.2 1.4.2

Create a new branch with the name tag-1.4.2 and check the remote version of 1.4.2 tag to the local

If you are too lazy to compile, you can use the so package I compiled directly.

git clone /jsonzcz/ ijkplayer-android

Just in the project folder ijkplayer-android->libs directory, ijkPlayer supports https full package.zip.
Just copy it directly, support armv7a and arm64

The above is the detailed content of the fully automatic compilation script and final compilation package of the ijkPlayer player. For more information about the compilation of ijkPlayer player, please pay attention to my other related articles!