Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Building ffmpeg executable on Android

Taner Sener edited this page Jan 19, 2020 · 10 revisions

Current versions of build scripts do not create ffmpeg and ffprobe binaries but it is possible to generate them by applying the following changes.

In build/android-ffmpeg.sh

1. Delete --disable-programs line

2. Change --disable-static line to --enable-static

3. Change --enable-shared line to --disable-shared

After applying these changes, android.sh will create ffmpeg and ffprobe binaries under the prebuilt/android-<arch>/ffmpeg/bin path.

Script itself will fail while building mobile-ffmpeg. But ignore this error, mobile-ffmpeg can't use ffmpeg and ffprobe, that's why the build fails.

Building arm-v7a-neon platform on API level 24

ffmpeg: ok

Building arm64-v8a platform on API level 24

ffmpeg: ok

Building x86 platform on API level 24

ffmpeg: ok

Building x86-64 platform on API level 24

ffmpeg: ok

mobile-ffmpeg: failed

Please note that openh264, snappy, tesseract and x265 libraries need to be linked with a c++ library and scripts are configured to use libc++_shared.so. So if you enable them, you need to copy libc++_shared.so as well.

Clone this wiki locally