compile ffmpeg with android ndk r5b

前端 未结 6 768
栀梦
栀梦 2021-01-02 19:37

compile ffmpeg with android ndk r5b.

ffmpeg 0.6.1

android ndk r5b

cygwin 1.7

build reference url : http://www.cnblogs.com/scottwong/archive

相关标签:
6条回答
  • 2021-01-02 20:10

    You don't set the tmp directory. You can set it in /etc/profile or just in the terminal with export TMPDIR=/your/tmp/directory. Notice: 1. If you compile with cygwin, the directory must be like D:/tmp. You can't use /cygdrive/d/tmp. 2. You must have the permission of the folder.

    0 讨论(0)
  • 2021-01-02 20:19

    I managed to build it, using NDK R6, cygwin. Indeed, it does not support /cydrive/ paths, simply use paths like windows; example below:

    NDK=e:/AndroidSDK/NDK6
    PLATFORM=$NDK/platforms/android-9/arch-arm/
    PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows
    
    0 讨论(0)
  • 2021-01-02 20:20

    I could not get this to work either, I had the exact same problem. However I was able to compile using "android-ndk-r4". I am not sure at the moment what is causing the problem but if I ever get around to figuring it out I'll post that too.

    So for now workaround is to use ndk r4.

    0 讨论(0)
  • 2021-01-02 20:27

    I have been having the exact same problem with r6. I have tried Lambage's suggestion with r4 but still could not get this to work.

    I have been looking into the problem quite a lot and I think I've discovered the reason.

    1)configure is calling the android cross compiler which is a windows .exe file.

    2)It is calling it through cygwin which uses unix file naming conventions. E.G /cygdrive/c/directory instead of C:\directory

    3)It says in the android NDK toolchain documentation that the cross compilers do NOT accept cygwin style filepaths (source: NDK/docs/STANDALONE_TOOLCHAIN.html):


    5.1/ Windows support:

    The Windows binaries do not depend on Cygwin. The good news is that they are thus faster, the bad news is that they do not understand the Cygwin path specification like /cygdrive/c/foo/bar (instead of C:/foo/bar).


    I'm still trying to find a way to do this. If i solve it then I'll come back and edit this post...tbc

    0 讨论(0)
  • 2021-01-02 20:29

    I have had a hard time to get it working in Windows, but finally I've managed to do it! The previous posts were correct - there's a problem with Cygwin paths and Windows paths. I have tried the solution described in the post above as the very first thing, but it was not working. Finally I've understand the reason: even if you put into your build_android.sh file the Windows path, the config for FFmpeg still contains the wrong path.

    So in my case I have changed partially the config file in FFmpeg root directory from:

    #set temporary file name
    : ${TMPDIR:=$TEMPDIR} 
    : ${TMPDIR:=$TMP}
    : ${TMPDIR:=/tmp}
    

    to this:

    # set temporary file name
    #: ${TMPDIR:=$TEMPDIR}
    #: ${TMPDIR:=$TMP}
    : ${TMPDIR:=D:/InstallTools/Android/Cygwin_Root/tmp}
    

    After this, I got it compiling.

    0 讨论(0)
  • 2021-01-02 20:31

    If you have not solved this problem, check the last part of config.log in the ffmpeg directory; it is most likely a path or CC parameter problem.

    0 讨论(0)
提交回复
热议问题