1、使用Ubuntu系统编译ijkplayer

不要使用windows系统编译,里面坑太多,如果不方便可以直接使用我编译好的,下面附上地址。

  • 安装git,curl,yasm
  • 设置环境变量
    export ANDROID_SDK=
    export ANDROID_NDK=
  • 下载代码切换分支
    git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-android
    cd ijkplayer-android
    git checkout -B latest k0.8.4
    ./init-android.sh

  • 设置编译项

    1. If you prefer more codec/format
      cd config
      rm module.sh
      ln -s module-default.sh module.sh
      cd ../android/contrib
    2. If you prefer less codec/format for smaller binary size (include hevc function)
      cd config
      rm module.sh
      ln -s module-lite-hevc.sh module.sh
      cd ../android/contrib
    3. If you prefer less codec/format for smaller binary size (by default)
      cd config
      rm module.sh
      ln -s module-lite.sh module.sh
      cd ../android/contrib
  • 编译
    1. cd android/contrib
      ./compile-ffmpeg.sh clean
      ./compile-ffmpeg.sh all
    2. cd ..
      ./compile-ijk.sh all
  • 导入androidstudio

2、下载地址

github

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐