OSX 10.12.4でAndroid用のffmpegをコンパイルしようとしています。OSXでAndroid向けffmpegをコンパイルする
は、ここで私は、その後の手順です:
1°)hereからソースをダウンロードのpkg-config設定
をコンパイルします。 pkg-configフォルダにある& & cdを展開します。
export DST=/a/path/on/my/computer
./configure --with-internal-glib --prefix=$DST --exec-prefix=$DST
make -j2
make install
export PATH=$PATH:$DST/bin
2°)
がhereからソースをダウンロードしffmpegのコンパイルします。 ffmpegフォルダにある& & cdを抽出します。
export NDK=/path/to/android-ndk-r15c
export PLATFORM_VERSION=android-26
export ARCH=arm
export PLATFORM=$NDK/platforms/$PLATFORM_VERSION/arch-$ARCH
export TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
export PREFIX=$(pwd)/android/$ARCH
export ADDI_CFLAGS="-Os -fpic -marm"
export ADDI_CONFIGURE_FLAG=""
export ADDI_LDFLAGS=""
./configure \
--prefix=$PREFIX \
--enable-shared \
--disable-static \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-symver \
--disable-avdevice \
\
--pkg-config=pkg-config \
\
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=$ARCH \
--enable-cross-compile \
--sysroot=$PLATFORM \
--extra-cflags="$ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
\
$ADDI_CONFIGURE_FLAG
make -j2
メイクは、次のエラーで失敗します。それは修正され、なぜ私はA1 A0 &にソースにB0 & B1変数の名前を変更することにより、そのエラーを修正することができるよ
AR libavfilter/libavfilter.a
AR libavformat/libavformat.a
CC libavcodec/aaccoder.o
In file included from /Users/Tim/Library/Android/android-ndk-r15c/platforms/android-26/arch-arm/usr/include/asm/termbits.h:19:0,
from /Users/Tim/Library/Android/android-ndk-r15c/platforms/android-26/arch-arm/usr/include/asm-generic/termios.h:21,
from /Users/Tim/Library/Android/android-ndk-r15c/platforms/android-26/arch-arm/usr/include/asm/termios.h:19,
from /Users/Tim/Library/Android/android-ndk-r15c/platforms/android-26/arch-arm/usr/include/linux/termios.h:22,
from /Users/Tim/Library/Android/android-ndk-r15c/platforms/android-26/arch-arm/usr/include/sys/ioctl.h:37,
from ./libavutil/timer.h:36,
from ./libavutil/internal.h:42,
from ./libavutil/common.h:467,
from libavcodec/mathops.h:27,
from libavcodec/aaccoder.c:38:
libavcodec/aaccoder.c: In function 'search_for_ms':
libavcodec/aaccoder.c:803:25: error: expected identifier or '(' before numeric constant
int B0 = 0, B1 = 0;
^
libavcodec/aaccoder.c:865:28: error: lvalue required as left operand of assignment
B0 += b1+b2;
^
libavcodec/aaccoder.c:866:25: error: 'B1' undeclared (first use in this function)
B1 += b3+b4;
^
libavcodec/aaccoder.c:866:25: note: each undeclared identifier is reported only once for each function it appears in
make: *** [libavcodec/aaccoder.o] Error 1
make: *** Waiting for unfinished jobs....
(知りません問題)が、それ以外の場合は失敗します。私は自分の設定で何かが間違っていると思うし、ソースにパッチを当てなくてもいいです。
だから、質問は以下のとおりです。
- 誰かがここで間違っているものを知っていますか? gccにいくつかの引数を与える必要がありますか?
- は--target-os = linuxが正しいか、--target-os = darwinであるべきですか? target-osはコンパイルされたOS、またはffmpegが実行されるOSですか? darwinを使って、私は--enable-staticを使ってコンパイルできますが、--enable-sharedは(私が望む)コンパイルできません。
注:HTTPSがサポートされているアームバージョンのみが必要なので、自分でコンパイルする必要があります。したがって、私は既存のビルドバージョンを使用することはできません。
私は自分の質問に答えるのを忘れてしまったように見えます。私はあなたと同じことをして、古いバージョンを取りました。これは動作しています。あまりにも多くの時間が失われた-_- !!! –