Search code examples
javaandroid-ndkffmpegandroid-studioanimated-gif

Use ffmpeg to Convert Video to Gif android studio


I am currently making a simple Androidapp that converts a video from the SD card into a gif.

I learnt ffmpeg is the most efficient method to handle the conversion. But I have no idea how to add ffmeg to my android studio project.


Solution

  • for JNI, NDK/AS you could start with this

    and then check that users (ph0b) SO posts regarding JNI/NDK

    Then ffmpeg on android is a pretty tall order for which you will need some time.

    Search 'android-ffmpeg' on github looking for highest community rating ( stars, clones, ) and with good build instructions.

    IMO - 'guardianproject' and 'halfninja' are good.

    You could spend some time outside of android ( just building ffmpeg static libs on a VM ) so you are familiar with just the config/build on ffmpeg.

    Then, go to full android studio, using ph0b integration technique for running NDK/build inside gradle builds, using the alterations to gradle in his blog post.