(FFmpeg README is listed below) ffmpeg4android is a "source" project for Android NDK, which contains latest FFmpeg modules (without bins), and ANDROID-USE-ONLY libraries compiled with all decoders and x264/aac encoders.
NOTICE: If what you need, are "how to use FFmpeg" rather than "how to compile FFmpeg" or "how FFmpeg works", PLEASE goto FFmpegAdapter directly.
Please make sure, before you follow "How to xxx" below, you already knew what's ndk-build, environment-variable and similar basic technologies.
##How to use
- Download Android NDK
- Put the whole
ffmpeg-2.x/*folder (actually, onlyffmpeg-2.x/android/*is enough.) under$NDK_HOME/sources/ffmpeg4android/ - Add reference
$(call import-module, ffmpeg4android/android/arm)intoAndroid.mkof your project with NDK. - Now ndk-build should work. Tada~
##How to compile shared libraries (DEFAULT)
- Add path of ndk10 as environment variable :
$NDK_HOME - If you want to compile with x264, you need x264android at first. Then add x264 path as environment variable :
$X264_HOME - Now you can run
./build.sh FFMPEG_CODES_FOLDERto compile. Tada~
##How to compile static libraries (BE CARE : LGPL limitation)
- Follow step 1 and 2 of "How to compile (shared libraries)"
- Use
--enable-staticinstead of--disable-staticinbuild_android.sh - Now you can run
build.sh FFMPEG_CODES_FOLDERto compile static libraries. Tada~ - One more thing, modify
Android.mk, usePREBUILT_STATIC_LIBRARYinstead ofPREBUILT_SHARED_LIBRARY; And uselib***.ainstead oflib***.so
##Notice
- Now the
build_android.shincludesall decodersbut onlyaac and x264 encoders, if you need more, please modify it and re-compile. BTW, per X264, please follow GPL license. ffmpegfolder (notffmpeg-2.x) contains latest build (newer thanffmpeg-2.4but not stable), be care.- Codes newer than
ffmpeg 2.4, useAndroid_newer.mk; otherwise, useAndroid.mk.
##Environment Android NDK only.
##License Should be same as FFmpeg...
##Contact
Any problems please contact me @ffmpeg4android or chloette.e@gmail.com
FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.
libavcodecprovides implementation of a wider range of codecs.libavformatimplements streaming protocols, container formats and basic I/O access.libavutilincludes hashers, decompressors and miscellaneous utility functions.libavfilterprovides a mean to alter decoded Audio and Video through chain of filters.libavdeviceprovides an abstraction to access capture and playback devices.libswresampleimplements audio mixing and resampling routines.libswscaleimplements color conversion and scaling routines.
- ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
- ffplay is a minimalistic multimedia player.
- ffprobe is a simple analisys tool to inspect multimedia content.
- Additional small tools such as
aviocat,ismindexandqt-faststart.
The offline documentation is available in the doc/ directory.
The online documentation is available in the main website and in the wiki.
Conding examples are available in the doc/example directory.
FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.