How to build ffmpeg with android-ndk-r10d in windo

2019-05-20 18:43发布

In my application user can selects several images and create movie(mp4) with those images, For this reason i want to use ffmpeg library. i have searched more than 2 days but did not find a good tutorial for build ffmpeg with ndk in windows.

can any body describe me, how to do that?(if you have any link, please share me)

i used roman10 tutorial and this is what i do: 1-i have decompressed "ffmpeg-2.6.2" folder into "android-ndk-r10d/sources".

2-i have created "build_android.sh" file into "ffmpeg-2.6.2" folder and these are my build_android.sh codes:

#!/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- when write "sudo chmod +x build_android.sh" and "./build_android.sh" commands in cygwin, it not work correctly

enter image description here

0条回答
登录 后发表回答