Compiling ffmpeg for android on Mac
up vote
2
down vote
favorite
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
add a comment |
up vote
2
down vote
favorite
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
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
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
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
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
android macos ffmpeg
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
add a comment |
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
add a comment |
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.
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
add a comment |
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!!
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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!!
add a comment |
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!!
add a comment |
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!!
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!!
answered Nov 20 at 6:18
SlaneR
346112
346112
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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