8
votes

I am trying to build ffmpeg for android in windows 8.1 using CYGWIN

I am following This question & How to compile FFMPEG under Cygwin . I succsessfully compile but it is not generate FFMPEG.so but it generate ffmpeg.exe file

I don't want any prebuild ffmpeg library . I want to build it for my requirement.

I perform this steps In CYGWIN BASE

  1. git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
  2. dos2unix configure
  3. dos2unix build_ffmpeg.sh
  4. make distclean
  5. ./configure –enable-static –disable-shared
  6. make
  7. make install

my build_ffmpeg.sh is

#!/bin/bash

NDK=/cygdrive/e/android/sdk/ndk-bundle PLATFORM=$NDK/platforms/android-24/arch-arm TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/windows CPU=arm PREFIX=$(pwd)/android/$CPU ADDI_CFLAGS="-marm"

pushd ffmpeg # Configure ./configure \ --target-os=android \ --prefix=$PREFIX \ --enable-cross-compile \ --enable-runtime-cpudetect \ --disable-asm \ --arch=arm \ --cc=$TOOLCHAIN/bin/arm-linux-androideabi-gcc \ --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \ --disable-stripping \ --nm=$TOOLCHAIN/bin/arm-linux-androideabi-nm \ --sysroot=$PLATFORM \ --disable-programs \ --disable-doc \ --enable-protocol=file \ --disable-avresample \ --enable-gpl \ --enable-version3 \ --enable-nonfree \ --disable-ffplay \ --disable-ffserver \ --disable-ffmpeg \ --disable-ffprobe \ --extra-cflags="-fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated $ADDI_CFLAGS" \ --extra-libs="-lgcc" \ --extra-ldflags="-L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" # Make make clean make -j5 make -j5 install

popd

My LOG file is here

My question is how to build ffmpeg for all architecture of android device?

2
This link has been credited on the ffmpeg official site. You should find a guide as well as prebuilt binaries.alok
@alok is this link contains x64,mips prebuilt library?prakash ubhadiya
@downvotter if you are successfully compile than give down vote.....prakash ubhadiya

2 Answers

0
votes

Below post will help you to create ffmpeg for an android with different architecture, use it as on reference for other platforms

https://stackoverflow.com/a/45078822/998483