compilation issues

Gleb
2013-05-13
2013-07-22
  • Gleb

    Gleb - 2013-05-13

    Hi!

    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.

     
  • Obucina

    Obucina - 2013-05-13

    Hello Gleb,

    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.

    Regards

     
  • Obucina

    Obucina - 2013-05-13

    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.

    Regards

     
    Last edit: Obucina 2013-05-13
  • vijay ramasamy

    vijay ramasamy - 2013-07-19

    Hello Obucina,
    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?

     
  • Obucina

    Obucina - 2013-07-22

    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.

     
  • Obucina

    Obucina - 2013-07-22

    Full android source code is available here:

    http://source.android.com/

    Start your reading here:

    http://source.android.com/source/index.html

    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.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks