the last time about ffmpeg and android

66 views
Skip to first unread message

survivant

unread,
Sep 22, 2010, 8:51:39 PM9/22/10
to android-ndk
I past too much time looking for a ffmpeg build for Android 2.2, that
I decide to provide one. (download link with a blog.. step by step)

there are so many unanswer questions that I want to take time to make
it clear for any one that will recompile it.

There are people that can help me to start that blog ?


my last attempt was with this link : http://slworkthings.wordpress.com/tag/ffmpeg/

but without success.

Let's start from the beginning :

target : Android 2.2

android-ndk-r4b-windows.zip
cygwin 1.7+ (gawk, make, gcc)

what I'm missing at this point ? (ffmpeg source code, but which
one ?)


survivant

unread,
Sep 22, 2010, 9:48:09 PM9/22/10
to android-ndk
if I want only the audio I suppose that I have to create only
libavcodec.so for android ? Just a though.


I found libffmpeg.so somewhere (but don't know for which android
release). It's 4 megs.


is it possible to compile all ffmpeg libraries separately into
a .so ?

Sébastien Dionne

unread,
Sep 22, 2010, 10:37:14 PM9/22/10
to android-ndk
I got this error

$ ./run.sh
/cygdrive/c/workspaces/workspace_android_n/android-ndk-r4b/build/prebuilt/window
s/arm-eabi-4.4.0/bin/arm-eabi-gcc is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from SVN.  If the latest version fails, report the problem to the
ffmpe...@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.



here the script run.sh

#!/bin/sh
PREBUILT=/cygdrive/c/workspaces/workspace_android_n/android-ndk-r4b/build/prebuilt/windows/arm-eabi-4.4.0
ANDROID_VER=/cygdrive/c/workspaces/workspace_android_n/android-ndk-r4b/build/platforms/android-8

#./configure --target-os=linux --arch=armv41 --enable-cross-compile --cc=$PREBUILT/bin/arm-eabi-gcc --cross-prefix=$PREBUILT/bin/arm-eabi- --nm=$PREBUILT/bin/arm-eabi-nm --extra-cflags="-fPIC -DANDROID " --enable-static --disable-shared --disable-asm --disable-yasm --prefix=/home/myhome/work/ffmpeg-android-bin --extra-ldflags="-Wl,-T,$PREBUILT/arm-eabi/lib/ldscripts/armelf.x -Wl,-rpath-link=$ANDROID_VER/arch-arm/usr/lib -L$ANDROID_VER/arch-arm/usr/lib -nostdlib $PREBUILT/lib/gcc/arm-eabi/4.2.1/crtbegin.o $PREBUILT/lib/gcc/arm-eabi/4.2.1/crtend.o -lc -lm -ldl"
./configure --target-os=linux --arch=armv41 --enable-cross-compile --cc=$PREBUILT/bin/arm-eabi-gcc --cross-prefix=$PREBUILT/bin/arm-eabi- --nm=$PREBUILT/bin/arm-eabi-nm --extra-cflags="-fPIC -DANDROID " --enable-static --disable-shared --disable-yasm --prefix=/home/myhome/work/ffmpeg-android-bin --extra-ldflags="-Wl,-T,$PREBUILT/arm-eabi/lib/ldscripts/armelf.x -Wl,-rpath-link=$ANDROID_VER/arch-arm/usr/lib -L$ANDROID_VER/arch-arm/usr/lib -nostdlib $PREBUILT/lib/gcc/arm-eabi/4.2.1/crtbegin.o $PREBUILT/lib/gcc/arm-eabi/4.2.1/crtend.o -lc -lm -ldl"

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


Eugene Mymrin

unread,
Sep 23, 2010, 5:28:18 AM9/23/10
to andro...@googlegroups.com
Yes, it's possible to compile avcodec, avformat and avutil into single so.
If you are planning to crack audio streams delivered via different
protocols you will need avformat.
The whole FFmpeg may be easily compiled into less than 2 Megs if you
disable all non-audio codecs and anything else that you don't need.

Sébastien Dionne

unread,
Sep 23, 2010, 6:24:23 AM9/23/10
to andro...@googlegroups.com
it's a good news.   do you know how to compile all that ?  I never been good to compile C.

Sébastien Dionne

unread,
Sep 23, 2010, 7:32:02 AM9/23/10
to andro...@googlegroups.com

I though about that.   I could use Ubuntu in Virtualbox.  I'll try that.   Next step will be to find jni sample to play audio.


>> .
>> > For more options, visit this group at
>> http://groups.google.com/group/android-ndk?hl=en.
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "android-ndk" group.
>> To post to this group, send email to andro...@googlegroups.com.
>> To unsubscribe from this group, send email to

nguyen hoang tran

unread,
Sep 23, 2010, 10:08:51 AM9/23/10
to andro...@googlegroups.com
Hi all,

If you want to compile entire ffmpeg for android into one so file, please contact me privately. I have already built it successfully 2 month ago. This is my own way. In fact, in the past, I have already tried to build ffmpeg as instructions in some forum, but none is successful.

Thingfish

unread,
Sep 24, 2010, 3:30:17 PM9/24/10
to android-ndk
Eugene >> Any chance of a small guide on how to configure and create
make files for building the ffmpeg libraries? Like the original poster
I've so far failed in getting a useable result from any of the
tutorials I was able to google.

Sébastien Dionne

unread,
Sep 24, 2010, 7:54:44 PM9/24/10
to andro...@googlegroups.com
maybe this can help : http://code.google.com/p/mingw-and-ndk/


but here a conversation that I had with : nguyen hoang tran

maybe we can help to get a tutorial soon. 




OK! I`m very busy now. I will post my solution to my blog in 2 or 3 weeks. When I finish, I will inform the link to you!
- Hide quoted text -


On Thu, Sep 23, 2010 at 9:56 PM, Sébastien Dionne <sebastie...@gmail.com> wrote:

Sorry.   I'm doing opensource.   I'll not afford that and after posting the solution over a blog.  I guess I will have to wait for someone else :(

I want to do it to avoid people to search for 2 months like you did.

On Sep 23, 2010 10:44 AM, "nguyen hoang tran" <nguyenho...@gmail.com> wrote:
> In fact, although you build all source code for ffmpeg, you can`t use them
> in java application. You must create a small application, called JNI, in C
> language that uses ffmpeg as library. I have already done like this but my
> app is `decoding video file`
>
> If you want me to show you how to build ffmpeg library as well as full
> source code, documentation, could you please give me 300$ for this? I have
> spent nearly 2 months (16-20 hours per day) to be able to find out the way
> to build it
>
> On Thu, Sep 23, 2010 at 9:24 PM, Sébastien Dionne <
> sebastie...@gmail.com> wrote:
>
>> My first demo will be to play/convert audio file.
>>
>> I'll probably only need audio library Tom ffmegp at this point.
>>
>> And the Java part as a prove of concept.
>>
>> The next step will be video. I think a full ffmepg.so it 4 megs. I found
>> that a little big just to play audio
>> On Sep 23, 2010 10:19 AM, "nguyen hoang tran" <nguyenho...@gmail.com>
>> wrote:

Thingfish

unread,
Oct 4, 2010, 5:27:50 AM10/4/10
to android-ndk
As a follow up, I ended up making use of the tutorial from
http://abitno.me/compile-ffmpeg-android-ndk (using google translate).
Works like a charm.

Sébastien Dionne

unread,
Oct 4, 2010, 6:39:46 AM10/4/10
to andro...@googlegroups.com

It works on cygwin too?   That was the problem that I had with this tutorial.   I'll try again tonight

Reply all
Reply to author
Forward
0 new messages