-
-
Notifications
You must be signed in to change notification settings - Fork 797
Building ffmpeg executable on Android
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 fail building mobile-ffmpeg
.
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
You will see the following logs in your build.log
file. Just ignore them, because they are about building mobile-ffmpeg
, you can find ffmpeg
and ffprobe
binaries under the prebuilt/android-<arch>/ffmpeg/bin
path.
Android NDK: ERROR:jni/ffmpeg/Android.mk:avcodec: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/ffmpeg/../../../prebuilt/android-arm/ffmpeg/lib/libavcodec.so exists or that its path is correct
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.
Copyright (c) 2018-2021 MobileFFmpeg