我正在关注本教程,进行了一些更改,我想添加opus支持,我认为添加选项--enable-libopus
是我所需要的,但没有,当我尝试使用 shell 编译时,我得到了错误:
配置文件
#!/bin/bash
export ANDROID_NDK=/home/ademar/android-ndk-r9
export TOOLCHAIN=$(pwd)/temp/ffmpeg
export SYSROOT=$TOOLCHAIN/sysroot/
$ANDROID_NDK/build/tools/make-standalone-toolchain.sh --platform=android-9 --toolchain=arm-linux-androideabi-4.8 --install-dir=$TOOLCHAIN
export PATH=$TOOLCHAIN/bin:$PATH
export CC=arm-linux-androideabi-gcc
export LD=arm-linux-androideabi-ld
export AR=arm-linux-androideabi-ar
CFLAGS="-O3 -Wall -mthumb -pipe -fpic -fasm \
-finline-limit=300 -ffast-math \
-fstrict-aliasing -Werror=strict-aliasing \
-fmodulo-sched -fmodulo-sched-allow-regmoves \
-Wno-psabi -Wa,--noexecstack \
-D__ARM_ARCH_5__ -D__ARM_ARCH_5E__ \
-D__ARM_ARCH_5T__ -D__ARM_ARCH_5TE__ \
-DANDROID -DNDEBUG"
EXTRA_CFLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=softfp -mvectorize-with-neon-quad"
EXTRA_LDFLAGS="-Wl,--fix-cortex-a8"
FFMPEG_FLAGS="--prefix=/tmp/ffmpeg/build \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--cross-prefix=arm-linux-androideabi- \
--enable-shared \
--disable-symver \
--disable-doc \
--disable-ffplay \
--disable-ffmpeg \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-avfilter \
--disable-encoders \
--disable-muxers \
--disable-filters \
--disable-devices \
--disable-everything \
--enable-protocols \
--enable-parsers \
--enable-demuxers \
--disable-demuxer=sbg \
--enable-decoders \
--enable-bsfs \
--disable-network \
--enable-swscale \
--enable-asm \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-nonfree \
--enable-version3"
cd ffmpeg
./configure $FFMPEG_FLAGS --extra-cflags="$CFLAGS $EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS"
错误:
ERROR: opus not found
If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "config.log" produced by configure as this will help solving the problem.
如果想要我可以发布config.log
内容,但它很大。
在文件夹 ffmpeg 我有一个来自 source.ffmpeg.org 分支的 git clonerelease/1.2