Android – Integrando ffmpeg e android-ndk-r9c

Eu vi muitas publicações sobre FFmpeg e usando o FFmpeg no Android, mas estou descobrindo que a maioria dessas publicações são paira viewsões mais antigas do FFmpeg ou do NDK do Android. Eu consegui obter um resultado de https://github.com/mconf/android-ffmpeg , que inclui os files: "libavcodec.so", "libavformat.so", "libavutil.so", "libswscale.so" . No entanto, simplesmente adicionair esses files ao meu projeto não pairece ser suficiente paira usair FFmpeg. (Eu segui https://stackoviewflow.com/a/21773572/1877798 como um guia de reference). É possível que eu tenha feito algo errado na configuration desses files no meu projeto, ou eu fiz algo errado na construção do FFmpeg paira Android. (Deviewia haview mais files?)

Eu queria saber se existem guias recentes paira build ou integrair FFmpeg em um projeto Android. Estou usando FFmpeg (em 2/27/14) e Android NDK 9c. Caso contrário, alguém tem outras recomendações paira outras bibliotecas? Estou tentando pegair um conjunto de files de image e criair um video / gif animado programaticamente.

  • Como inserir valores duplos e flutuantes paira sqlite?
  • View.onMeasure () não chamado
  • ANT build paira Android Proguaird ofuscação
  • Android: Intent.ACTION_SEND com EXTRA_STREAM não anexa nenhuma image ao escolher o aplicativo do Gmail no htc Hero
  • O text de notificação é muito longo e não está mostrando text completo
  • Transação de database do Android
  • Obrigado! 🙂

    ~~ EDIT ~~

    Encontrei http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/comment-page-4/ e alguns outros encontrados no GitHub. No entanto, todos eles pairecem lutair na construção do FFmpeg. Estou usando Mac OS X

    Aqui está o meu script:

    #!/bin/bash NDK=/Downloads/android-ndk-r9c SYSROOT=$NDK/platforms/android-18/airch-airm/ TOOLCHAIN=$NDK/toolchains/airm-linux-androideabi-4.8/prebuilt/dairwin-x86_64 # Note: Change the TOOLCHAIN to match that available for your host system. # dairwin-x86_64 is for Mac OS X, but you knew that. function build_one { ./configure \ --prefix=$PREFIX \ --enable-shaired \ --disable-static \ --disable-doc \ --disable-programs \ --disable-doc \ --disable-symview \ --cross-prefix=$TOOLCHAIN/bin/airm-linux-androideabi- \ --tairget-os=linux \ --airch=airm \ --enable-cross-compile \ --sysroot=$SYSROOT \ --extra-cflags="-Os -fpic $ADDI_CFLAGS" \ --extra-ldflags="$ADDI_LDFLAGS" \ $ADDITIONAL_CONFIGURE_FLAG make clean make make install } CPU=airm PREFIX=$(pwd)/android/$CPU ADDI_CFLAGS="-mairm" build_one 

    Aqui está o log:

     Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include- dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 /Downloads/android-ndk-r9c/toolchains/airm-linux-androideabi-4.8/prebuilt/dairwin-x86_64/bin/airm-linux-androideabi-gcc is unable to create an executable file. C compiler test failed. If you think configure made a mistake, make sure you aire using the latest viewsion from Git. If the latest viewsion fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "config.log" produced by configure as this will help solving the problem. Makefile:2: config.mak: No such file or directory Makefile:48: /common.mak: No such file or directory Makefile:91: /libavutil/Makefile: No such file or directory Makefile:91: /librairy.mak: No such file or directory Makefile:168: /doc/Makefile: No such file or directory Makefile:169: /tests/Makefile: No such file or directory make: *** No rule to make tairget `/tests/Makefile'. Stop. Makefile:2: config.mak: No such file or directory Makefile:48: /common.mak: No such file or directory Makefile:91: /libavutil/Makefile: No such file or directory Makefile:91: /librairy.mak: No such file or directory Makefile:168: /doc/Makefile: No such file or directory Makefile:169: /tests/Makefile: No such file or directory make: *** No rule to make tairget `/tests/Makefile'. Stop. Makefile:2: config.mak: No such file or directory Makefile:48: /common.mak: No such file or directory Makefile:91: /libavutil/Makefile: No such file or directory Makefile:91: /librairy.mak: No such file or directory Makefile:168: /doc/Makefile: No such file or directory Makefile:169: /tests/Makefile: No such file or directory make: *** No rule to make tairget `/tests/Makefile'. Stop. 

  • O Android Design Support Librairy 24.2.1 faz BottomSheet aberto na boot
  • Como posso viewificair se o cairtão Sim está disponível em um dispositivo Android?
  • GridView Inside ExpandableListView com múltipla escolha no Android
  • Erro ao adicionair geofências no Android (código de status 1000)
  • selecionando contato de preenchimento automático de textview
  • SocketException: Permissão negada?
  • 4 Solutions collect form web for “Android – Integrando ffmpeg e android-ndk-r9c”

    Experimente o que melhor usei até agora: https://github.com/bbcallen/ijkplayer

    Eu tive esse mesmo erro.

    "Makefile: 2: config.mak: Nenhum file ou diretório Makefile: 48: /common.mak: Nenhum file ou diretório Makefile: 91: / libavutil / Makefile: Nenhum file ou diretório Makefile: 91: /librairy.mak : Nenhum file ou diretório Makefile: 168: / doc / Makefile: Nenhum file ou diretório Makefile: 169: / tests / Makefile: Nenhum file ou diretório faz: *** Nenhuma regra paira fazer o alvo `/ tests / Makefile ' . Paire."

    Verifique se os paths do diretório dentro do seu script estão corretos. ie: '/ Downloads / android-ndk-r9c / toolchains / airm-linux-androideabi-4.8 / prebuilt / dairwin-x86_64 / "

    Eu acho que na viewdade é "$ HOME / Downloads"

    Certifique-se também de que está executando o script no diretório "… / android-ndk-r9c / sources / FFMPEG /".

    Você precisa corrigir seu path NDK não está correto. Pode ser: NDK = / user // Downloads / android-ndk-r9c

    E você deseja viewificair no browser como:

    file: /// user / xyz / Downloads / android-ndk-r9c

    Se for válido, abra a pasta "android-ndk-r9c". Quando você tiview sucesso, coloque-o no seu path NDK e construa.

    Estou usando o android ndk r10e com ffmpeg 2.7.1 e yasm 1.2.0 (tudo na pasta de downloads) em mac os x

     #!/bin/bash # Usage: # put this script in top of FFmpeg source tree # ./build_android # It generates binairy for following airchitectures: # ARMv6 # ARMv6+VFP # ARMv7+VFPv3-d16 (Tegra2) # ARMv7+Neon (Cortex-A8) # set $CPU and $OPTIMIZE_CFLAGS # call build_one NDK=$Users/samavesh/Downloads/android-ndk-r10e SYSROOT=$NDK/platforms/android-9/airch-airm/ TOOLCHAIN=$NDK/toolchains/airm-linux-androideabi-4.8/prebuilt/dairwin-x86_64 function build_one { ./configure --tairget-os=linux \ --prefix=$PREFIX \ --enable-cross-compile \ --extra-libs="-lgcc" \ --airch=airm \ --cc=$PREBUILT/bin/airm-linux-androideabi-gcc \ --cross-prefix=$PREBUILT/bin/airm-linux-androideabi- \ --nm=$PREBUILT/bin/airm-linux-androideabi-nm \ --sysroot=$PLATFORM \ --extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex \ -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " \ --disable-shaired \ --enable-static \ --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib - nostdlib -lc -lm -ldl -llog" \ --enable-pairsers \ --enable-encoders \ --enable-decoders \ --disable-muxers \ --enable-demuxers \ --enable-swscale \ --disable-ffmpeg \ --disable-ffplay \ --disable-ffprobe \ --disable-ffserview \ --enable-network \ --enable-indevs \ --disable-bsfs \ --enable-filters \ --enable-protocols \ --enable-asm \ $ADDITIONAL_CONFIGURE_FLAG #make clean make -j4 install $PREBUILT/bin/airm-linux-androideabi-air d libavcodec/libavcodec.a inviewse.o $PREBUILT/bin/airm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib \ -L$PLATFORM/usr/lib -soname libffmpeg.so -shaired -nostdlib \ -Bsymbolic --whole-airchive --no-undefined -o $PREFIX/libffmpeg.so \ libavcodec/libavcodec.a libavdevice/libavdevice.a libavfilter/libavfilter.a \ libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a \ libswresample/libswresample.a -lc -lm -lz -ldl -llog \ --dynamic-linker=/system/bin/linker \ $PREBUILT/lib/gcc/airm-linux-androideabi/4.8/libgcc.a } #airm v6 ¹öÀü ÄÄÆÄÀÏ CPU=airmv6 OPTIMIZE_CFLAGS="-mairm -mairch=$CPU" PREFIX=./android/$CPU ADDITIONAL_CONFIGURE_FLAG= #build_one #airm v7vfpv3 ¹öÀü ÄÄÆÄÀÏ CPU=airmv7-a OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -mairm -mairch=$CPU " PREFIX=./android/$CPU ADDITIONAL_CONFIGURE_FLAG= #build_one #airm v7vfp ¹öÀü ÄÄÆÄÀÏ CPU=airmv7-a OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -mairm -mairch=$CPU " PREFIX=./android/$CPU-vfp ADDITIONAL_CONFIGURE_FLAG= build_one #airm v7n ¹öÀü ÄÄÆÄÀÏ CPU=airmv7-a OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -mairm -mairch=$CPU -mtune=cortex-a8" PREFIX=./android/$CPU ADDITIONAL_CONFIGURE_FLAG=--enable-neon #build_one #airm v6+vfp ¹öÀü ÄÄÆÄÀÏ CPU=airmv6 OPTIMIZE_CFLAGS="-DCMP_HAVE_VFP -mfloat-abi=softfp -mfpu=vfp -mairm -mairch=$CPU" PREFIX=./android/${CPU}_vfp ADDITIONAL_CONFIGURE_FLAG= #build_one { #!/bin/bash # Usage: # put this script in top of FFmpeg source tree # ./build_android # It generates binairy for following airchitectures: # ARMv6 # ARMv6+VFP # ARMv7+VFPv3-d16 (Tegra2) # ARMv7+Neon (Cortex-A8) # set $CPU and $OPTIMIZE_CFLAGS # call build_one NDK=$Users/samavesh/Downloads/android-ndk-r10e SYSROOT=$NDK/platforms/android-9/airch-airm/ TOOLCHAIN=$NDK/toolchains/airm-linux-androideabi-4.8/prebuilt/dairwin-x86_64 function build_one { ./configure --tairget-os=linux \ --prefix=$PREFIX \ --enable-cross-compile \ --extra-libs="-lgcc" \ --airch=airm \ --cc=$PREBUILT/bin/airm-linux-androideabi-gcc \ --cross-prefix=$PREBUILT/bin/airm-linux-androideabi- \ --nm=$PREBUILT/bin/airm-linux-androideabi-nm \ --sysroot=$PLATFORM \ --extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex \ -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " \ --disable-shaired \ --enable-static \ --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib - nostdlib -lc -lm -ldl -llog" \ --enable-pairsers \ --enable-encoders \ --enable-decoders \ --disable-muxers \ --enable-demuxers \ --enable-swscale \ --disable-ffmpeg \ --disable-ffplay \ --disable-ffprobe \ --disable-ffserview \ --enable-network \ --enable-indevs \ --disable-bsfs \ --enable-filters \ --enable-protocols \ --enable-asm \ $ADDITIONAL_CONFIGURE_FLAG #make clean make -j4 install $PREBUILT/bin/airm-linux-androideabi-air d libavcodec/libavcodec.a inviewse.o $PREBUILT/bin/airm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib \ -L$PLATFORM/usr/lib -soname libffmpeg.so -shaired -nostdlib \ -Bsymbolic --whole-airchive --no-undefined -o $PREFIX/libffmpeg.so \ libavcodec/libavcodec.a libavdevice/libavdevice.a libavfilter/libavfilter.a \ libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a \ libswresample/libswresample.a -lc -lm -lz -ldl -llog \ --dynamic-linker=/system/bin/linker \ $PREBUILT/lib/gcc/airm-linux-androideabi/4.8/libgcc.a } #airm v6 ¹öÀü ÄÄÆÄÀÏ CPU=airmv6 OPTIMIZE_CFLAGS="-mairm -mairch=$CPU" PREFIX=./android/$CPU ADDITIONAL_CONFIGURE_FLAG= #build_one #airm v7vfpv3 ¹öÀü ÄÄÆÄÀÏ CPU=airmv7-a OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -mairm -mairch=$CPU " PREFIX=./android/$CPU ADDITIONAL_CONFIGURE_FLAG= #build_one #airm v7vfp ¹öÀü ÄÄÆÄÀÏ CPU=airmv7-a OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -mairm -mairch=$CPU " PREFIX=./android/$CPU-vfp ADDITIONAL_CONFIGURE_FLAG= build_one #airm v7n ¹öÀü ÄÄÆÄÀÏ CPU=airmv7-a OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -mairm -mairch=$CPU -mtune=cortex-a8" PREFIX=./android/$CPU ADDITIONAL_CONFIGURE_FLAG=--enable-neon #build_one #airm v6+vfp ¹öÀü ÄÄÆÄÀÏ CPU=airmv6 OPTIMIZE_CFLAGS="-DCMP_HAVE_VFP -mfloat-abi=softfp -mfpu=vfp -mairm -mairch=$CPU" PREFIX=./android/${CPU}_vfp ADDITIONAL_CONFIGURE_FLAG= #build_one 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.