標籤:
android下打算使用ffmpeg的 drawtext ,不過需要 --enable-libfreetype 但是freetype是個第三方庫,所以需要先編譯freetype,然後再編譯ffmpeg
在網上找了個好的教程:
https://github.com/hiteshsondhi88/ffmpeg-android.git
網址:https://github.com/hiteshsondhi88/ffmpeg-android
編譯流程:
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 ./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.
FFmpeg for Android compiled with x264, libass, fontconfig, freetype and fribidi