Android about compilation Ijkplayer under so experience sharing

Source: Internet
Author: User

    • The company needs to do technical research on live broadcast, so we need to study the technology of the player. Just I collected ijkplayer on GitHub, I have not studied it before, now just clone down research.

I first in Windows install Cygwin compile, various error, various pits, decisively give up. Then use the VMware installed Ubuntu 16.04, one-time complete. Ha ha

So get to the chase!

Compiling the environment
Ubuntu 16.04
ndkr11b
Android SDK 24
Lantern (FQ tool, recommended installation,: Https://github.com/getlantern/lantern)

Prepare before compiling
1. Install git command: $ sudo apt-get install git

2. Install the YASM command: $ sudo apt-get install yasm

3. Configure Environment variables
Command: $sudo gedit ~./BASHRC
Add the following two environment variables
Export android_sdk= SDK Path
Export android_ndk= NDK Path

Start compiling
1. Download the project to the local
git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-android
CD ijkplayer-android
Git checkout-b latest k0.5.1

2. Perform initialization operations
./init-android.sh

3. Compiling ffmpeg
CD Android/contrib
./compile-ffmpeg.sh Clean
./compile-ffmpeg.sh All

4. Start compiling so
Cd..
./compile-ijk.sh All

Complete
If compiled correctly, it will be in ijkplayer-arm64, IJKPLAYER-ARMV5, ijkplayer-armv7a, ijkplayer-x86, ijkplayer-x86_64 of these items src/main/libs /corresponding name directory to generate libijkffmpeg.so, libijkplayer.so, libijksdl.so, respectively, the three so files

After the compilation is successful, import the directory Android/ijkplayer project into Android studio to run

Friendly Tips
Most of the problems that may arise are due to environmental variables, and it is recommended that you examine the environment variables carefully
Note: There are many problems with compiling in Windows environment, it is highly recommended to use Linux environment for compiling

Android about compilation Ijkplayer under so experience sharing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.