GithubHelp home page GithubHelp logo

michalliu / android-ffmpeg-x264 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from halfninja/android-ffmpeg-x264

0.0 1.0 0.0 5.1 MB

INACTIVE, UNSUPPORTED - Android Videokit - basic FFMPEG+X264 build for Android. Pull requests gratefully accepted.

Makefile 0.55% Shell 1.19% C 97.34% Java 0.92%

android-ffmpeg-x264's Introduction

Read me first (that’s why I’m at the top!)

I’m not going to be working on this at all for the forseeable future, and I won’t have time to answer questions about why it doesn’t compile on your platform or has something missing.

There are a few forks of this project on GitHub where a few people have updated it and improved on the scripts. Check them out!

Android Videokit

This is a repository to make it relatively simple to fetch and build the latest FFMPEG and libx264 to run on Android, using the Android NDK. It differs from most of the other NDK FFMPEG building packages in that it uses configure and make to build the libraries, and only a very small Android.mk file to pack it into a shared library, rather than a large handful of custom Android.mk scripts (there are still a few script files but most of them are pretty small or are lists of configure options). Big custom Android.mk files tend to break as soon as any files move around in the FFMPEG project, whereas here it should keep working with the latest libraries.

There is a skeletal JNI interface – the version here simply supplies run(String[]) which is passed to ffmpeg.c’s origin main() function. Once I’ve got this properly encoding again, I’ll make some more convenient methods.

How to build it

You’ll need to git clone in order to have access to the submodules. You might be able to use a ZIP download but then you’ll have to skip the init-submodules step and acquire FFmpeg and x264 from elsewhere; if you do this and something doesn’t work then I really can’t help you. Use git, it’s good!

First time stuff:

  1. Clone using the --recursive switch. (Or clone normally and run ./init-submodules.sh to pull in the FFMPEG and libx264 submodules.)
  2. cd Project/jni
  3. do export NDK=~/apps/android-ndk-r5c using the actual path of your Android NDK.
  4. Run ./create_toolchain.sh to install a local copy of the standalone toolchain

Each time the 3rd party libraries change:

  1. Run ./config_make_everything.sh to configure and make libx264 and FFMPEG.
  2. ndk-build (make sure the NDK is in your $PATH)
  3. If all is well, you should find libs/armeabi/videokit.so.

You can edit jni/videokit/jni_interface.c to do whatever you want with the built libraries – if you make any changes to it, just run ndk-build to link it together with the static libraries.

Options

  • minimal_featureset – on by default – only compiles in a small number of codecs (specifically, JPEG decoding and x264 encoding). Change to 0 in settings.sh if you want everything, or just add whatever configure flags you like to pick the codecs and things that are useful to you.
  • If you have already created a standalone toolchain, just edit settings.sh to make the PATH point at its bin directory. Then you don’t need to run create_toolchain.sh. If you have compilation problems, it’s worth making a fresh toolchain in case you’re using a slightly older version.

Updating submodules

The FFMPEG and X264 submodules will initially be fetched from a specific commit. If you want to try building with the latest, just go into each of those submodules and do a `git pull origin master`. FFMPEG tends to change quite a lot so don’t be surprised if it fails to build. If you get it working again with the latest, I’ll gladly patch my project with your changes.

android-ffmpeg-x264's People

Contributors

halfninja avatar

Watchers

 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.