0 0 0 0


I want to configure FFMPEG in android studio but i cant get any document or link for that. Github on many FFMPEG lib available for android but that all are with old version. And how to run command in android? and i want to know after configure FFMPEG then how can we run FFMPEG commands. Help me for that. thanks advance.

I have used below links but not success in for latest version.

Best Answer:

The latest version of FFMPEG is 3.1.1, Just released before 12 days. So i think there is no readily available demo like this old one.

We need to build the FFMPEG library on our own. Some questions i found just pasting here that might help you. (Not tested)

How to Build FFmpeg for Android

  • Compiling FFmpeg 2.3 with Android NDK r10
  • How to compile ffmpeg-2.5.3 on windows with android-ndk-r10d
  • How to compile ffmpeg-2.2.2 on windows with cygwin and android ndk r9c
  • How to buid ffmpeg with android-ndk-r10d in windows
  • You need to compile it on your own the by downloading Android NDK & Latest Version of FFMPEG.

    One tutorial is also there : How to Build FFmpeg for Android. This is quite old so you just need to change the versions mentioned here. For FFMPEG it will be 3.1.1 & NDK it will be r12b.

    Building FFMPEG with NDK r12b:

  • Download Android NDK : The latest version of Android NDK can be downloaded at Android NDK website. At the time of writing this answer, the newest version is NDK r12. simply decompress the archive

  • Download ffmpeg source code : FFMPEG source code can be downloaded from the ffmpeg website. The latest stable release is 3.1.1 (at the time of writing). Download the source code and decompress it to $NDK/sources folder.

  • Update configure file : Open ffmpeg-3.1.1/configure file with a text editor, and locate the following lines.


    This cause ffmpeg shared libraries to be compiled to (e.g., which is not compatible with Android build system. Therefore we’ll need to replace the above lines with the following lines.

  • Build ffmpeg : Copy the following text to a text editor and save it as in ffmpeg_3.1.1 folder.

        function build_one
                --extra-cflags="-Os -fpic $ADDI_CFLAGS"
            make clean
            make install

    Once the file is saved, go to the directory where this file lies & execute the command below,

    sudo chmod +x

    Then execute the script by the command,

  • Build Output : The build can take a while to finish depending on your computer speed. Once it’s done, you should be able to find a folder $NDK/sources/ffmpeg-3.1.1/android, which contains arm/lib and arm/include folders.

  • Make ffmpeg Libraries available for Your Projects
  • Steps above are fully tested and i performed them on my machine and the build was successful. For writing this answer i have took the reference from this article How to Build ffmpeg with NDK r9 but as it was for older version i have made some corrections on my own.

    Open for asking any doubts.

    Copyright © 2011 Dowemo All rights reserved.    Creative Commons   AboutUs