views:

1270

answers:

7

Hi to all,

I am trying to compile ffmpeg for a android. I have found several posts on this theme but non of these seems to work. If tried to build ffmpeg like it is posted on [1]. Did anybody successfully compile ffmpeg using theses tutorial? I am not sure how to realize step 4 to 5.

STEP4: Configuring ...

STEP5: cd to your NDK root dir, type make TARGET_ARCH=arm APP=ffmpeg-org

It seems to me that building an application like it is explained in the tutorial in step 5 need some previous steps. Unfortunately I have no app in the folder to make. I am using the current android ndk release 3 and checked out the actual ffmpeg releases from [3] and [4]. I am thankful for every advice.

best regards Matthias

[1] http://slworkthings.wordpress.com/
[2] http://gitorious.org/~olvaffe/ffmpeg/ffmpeg-android
[3] http://ffmpeg.org/download.html

+1  A: 

In NDK r3, when you use the make command, the NDK will simply use the name of the folder in the "apps" folder for the name of your project. This assumes that you have your ffmpeg source files and android.mk somewhere within NDK/apps/ffmpeg-org/jni/

In otherwords, ensure that your foldername is set to ffmpeg-org.

EDIT: You might find it worthwile to use NDK r4 which changes "make" to "ndk-build". In this new NDK, you don't need to have your project set up in any particular way, as ndk-build simply searches your project for Android.mk files to tell it what to compile.

-Griff

Griffin
A: 

Hi Guys,

I'm stuck with the same task/tutorial, but at an earlier stage. I'm using android ndk r4 and ffmpeg (svn revision 24213).

I got the configure script running and added some commands to comment out the config.mak and subdir.mak includes mentioned in [1] STEP 4. I copied the .mk files from [2] to the corresponding folders in JNI directory. I ALSO had to copy the config-arm.mak file because there was none (should it be created?). When I now call the ndk-build command my pc thinks for a milisecond and then shows me the input prompt again without having done anything. When I use ndk-build V=1 it shows me at least the rm commands, but it doesn't compile anything. Building samples from the android-ndk works perfectly.

Any ideas or hints?

Thanks in advance

Sönke

TeddybearCrisis
A: 

Hi,

I also tried various tutorial over the web, and find all of them waste of time. It's actually quicker if you build it from scratch - write your own Android.mk files. I have also briefly described a way to support both armv5 and armv7 architectures on my blog.

ognian
you don't have anything on your blog about how to compile ffmpeg... you just say you did.
androidworkz
I didn't say there is a description of the building process on the blog, just a way detect CPU capabilities at runtime. The most valuable thing I said is that one shouldn't follow tutorials because they all suck.
ognian
A: 

Thanks dude,

that's the most useful answer I got on this topic so far (no irony). I read your post - is there any chance you share what you've got so far? I'd use it in a project of my studies.

TeddybearCrisis
A: 

Hi,

Can somone pls help me out I also stuck with the same issue. Any help would be highly appreciated

thanks in advance

theracoder
+2  A: 

After looking around the net. The only working solution I found is supplied by Bambuser which ported ffmpeg to use in their android application.

Code is here: http://bambuser.com/opensource

Basically you copy the .so files to your jni/lib directory, along with any .h files you might need, create a JNI wrapper through javah, and it works.

Guy