android下打算使用ffmpeg的 drawtext ,不过需要 --enable-libfreetype 但是freetype是个第三方库,所以需要先编译freetype,然后再编译ffmpeg
在网上找了个好的教程:
https://github.com/hiteshsondhi88/ffmpeg-android.git
https://github.com/farsitel/android_external_fribidi
网址:https://github.com/hiteshsondhi88/ffmpeg-android
网址2:https://github.com/julienr/libfreetype-android
编译流程:
- 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 ./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 location of your FONTCONFIG configuration file).
- You can also download prebuilt-binaries.zip prebuilt-binaries.tar.gz here.