[英]How to build FFmpeg Executable binary for Android on Mac OS?
I'm a new beginner with FFmpeg
.我是
FFmpeg
新手。 All I need is FFmpeg
executable binary for Android .我只需要适用于 Android 的
FFmpeg
可执行二进制文件。 I followed the great tutorial from roman10.net我遵循了roman10.net的精彩教程
Here is my build_android.sh file:这是我的build_android.sh文件:
#!/bin/bash
NDK=/Users/sunshine/Documents/android-ndk-r11-linux-x86_64
SYSROOT=$NDK/platforms/android-21/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
function build_one
{
./configure \
--prefix=$PREFIX \
--enable-shared \
--enable-static \
--disable-doc \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--enable-libmp3lame\
--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=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"
build_one
The tutorial says:教程说:
Once it's done, you should be able to find a folder $NDK/sources/ffmpeg-2.0.1/android
完成后,您应该能够找到一个文件夹 $NDK/sources/ffmpeg-2.0.1/android
In my case, the build process is done, but I don't see any android folder.就我而言,构建过程已完成,但我没有看到任何 android 文件夹。 Some new files are created in the same folder with build_android.sh file.
一些新文件与build_android.sh文件在同一文件夹中创建。 Where is my mistake?
我的错误在哪里?
I faced a similar problem, and later solved after changing the NDK path.我也遇到过类似的问题,后来改了NDK路径后解决了。 For example instead of
例如代替
NDK=/Users/sunshine/Documents/android-ndk-r11-linux-x86_64
you can try你可以试试
NDK=$HOME/Documents/android-ndk-r11-linux-x86_64
However I can't guarantee if this is the exact problem with your setup.但是我不能保证这是否是您设置的确切问题。
I faced the same "problem", but I found the files in: $NDK/sources/android/arm (lib and include directories).我遇到了同样的“问题”,但我在以下位置找到了文件:$NDK/sources/android/arm(lib 和 include 目录)。
I hope it helps!我希望它有帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.