GithubHelp home page GithubHelp logo

be-water-myfriend / android_ffmpeg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shikinchen/android_ffmpeg

0.0 0.0 0.0 217.58 MB

基于ndk17编译的Android FFmpeg的脚本 集成了x264和fdk-aac

Shell 100.00%

android_ffmpeg's Introduction

编译环境

  • mac os 10.14

主要依赖以下库进行编译

库名 版本 下载地址
FFmpeg 4.1 http://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2
X264 x264-snapshot-20181206-2245-stable http://download.videolan.org/x264/snapshots/x264-snapshot-20181206-2245-stable.tar.bz2
fdk-aac 2.0.0 https://jaist.dl.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-2.0.0.tar.gz
lame lame-3.100 https://nchc.dl.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
ndk android-ndk-r17c-darwin-x86_64 https://dl.google.com/android/repository/android-ndk-r17c-darwin-x86_64.zip

编译步骤

  1. 用终端去到当前项目目录用命令赋予脚本权限
chmod +x *.sh
  1. 下载和解压库

    用终端去到当前项目目录运行download-file.sh自动下载除了ndk的库并且自动解压

    ./download-file.sh

    或者根据上面提供的连接手动下载,然后将FFmpeg X264和fdk-aac解压好的文件夹放到当前项目目录下 如果需要改版本或者文件夹名 分别修改 build-fdk-aac-android.sh build-x264-android.shbuild-ffmpeg-android.sh 里面的参数 但是不保证用其他版本能编译通过

  2. 设置NDK_ROOT路径

    export NDK_ROOT=ndk路径

    或者在.bash_profile文件配置NDK_ROOT环境变量

    echo 'export NDK_ROOT=ndk路径' >>~/.bash_profile
    source ~/.bash_profile
  3. 用终端去到当前项目目录运行 build-ffmpeg-x264-aac-android.sh

    ./build-ffmpeg-x264-aac-android.sh
  4. 编译完成后在当前项目目录的 ffmpeg_android 文件夹有对应不同架构的so文件和头文件

android_ffmpeg's People

Contributors

aosp-11-lubancat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.