如何在windows中使用android-ndk-r10d构建ffmpeg

时间:2015-04-26 05:32:17

标签: android android-ndk ffmpeg

在我的应用程序中,用户可以选择多个图像并使用这些图像创建电影(mp4),因此我想使用ffmpeg库。 我搜索了超过2天,但没有找到一个很好的教程,在Windows中使用ndk构建ffmpeg。

任何人都可以描述我,怎么做?(如果你有任何链接,请分享我)

我使用了roman10教程,这就是我所做的: 1-i已经解压缩" ffmpeg-2.6.2"文件夹进入" android-ndk-r10d / sources"。

2-i已创建" build_android.sh"归档到" ffmpeg-2.6.2"文件夹,这些是我的build_android.sh代码:

#!/bin/bash
NDK=C:/Users/HAKHASIN/Desktop/android-ndk-r10d

SYSROOT=$NDK/platforms/android-9/arch-arm/

TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64

function build_one

{

./configure \

--prefix=$PREFIX \

--enable-shared \

--disable-static \

--disable-doc \

--disable-ffmpeg \

--disable-ffplay \

--disable-ffprobe \

--disable-ffserver \

--disable-avdevice \

--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

3-写的时候" sudo chmod + x build_android.sh"和" ./ build_android.sh" cygwin中的命令,它无法正常工作

enter image description here

0 个答案:

没有答案