Could anyone please give a more specific explanation on library
compilation? So I have downloaded the library file, extracted it into
myProject/external. Then what? I am stuck after the line "Initialize
Android build environment" at the Readme file.
Apparently, You are not using the library in the right way. As stated in project description "FFmpeg for Android is a set of Android makefiles which enable configuration and building FFmpeg library under Android source code tree with Android NDK."
So, You need full Android source code to build the library. But, You are trying to build it inside Your project, without full Android source code. This project is not intended to be used the way You are using it.
However, there are two solutions for you.
First, there is extension to the makefiles written by Sergii Pylypenko here. With it, You can build FFmpeg without Android source code. Ask Sergii for more details...
Second, You may use appropriate standalone toolchain and build libraries independently of Android source code or Your project source code, and then add binaries in your project as prebuilts. Download Android NDK from here, unpack, and follow instructions in NDK_ROOT/docs/STANDALONE-TOOLCHAIN.html. There, you will find instructions on how to create standalone cross toolchain. There are also explanations about what is good and what is bad in using
standalone compiler. Once you have standalone toolchain, You may configure and build FFmpeg in a "usual" ./configure, make way. Ask FFmpeg support for moree help on how to do it.
You should also be aware there may be important or even critical differences between system root from downloaded NDK, system root found in Android source code as prebuilt and system root on a system image built from Android source code, so You need to double check that the library built by standalone toolchain actually works on a target device.
I have created a standalone toolchain for NDK version r8e using the above link.I have downloaded latest ffmpeg and compiled by ./configure;make all.The binaries are created except for libpostproc and libavresample. Is it possible to use the generated libraries to make a shared library and executable files for ffmpeg by using these in Android.mk file.The shared library should use ffmpeg.c as well to call the main method.
Also where can i find the full Android source code(what this means) for this method?
Can you give the steps to follow for this please?
Yes, it is possible to use these libraries, You will just link them differently.
Instead of adding library name in LOCAL_SHARED_LIBRARIES, You should add link parameter to LOCAL_LDFLAGS. Check gcc documentation for all available options to -l flag.
LOCAL_LDFLAGS will be added to the command line when calling a linker.
libpostproc is gpl licensed, and it will not be compiled unless there is ./configure parameter --enable-gpl.
libavresample, contrary to all other libraries, must be specifically enabled with ./configure parameter --enable-avresample.
Full android source code is available here:
Start your reading here:
There you wil lfind instructions on how to download source code, prepare your building environment and build android for various platforms.
At this moment, Android cant be built on Windows, just on Linux and MAC.
If you do not have any of these, consider using virtual machine.
You need to use 64-bit platform.
Althought Ubuntu 10.04 is recomended for building, You can use 12.04 LTS.
Compiling android from source code is time consuming process. Expect few hours on 3GHz Core i5 laptop with 8GB of RAM.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.