Android is going to use FFmpeg's DrawText, but FreeType is a third-party library, so you need to compile FreeType first, and then compile FFmpeg
Found a good tutorial on the Internet:
Https://github.com/hiteshsondhi88/ffmpeg-android.git
Website: https://github.com/hiteshsondhi88/ffmpeg-android
Compilation process:
Instructions
- Set environment variable
- Export android_ndk={android NDK Base Path}
- Run following commands to compile FFmpeg
- sudo apt-get--quiet--yes install build-essential git autoconf libtool pkg-config gperf gettext yasm
- ./init_update_libs.sh
- ./android_build.sh
- To update submodules and libraries you can use the./init_update_libs.sh command
- Find the executable binary in build directory.
- If you want to use fontconfig then you need to specify your custom fontconfig config file (e.g-"fontconfig_file=/sdcard/ fonts.conf./ffmpeg--version ", where/sdcard/fonts.conf is the location of the your fontconfig configuration file).
- You can also download Prebuilt-binaries.zip prebuilt-binaries.tar.gz here.
FFmpeg for Android compiled with x264, Libass, Fontconfig, FreeType and Fribidi