gpt4 book ai didi

android - FFMPEG 在 ubuntu 上为 android 构建

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

I am developing a media app which provides support for all video formats for implementing this feature we require FFMPEG the very best library for codecs. Compiling FFMPEG on windows for android is very long battle so I migrated to ubuntu I have almost compiled it shows the the binaries but it gives at last point following message


>AR libpostproc/libpostproc.a
AR libswresample/libswresample.a
AR libswscale/libswscale.a
AR libavcodec/libavcodec.a
AR libavutil/libavutil.a
INSTALL libavfilter/libavfilter.a
INSTALL libavformat/libavformat.a
INSTALL libavresample/libavresample.a
INSTALL libpostproc/libpostproc.a
INSTALL libswresample/libswresample.a
INSTALL libswscale/libswscale.a
INSTALL libavutil/libavutil.a
LD ffmpeg_g
INSTALL libavcodec/libavcodec.a
CP ffmpeg
STRIP ffmpeg
skipping strip ffmpeg
INSTALL install-progs-yes
INSTALL ffmpeg
/home/akshay/Desktop/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-ld: -: unknown option

Here is my script


#!/bin/bash
NDK=/home/akshay/Desktop/android-ndk-r9c
PLATFORM=$NDK/platforms/android-8/arch-arm
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86
PREFIX=./android-ffmpeg
function build_one
{
./configure --target-os=linux --prefix=$PREFIX \
--enable-cross-compile \
--enable-runtime-cpudetect \
--disable-asm \
--arch=arm \
#--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--disable-stripping \
#--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--sysroot=$PLATFORM \
--enable-nonfree \
--enable-version3 \
--disable-everything \
--enable-gpl \
--disable-doc \
--enable-avresample \
--enable-demuxer=rtsp \
--enable-muxer=rtsp \
--disable-ffplay \
--disable-ffserver \
--enable-ffmpeg \
--disable-ffprobe \
--enable-encoders \
--enable-decoders \
--enable-protocols \
--enable-hwaccels \
--enable-zlib \
--disable-devices \
--disable-avdevice \
--extra-cflags="-I/home/android-ffmpeg/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a" \
--extra-ldflags="-L/home/android-ffmpeg/lib"
make -j4 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -L$PREFIX/lib -soname libffmpeg.so -shared - nostdlib -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavfilter/ libavfilter.a libavresample/libavresample.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl - llog --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.8/libgcc.a
}
build_one

请告诉我脚本中的任何错误

最佳答案

-ldl 后面有一个未使用的“-” . '-' 和 'log' 之间的空格必须省略。

关于android - FFMPEG 在 ubuntu 上为 android 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21971973/

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