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

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐