FFMPEG 2.5.4版本为Android NDK与r10d [英] FFMPEG 2.5.4 build for Android with NDK r10d

查看:663
本文介绍了FFMPEG 2.5.4版本为Android NDK与r10d的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立的FFmpeg为Android跟随这名政党成员:的 http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/

I'm trying to build FFmpeg for android following this tuto: http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/

我使用的是:


  • NDK r10d

  • FFMPEG 2.5.4

我试图建立在MacOS和Ubuntu,我也得到了同样的错误,当我执行./build_android.sh:

I have tried to build on MacOs and Ubuntu and I get the same error when I execute ./build_android.sh:

`Creating config.mak, config.h, and doc/config.texi...
./build_android.sh: line 16: --prefix=/Users/jesusmartin92/Documents/android-ndk-r10d/sources/ffmpeg-2.5.4/android/arm: No such file or directory
./build_android.sh: line 18: --enable-shared: command not found
./build_android.sh: line 20: --disable-static: command not found
./build_android.sh: line 22: --disable-doc: command not found
./build_android.sh: line 24: --disable-ffmpeg: command not found
./build_android.sh: line 26: --disable-ffplay: command not found
./build_android.sh: line 28: --disable-ffprobe: command not found
./build_android.sh: line 30: --disable-ffserver: command not found
./build_android.sh: line 32: --disable-avdevice: command not found
./build_android.sh: line 34: --disable-doc: command not found
./build_android.sh: line 36: --disable-symver: command not found
./build_android.sh: line 38: --cross-prefix=/Users/jesusmartin92/Documents/android-ndk-r10d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-: No such file or directory
./build_android.sh: line 40: --target-os=linux: command not found
./build_android.sh: line 42: --arch=arm: command not found
./build_android.sh: line 44: --enable-cross-compile: command not found
./build_android.sh: line 46: --sysroot=/Users/jesusmartin92/Documents/android-ndk-r10d/platforms/android-9/arch-arm/: No such file or directory
./build_android.sh: line 48: --extra-cflags=-Os -fpic -marm: command not found
./build_android.sh: line 50: --extra-ldflags=: command not found`

这就像脚本没有找到NDK的文件夹,但我查了一下路径是确定。脚本build_android.sh是FFmpeg的文件夹中。这是它的内容:

It's like the script doesn't find the ndk folder, but I checked and the path is OK. The script "build_android.sh" is in the ffmpeg folder. This is the content of it:

#!/bin/bash
NDK=/Users/jesusmartin92/Documents/android-ndk-r10d
SYSROOT=$NDK/platforms/android-9/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-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

我很坚持,所以任何想法会受到欢迎。

I'm very stuck, so any idea will be well received.

感谢

推荐答案

最后,我解决我的问题。我把configure命令在一行和它的工作!我不知道为什么它是失败...

Finally, I solved my problem. I put the configure command in one line and it worked!! I don't know why it was failing...

不管怎样,现在我用这个项目( https://github.com/hiteshsondhi88/ ffmpeg的-Android的Java的),所以,我没有编译任何东西。我认为这是我们的Andr​​oid应用程序中使用FFMPEG的简单方法。

Anyway, Now I'm using this project (https://github.com/hiteshsondhi88/ffmpeg-android-java) so, I don't have to compile anything. I think it's the easy way to use FFMPEG in our Android applications.

编辑:我完成了我的项目。您可以检查在GitHub上我的工作:
https://github.com/JesusMartinAlonso/Video4Share

I finished my project. You can check my work on GitHub: https://github.com/JesusMartinAlonso/Video4Share

这篇关于FFMPEG 2.5.4版本为Android NDK与r10d的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆