[Libav-user] Can not load ffmpeg 3.4.1 under Android because link not found
Cooky
cookyinformation at gmail.com
Sat Jan 27 00:02:49 EET 2018
Hello,
I have successfully compiled FFmpeg 3.1.11 under Linux Ubuntu and it runs fine under Android (Version >4)
This script i used:
NDK=/home/urs/Documents/android-ndk-r12b
SYSROOT=$NDK/platforms/android-14/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
function build_one
{
./configure \
--prefix=$PREFIX \
--enable-shared \
--disable-static \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-doc \
--disable-symver \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}
CPU=armv7-a
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -march=$CPU"
build_one
with the same script i can also compile the version 3.4.1.
The problem is, if i try to load the libs under Android with
Java.Lang.JavaSystem.LoadLibrary("avutil-55");
Java.Lang.JavaSystem.LoadLibrary("swresample-2");
Java.Lang.JavaSystem.LoadLibrary("avcodec-57");
...
avutil-55 and swresample-2 load fine, but avcodec-57 fails with the error message:
Java.Lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "ff_h264_mediacodec_hwaccel" referenced by "/data/app/App12.App12-1/lib/arm/libavcodec-57.so"...
What can i do? Is there some libs i have to disable in the config script?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180126/ca6858b6/attachment.html>
More information about the Libav-user
mailing list