Compiling ffmpeg for android on Mac











up vote
2
down vote

favorite
1












I tried to compile ffmpeg for android on Mac, but it does not work for me.



#!/bin/bash
NDK=/Users/user/Library/Android/sdk/ndk-bundle
SYSROOT=$NDK/platforms/android-18/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64

function build_one
{
./configure
--prefix=$PREFIX
--enable-shared
--disable-static
--disable-doc
--disable-ffmpeg
--disable-ffplay
--disable-ffprobe
--disable-network
--disable-filters
--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 all
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"

build_one


I also give execute permission via chmod +x build_script.sh



I tried ffmpeg 4.1 and 4.0.3 but both are not work and same error reason.



I also tried on android-21 and android-18



test_cpp_condition stddef.h defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4
test_cpp
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 #include <stddef.h>
2 #if !(defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4)
3 #error "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
4 #endif
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -E -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
/tmp/ffconf.bgSdFwkD/test.c:3:2: error: "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
#error "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
^
1 error generated.
test_cpp_condition stddef.h defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T
test_cpp
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 #include <stddef.h>
2 #if !(defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T)
3 #error "unsatisfied condition: defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T"
4 #endif
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -E -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
test_ld cc
test_cc
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 int main(void){ return 0; }
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -march=armv4t -c -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -march=armv4t -o /tmp/ffconf.bgSdFwkD/test /tmp/ffconf.bgSdFwkD/test.o
ld: unknown option: --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/
clang: error: linker command failed with exit code 1 (use -v to see invocation)
C compiler test failed.


Is there any tools/Applications or libraries I have to additionally install for compiling? I'm confused.... (THIS QUESTION IS MAY DUPLICATE BUT NONE OF SOLUTION WAS WORKED FOR ME)



EDIT To clarify my system environment.




  • Mac OS X High Sierra (10.13.6)

  • Android NDK (18.1.5063045)

  • Android SDK Tools and SDK Build-Tools

  • CMake


EDIT I also tried ffmpeg version 3.3.9 but it does not work either.










share|improve this question
























  • maybe you should use the cmake shipped with NDK
    – shizhen
    Nov 20 at 2:36










  • @shizhen can you provide me more information? I'm new to NDK and android :O (EDIT) in my SDK manager, CMake already installed.
    – SlaneR
    Nov 20 at 2:37

















up vote
2
down vote

favorite
1












I tried to compile ffmpeg for android on Mac, but it does not work for me.



#!/bin/bash
NDK=/Users/user/Library/Android/sdk/ndk-bundle
SYSROOT=$NDK/platforms/android-18/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64

function build_one
{
./configure
--prefix=$PREFIX
--enable-shared
--disable-static
--disable-doc
--disable-ffmpeg
--disable-ffplay
--disable-ffprobe
--disable-network
--disable-filters
--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 all
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"

build_one


I also give execute permission via chmod +x build_script.sh



I tried ffmpeg 4.1 and 4.0.3 but both are not work and same error reason.



I also tried on android-21 and android-18



test_cpp_condition stddef.h defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4
test_cpp
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 #include <stddef.h>
2 #if !(defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4)
3 #error "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
4 #endif
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -E -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
/tmp/ffconf.bgSdFwkD/test.c:3:2: error: "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
#error "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
^
1 error generated.
test_cpp_condition stddef.h defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T
test_cpp
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 #include <stddef.h>
2 #if !(defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T)
3 #error "unsatisfied condition: defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T"
4 #endif
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -E -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
test_ld cc
test_cc
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 int main(void){ return 0; }
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -march=armv4t -c -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -march=armv4t -o /tmp/ffconf.bgSdFwkD/test /tmp/ffconf.bgSdFwkD/test.o
ld: unknown option: --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/
clang: error: linker command failed with exit code 1 (use -v to see invocation)
C compiler test failed.


Is there any tools/Applications or libraries I have to additionally install for compiling? I'm confused.... (THIS QUESTION IS MAY DUPLICATE BUT NONE OF SOLUTION WAS WORKED FOR ME)



EDIT To clarify my system environment.




  • Mac OS X High Sierra (10.13.6)

  • Android NDK (18.1.5063045)

  • Android SDK Tools and SDK Build-Tools

  • CMake


EDIT I also tried ffmpeg version 3.3.9 but it does not work either.










share|improve this question
























  • maybe you should use the cmake shipped with NDK
    – shizhen
    Nov 20 at 2:36










  • @shizhen can you provide me more information? I'm new to NDK and android :O (EDIT) in my SDK manager, CMake already installed.
    – SlaneR
    Nov 20 at 2:37















up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





I tried to compile ffmpeg for android on Mac, but it does not work for me.



#!/bin/bash
NDK=/Users/user/Library/Android/sdk/ndk-bundle
SYSROOT=$NDK/platforms/android-18/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64

function build_one
{
./configure
--prefix=$PREFIX
--enable-shared
--disable-static
--disable-doc
--disable-ffmpeg
--disable-ffplay
--disable-ffprobe
--disable-network
--disable-filters
--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 all
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"

build_one


I also give execute permission via chmod +x build_script.sh



I tried ffmpeg 4.1 and 4.0.3 but both are not work and same error reason.



I also tried on android-21 and android-18



test_cpp_condition stddef.h defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4
test_cpp
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 #include <stddef.h>
2 #if !(defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4)
3 #error "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
4 #endif
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -E -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
/tmp/ffconf.bgSdFwkD/test.c:3:2: error: "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
#error "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
^
1 error generated.
test_cpp_condition stddef.h defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T
test_cpp
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 #include <stddef.h>
2 #if !(defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T)
3 #error "unsatisfied condition: defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T"
4 #endif
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -E -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
test_ld cc
test_cc
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 int main(void){ return 0; }
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -march=armv4t -c -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -march=armv4t -o /tmp/ffconf.bgSdFwkD/test /tmp/ffconf.bgSdFwkD/test.o
ld: unknown option: --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/
clang: error: linker command failed with exit code 1 (use -v to see invocation)
C compiler test failed.


Is there any tools/Applications or libraries I have to additionally install for compiling? I'm confused.... (THIS QUESTION IS MAY DUPLICATE BUT NONE OF SOLUTION WAS WORKED FOR ME)



EDIT To clarify my system environment.




  • Mac OS X High Sierra (10.13.6)

  • Android NDK (18.1.5063045)

  • Android SDK Tools and SDK Build-Tools

  • CMake


EDIT I also tried ffmpeg version 3.3.9 but it does not work either.










share|improve this question















I tried to compile ffmpeg for android on Mac, but it does not work for me.



#!/bin/bash
NDK=/Users/user/Library/Android/sdk/ndk-bundle
SYSROOT=$NDK/platforms/android-18/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64

function build_one
{
./configure
--prefix=$PREFIX
--enable-shared
--disable-static
--disable-doc
--disable-ffmpeg
--disable-ffplay
--disable-ffprobe
--disable-network
--disable-filters
--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 all
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"

build_one


I also give execute permission via chmod +x build_script.sh



I tried ffmpeg 4.1 and 4.0.3 but both are not work and same error reason.



I also tried on android-21 and android-18



test_cpp_condition stddef.h defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4
test_cpp
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 #include <stddef.h>
2 #if !(defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4)
3 #error "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
4 #endif
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -E -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
/tmp/ffconf.bgSdFwkD/test.c:3:2: error: "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
#error "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4"
^
1 error generated.
test_cpp_condition stddef.h defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T
test_cpp
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 #include <stddef.h>
2 #if !(defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T)
3 #error "unsatisfied condition: defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T"
4 #endif
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -E -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
test_ld cc
test_cc
BEGIN /tmp/ffconf.bgSdFwkD/test.c
1 int main(void){ return 0; }
END /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -Os -fpic -marm -march=armv4t -c -o /tmp/ffconf.bgSdFwkD/test.o /tmp/ffconf.bgSdFwkD/test.c
/Users/user/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/ -march=armv4t -o /tmp/ffconf.bgSdFwkD/test /tmp/ffconf.bgSdFwkD/test.o
ld: unknown option: --sysroot=/Users/user/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm/
clang: error: linker command failed with exit code 1 (use -v to see invocation)
C compiler test failed.


Is there any tools/Applications or libraries I have to additionally install for compiling? I'm confused.... (THIS QUESTION IS MAY DUPLICATE BUT NONE OF SOLUTION WAS WORKED FOR ME)



EDIT To clarify my system environment.




  • Mac OS X High Sierra (10.13.6)

  • Android NDK (18.1.5063045)

  • Android SDK Tools and SDK Build-Tools

  • CMake


EDIT I also tried ffmpeg version 3.3.9 but it does not work either.







android macos ffmpeg






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 at 3:58

























asked Nov 20 at 2:33









SlaneR

346112




346112












  • maybe you should use the cmake shipped with NDK
    – shizhen
    Nov 20 at 2:36










  • @shizhen can you provide me more information? I'm new to NDK and android :O (EDIT) in my SDK manager, CMake already installed.
    – SlaneR
    Nov 20 at 2:37




















  • maybe you should use the cmake shipped with NDK
    – shizhen
    Nov 20 at 2:36










  • @shizhen can you provide me more information? I'm new to NDK and android :O (EDIT) in my SDK manager, CMake already installed.
    – SlaneR
    Nov 20 at 2:37


















maybe you should use the cmake shipped with NDK
– shizhen
Nov 20 at 2:36




maybe you should use the cmake shipped with NDK
– shizhen
Nov 20 at 2:36












@shizhen can you provide me more information? I'm new to NDK and android :O (EDIT) in my SDK manager, CMake already installed.
– SlaneR
Nov 20 at 2:37






@shizhen can you provide me more information? I'm new to NDK and android :O (EDIT) in my SDK manager, CMake already installed.
– SlaneR
Nov 20 at 2:37














2 Answers
2






active

oldest

votes

















up vote
0
down vote













You can use wrappers https://github.com/WritingMinds/ffmpeg-android
if you want to use most of the command. It will increase the size of apk.



I also tried to compile it and after several attempts, I compiled my own one. But it is hard to integrate as well. I used below tutorials to compile it.




  • https://medium.com/@ilja.kosynkin/building-ffmpeg-for-android-607222677a9e

  • https://enoent.fr/blog/2014/06/20/compile-ffmpeg-for-android/

  • https://yesimroy.gitbooks.io/android-note/content/compile_ffmpeg_for_android.html


But I just wanted to tell, use FFmpeg wrapper for it if u don't consider the size of apk. There is not the considerable gain of performance in own compiled FFmpeg. Use above mentioned wrapper u want. It works well. If u more enthusiastic about compile and integrate your own FFmpeg, try above tutorials.






share|improve this answer





















  • Thank you for your answer. I'm afraid but the size of apk is big deal for me, so I can't use wrapper. Also the list of tutorials you provided are already I read / tried before. I don't know why this doesn't work for me. . .
    – SlaneR
    Nov 20 at 3:45


















up vote
0
down vote



accepted










I was installed NDK through Android Studio and I think it was the problem, so I downloaded Android NDK manually and now I can configure and run the makefile.



Wait! Not done yet. When I ran makefile with latest stable NDK (r16b), it says:
./libavutil/common.h:33:19: fatal error: errno.h: No such file or directory



According to this document, so I tried using NDK r15c and it finally works for me.



To summarize how I solve this problem: Manually install NDK r15c and DON'T FORGET update your shell script file!



Hope this help!!






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385391%2fcompiling-ffmpeg-for-android-on-mac%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    You can use wrappers https://github.com/WritingMinds/ffmpeg-android
    if you want to use most of the command. It will increase the size of apk.



    I also tried to compile it and after several attempts, I compiled my own one. But it is hard to integrate as well. I used below tutorials to compile it.




    • https://medium.com/@ilja.kosynkin/building-ffmpeg-for-android-607222677a9e

    • https://enoent.fr/blog/2014/06/20/compile-ffmpeg-for-android/

    • https://yesimroy.gitbooks.io/android-note/content/compile_ffmpeg_for_android.html


    But I just wanted to tell, use FFmpeg wrapper for it if u don't consider the size of apk. There is not the considerable gain of performance in own compiled FFmpeg. Use above mentioned wrapper u want. It works well. If u more enthusiastic about compile and integrate your own FFmpeg, try above tutorials.






    share|improve this answer





















    • Thank you for your answer. I'm afraid but the size of apk is big deal for me, so I can't use wrapper. Also the list of tutorials you provided are already I read / tried before. I don't know why this doesn't work for me. . .
      – SlaneR
      Nov 20 at 3:45















    up vote
    0
    down vote













    You can use wrappers https://github.com/WritingMinds/ffmpeg-android
    if you want to use most of the command. It will increase the size of apk.



    I also tried to compile it and after several attempts, I compiled my own one. But it is hard to integrate as well. I used below tutorials to compile it.




    • https://medium.com/@ilja.kosynkin/building-ffmpeg-for-android-607222677a9e

    • https://enoent.fr/blog/2014/06/20/compile-ffmpeg-for-android/

    • https://yesimroy.gitbooks.io/android-note/content/compile_ffmpeg_for_android.html


    But I just wanted to tell, use FFmpeg wrapper for it if u don't consider the size of apk. There is not the considerable gain of performance in own compiled FFmpeg. Use above mentioned wrapper u want. It works well. If u more enthusiastic about compile and integrate your own FFmpeg, try above tutorials.






    share|improve this answer





















    • Thank you for your answer. I'm afraid but the size of apk is big deal for me, so I can't use wrapper. Also the list of tutorials you provided are already I read / tried before. I don't know why this doesn't work for me. . .
      – SlaneR
      Nov 20 at 3:45













    up vote
    0
    down vote










    up vote
    0
    down vote









    You can use wrappers https://github.com/WritingMinds/ffmpeg-android
    if you want to use most of the command. It will increase the size of apk.



    I also tried to compile it and after several attempts, I compiled my own one. But it is hard to integrate as well. I used below tutorials to compile it.




    • https://medium.com/@ilja.kosynkin/building-ffmpeg-for-android-607222677a9e

    • https://enoent.fr/blog/2014/06/20/compile-ffmpeg-for-android/

    • https://yesimroy.gitbooks.io/android-note/content/compile_ffmpeg_for_android.html


    But I just wanted to tell, use FFmpeg wrapper for it if u don't consider the size of apk. There is not the considerable gain of performance in own compiled FFmpeg. Use above mentioned wrapper u want. It works well. If u more enthusiastic about compile and integrate your own FFmpeg, try above tutorials.






    share|improve this answer












    You can use wrappers https://github.com/WritingMinds/ffmpeg-android
    if you want to use most of the command. It will increase the size of apk.



    I also tried to compile it and after several attempts, I compiled my own one. But it is hard to integrate as well. I used below tutorials to compile it.




    • https://medium.com/@ilja.kosynkin/building-ffmpeg-for-android-607222677a9e

    • https://enoent.fr/blog/2014/06/20/compile-ffmpeg-for-android/

    • https://yesimroy.gitbooks.io/android-note/content/compile_ffmpeg_for_android.html


    But I just wanted to tell, use FFmpeg wrapper for it if u don't consider the size of apk. There is not the considerable gain of performance in own compiled FFmpeg. Use above mentioned wrapper u want. It works well. If u more enthusiastic about compile and integrate your own FFmpeg, try above tutorials.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 20 at 3:34









    Lucefer

    1,0481511




    1,0481511












    • Thank you for your answer. I'm afraid but the size of apk is big deal for me, so I can't use wrapper. Also the list of tutorials you provided are already I read / tried before. I don't know why this doesn't work for me. . .
      – SlaneR
      Nov 20 at 3:45


















    • Thank you for your answer. I'm afraid but the size of apk is big deal for me, so I can't use wrapper. Also the list of tutorials you provided are already I read / tried before. I don't know why this doesn't work for me. . .
      – SlaneR
      Nov 20 at 3:45
















    Thank you for your answer. I'm afraid but the size of apk is big deal for me, so I can't use wrapper. Also the list of tutorials you provided are already I read / tried before. I don't know why this doesn't work for me. . .
    – SlaneR
    Nov 20 at 3:45




    Thank you for your answer. I'm afraid but the size of apk is big deal for me, so I can't use wrapper. Also the list of tutorials you provided are already I read / tried before. I don't know why this doesn't work for me. . .
    – SlaneR
    Nov 20 at 3:45












    up vote
    0
    down vote



    accepted










    I was installed NDK through Android Studio and I think it was the problem, so I downloaded Android NDK manually and now I can configure and run the makefile.



    Wait! Not done yet. When I ran makefile with latest stable NDK (r16b), it says:
    ./libavutil/common.h:33:19: fatal error: errno.h: No such file or directory



    According to this document, so I tried using NDK r15c and it finally works for me.



    To summarize how I solve this problem: Manually install NDK r15c and DON'T FORGET update your shell script file!



    Hope this help!!






    share|improve this answer

























      up vote
      0
      down vote



      accepted










      I was installed NDK through Android Studio and I think it was the problem, so I downloaded Android NDK manually and now I can configure and run the makefile.



      Wait! Not done yet. When I ran makefile with latest stable NDK (r16b), it says:
      ./libavutil/common.h:33:19: fatal error: errno.h: No such file or directory



      According to this document, so I tried using NDK r15c and it finally works for me.



      To summarize how I solve this problem: Manually install NDK r15c and DON'T FORGET update your shell script file!



      Hope this help!!






      share|improve this answer























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        I was installed NDK through Android Studio and I think it was the problem, so I downloaded Android NDK manually and now I can configure and run the makefile.



        Wait! Not done yet. When I ran makefile with latest stable NDK (r16b), it says:
        ./libavutil/common.h:33:19: fatal error: errno.h: No such file or directory



        According to this document, so I tried using NDK r15c and it finally works for me.



        To summarize how I solve this problem: Manually install NDK r15c and DON'T FORGET update your shell script file!



        Hope this help!!






        share|improve this answer












        I was installed NDK through Android Studio and I think it was the problem, so I downloaded Android NDK manually and now I can configure and run the makefile.



        Wait! Not done yet. When I ran makefile with latest stable NDK (r16b), it says:
        ./libavutil/common.h:33:19: fatal error: errno.h: No such file or directory



        According to this document, so I tried using NDK r15c and it finally works for me.



        To summarize how I solve this problem: Manually install NDK r15c and DON'T FORGET update your shell script file!



        Hope this help!!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 at 6:18









        SlaneR

        346112




        346112






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385391%2fcompiling-ffmpeg-for-android-on-mac%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'