Skip to content

FFmpeg for Android compiled with LGPL license, openh264 & aac encoding only (Supports Android 4.1+), contains Kotlin wrapper module

Notifications You must be signed in to change notification settings

daentech/ffmpeg-android-kotlin

 
 

Repository files navigation

Android FFmpeg-openh264 converter

  • FFmpeg for Android compiled (encoders: aac & openh264)
  • Supports Android N
  • kotlin wrapper for FFmpeg (task queue)

Supported Architecture

Supported Host Environments

  • MacOS
  • Linux
  • Windows10 Linux Subsystem (NOTE: you have to set ANDROID_NDK_ROOT to LINUX version of Android SDK / NDK / build tools)

FFmpeg, openh2664 build instructions

  • Set environment variable default: ~/Android/Sdk/ndk-bundle
    or set it manually: export ANDROID_NDK_ROOT={Android NDK Base Path}
  • Run following commands to compile ffmpeg
    1. sudo apt-get --quiet --yes install build-essential git autoconf libtool pkg-config gperf gettext yasm python-lxml nasm
    2. ./update_modules.sh - update submodules and libraries
    3. ./build_android.sh - build ffmpeg & libopenh264
  • Find the executable binary in build/{arch}/bin directory.

Kotlin wrapper module instructions

  1. import ffmpegandroid module
  2. put your ffmpeg & libopenh264.so into kotlin-wrapper/ffmpegandroid/ffmpeg
  3. replace
  compile project(path: ':ffmpegandroid')

with

  debugCompile project(path: ':ffmpegandroid', configuration: "debug") // force compile debug module
  releaseCompile project(path: ':ffmpegandroid', configuration: "release")

in your app build.gradle file (dependencies section)

  1. usage example

TODO:

  • Update the version of the NDK used to the most recent
  • Update instructions for the latest Android studio
  • Update compilation instructions (Docker)

Licenses

  • FFmpeg: LGPL 3.0
  • openh264: BSD
  • kotlin wrapper: MIT
  • build scripts: MIT

Info

Inspired by WritingMinds java forks

About

FFmpeg for Android compiled with LGPL license, openh264 & aac encoding only (Supports Android 4.1+), contains Kotlin wrapper module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 54.1%
  • Shell 40.4%
  • Dockerfile 3.2%
  • C 1.6%
  • Makefile 0.7%