gpt4 book ai didi

android - 使用 ffmpeg for Android 编译 x265 并接收错误

转载 作者:行者123 更新时间:2023-12-04 23:13:51 31 4
gpt4 key购买 nike

尝试编译 x265 以用于 arm64-v8a。成功构建 x265 本身后,当 ffmpeg 即将编译时,我收到以下错误:

require_pkg_config libx265 x265 x265.h x265_api_get
check_pkg_config libx265 x265 x265.h x265_api_get
test_pkg_config libx265 x265 x265.h x265_api_get
/root/ffmpeg_android/ffmpeg-android-1.6.3/ffmpeg-pkg-config --exists --print-errors x265
check_func_headers x265.h x265_api_get -I/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/include/x265 -L/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/lib -lx265
test_ld cc -I/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/include/x265 -L/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/lib -lx265
test_cc -I/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/include/x265 -L/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/lib
BEGIN /tmp/ffconf.xKyjnplW/test.c
1 #include <x265.h>
2 #include <stdint.h>
3 long check_x265_api_get(void) { return (long) x265_api_get; }
4 int main(void) { int ret = 0;
5 ret |= ((intptr_t)check_x265_api_get) & 0xFFFF;
6 return ret; }
END /tmp/ffconf.xKyjnplW/test.c
/root/ffmpeg_android/ffmpeg-android-1.6.3/toolchain-android/bin/aarch64-linux-android-clang -DANDROID -fpic -fpie -march=armv8-a --sysroot=/root/ffmpeg_android/ffmpeg-android-1.6.3/toolchain-android/sysroot -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dstrtod=avpriv_strtod -DPIC -DANDROID -fpic -fpie -march=armv8-a -I/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/vpx/android/arm64-v8a/include -I/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x264/android/arm64-v8a/include/x264 -I/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/include/x265 -I/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/lame/android/arm64-v8a/include -DANDROID -fpic -fpie -march=armv8-a --static -mcpu=cortex-a57 -std=c11 -fPIE -fomit-frame-pointer -fPIC -I/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/include/x265 -L/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/lib -c -o /tmp/ffconf.xKyjnplW/test.o /tmp/ffconf.xKyjnplW/test.c
clang60: warning: argument unused during compilation: '-L/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/lib' [-Wunused-command-line-argument]
/root/ffmpeg_android/ffmpeg-android-1.6.3/toolchain-android/bin/aarch64-linux-android-clang -Wl,-z,defs -Wl,--unresolved-symbols=report-all -march=armv8-a -L/root/ffmpeg_android/ffmpeg-android-1.6.3/toolchain-android/sysroot -Wl,-z,relro -Wl,-z,now -L/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/vpx/android/arm64-v8a/lib -L/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x264/android/arm64-v8a/lib -L/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/lib -L/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/lame/android/arm64-v8a/lib -Wl,-z,defs -Wl,--unresolved-symbols=report-all -march=armv8-a -L/root/ffmpeg_android/ffmpeg-android-1.6.3/toolchain-android/sysroot -Wl,-z,relro -Wl,-z,now --static --sysroot=/root/ffmpeg_android/ffmpeg-android-1.6.3/toolchain-android/sysroot -mcpu=cortex-a57 -Wl,--as-needed -Wl,-z,noexecstack -fPIE -pie -I/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/include/x265 -L/root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/lib -o /tmp/ffconf.xKyjnplW/test /tmp/ffconf.xKyjnplW/test.o -lx265 -lgcc
clang60: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
/root/ffmpeg_android/ffmpeg-android-1.6.3/toolchain-android/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: skipping incompatible /root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/lib/libx265.a when searching for -lx265
/root/ffmpeg_android/ffmpeg-android-1.6.3/toolchain-android/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: skipping incompatible /root/ffmpeg_android/ffmpeg-android-1.6.3/jni/x265/android/arm64-v8a/lib/libx265.a when searching for -lx265
/root/ffmpeg_android/ffmpeg-android-1.6.3/toolchain-android/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lx265
clang60: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR: x265 not found using pkg-config

我使用 ffmpeg 4.1.3 和最新版本的 x265 源。我用 this项目编译,我在没有 x265 的情况下构建成功。我在 Debian Buster x64 上编译。

最佳答案

我最终使用了 this 中的脚本使用所有最新 NDK 和 ffmpeg 以及每个最新库的项目,以创建 ffmpeg 二进制文件。它在我的设备上运行良好,通过一些修改,我也得到了一个静态 ffmpeg。我只需要在我的应用程序中添加 2 个额外的本地库就可以了。它甚至使用所有 CPU 功能,因此它是最快的手机解决方案。

关于android - 使用 ffmpeg for Android 编译 x265 并接收错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56870200/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com