ffmpeg for a android (using tutorial: "ffmpeg and Android.mk")
Asked Answered
K

5

49

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.

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

Knew answered 15/4, 2010 at 12:11 Comment(2)
I've looked through all the replies here and in many other sites and there does not appear to be a definitive guide to compiling, building and using ffmpeg (in a Windows environment) for Android. It would be extremely useful to be able to nail this.Overthecounter
I found following link, which works rowntreerob.wordpress.com/2012/06/17/…Saucedo
T
21

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.

EDIT:

Since this post was written a few packaged ffmpeg projects for android surfaced, one of the easiest ones to compile and use is here: https://github.com/guardianproject/android-ffmpeg .

It takes the approach of statically compiling a binary (not a library) that is ran through shell command in run time. Search github for 'android ffmpeg' for forks and related projects.

Did not find a well packaged method based JNI implementation, though.

Tanny answered 28/10, 2010 at 10:28 Comment(3)
Don't you need a C or C++ file which can make calls into the shared libraries or can these calls be made with the header files?Overthecounter
could you elaborate on that (also on @John's question)? Have you got it to work?Spectroscope
Hey, @Guy, do you think you could please elaborate how you got this to work? Possibly with some code examples and instructions?Misty
F
4

I found a guide on ffmpeg on android here: http://rxwen.blogspot.com/2010/05/use-ffmpeg-to-setup-streaming-server-on.html

He explains in another post how he got to do native programming on android to install ffmpeg. Hope it helps.

Favour answered 20/12, 2010 at 9:31 Comment(0)
V
3

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.

Verdha answered 5/7, 2010 at 0:44 Comment(0)
A
3

I will provide a more updated list of sources which will explain how to build and, in some cases, even use FFMPEG on Android.

This is the guide I liked the most: http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/

If you need more options, you can take a look at these, which are equally good:

Act answered 8/3, 2014 at 14:28 Comment(1)
github.com/appunite/AndroidFFmpeg appears to be quite good too. But it's a video player, and I need a transcoder, so your second link to android-ffmpeg-x264 looks suitable, thanksOleta
O
0

For anyone having this issue currently, there is an excellent library to FFmpeg on android. This library is up to date and well maintained.

Here is the link for that: https://github.com/arthenica/ffmpeg-kit/

Oldwife answered 13/9, 2023 at 6:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.