Need FFMPEG for Android

93 views
Skip to first unread message

Giuseppe

unread,
May 18, 2012, 2:02:11 AM5/18/12
to andro...@googlegroups.com
I am not expert with C code, so I need some help to find the .so library already compiled and to just use in my Android project.
Some help?
Message has been deleted

Peter Arwanitis

unread,
May 18, 2012, 5:39:03 AM5/18/12
to andro...@googlegroups.com
Hi Guiseppe,
you will find compiled ffmpeg libs as part of the JavaCV project:

hope that this is what you are looking for
ciao
(=PA=)

Pablo Márquez

unread,
May 18, 2012, 6:01:49 AM5/18/12
to andro...@googlegroups.com
Compiled for what arch?

It's going to be easier if you compile the library yourself, you don't have to be an expert C programmer to do that.



On Fri, May 18, 2012 at 7:02 AM, Giuseppe <porcelli...@gmail.com> wrote:
I am not expert with C code, so I need some help to find the .so library already compiled and to just use in my Android project.
Some help?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/Xf3JAvwz364J.
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.



--
....:::::: ^__^ ::::::....

s.rawat

unread,
May 18, 2012, 7:17:45 AM5/18/12
to andro...@googlegroups.com
Try this .It explains how to cross compile the ffmpeg.Once compiled you will get the standard .so like 
libavcodec.so,libavformat.so, libavutil.so, lib,libjpeg.so ,libpostproc.so,libavfilter.so .libavcore.so,libswscale and libavdevice.so.Copy them in the JNI folder and modify the android.mk file to include  all the above lib*.so in one common*.so say your-list of shared-lib-name

The Android.mk file will look like this : 


#ffmpeg pre-built modules
include $(CLEAR_VARS)
LOCAL_MODULE := myffmpeg1
LOCAL_SRC_FILES := libavcodec.so
include $(PREBUILT_SHARED_LIBRARY)


#ffmpeg pre-built modules
include $(CLEAR_VARS)
LOCAL_MODULE := myffmpeg2
LOCAL_SRC_FILES := libavcore.so
include $(PREBUILT_SHARED_LIBRARY)


#ffmpeg pre-built modules
include $(CLEAR_VARS)
LOCAL_MODULE := myffmpeg3
LOCAL_SRC_FILES := libavfilter.so
include $(PREBUILT_SHARED_LIBRARY)


#ffmpeg pre-built modules
include $(CLEAR_VARS)
LOCAL_MODULE := myffmpeg4
LOCAL_SRC_FILES := libavformat.so
include $(PREBUILT_SHARED_LIBRARY)


#ffmpeg pre-built modules
include $(CLEAR_VARS)
LOCAL_MODULE := myffmpeg5
LOCAL_SRC_FILES := libavutil.so
include $(PREBUILT_SHARED_LIBRARY)

#ffmpeg pre-built modules
include $(CLEAR_VARS)
LOCAL_MODULE := myffmpeg6
LOCAL_SRC_FILES := libswscale.so
include $(PREBUILT_SHARED_LIBRARY)

#ffmpeg pre-built modules
include $(CLEAR_VARS)
LOCAL_MODULE := myffmpeg7
LOCAL_SRC_FILES := libavdevice.so
include $(PREBUILT_SHARED_LIBRARY)

#ffmpeg pre-built modules
#include $(CLEAR_VARS)
#LOCAL_MODULE := myffmpeg8
#LOCAL_SRC_FILES := libpostproc.so
#include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE    := your-list of shared-lib-name
LOCAL_SHARED_LIBRARIES :=  myffmpeg1 myffmpeg2 myffmpeg3 myffmpeg4 myffmpeg5 myffmpeg6 myffmpeg7 
LOCAL_SRC_FILES := your-list of source-files
# No special compiler flags.
LOCAL_CFLAGS += -fno-builtin-printf -static -O3 -DCORE_FREQ=800 -DLINUX
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog -L--soname-prefix=/system/lib/ 
include $(BUILD_SHARED_LIBRARY)

you will get your-list of source-files.so which you can load by System.load("name of .so") and use can call the functions using the native jni calls.

 
"..pain is temporary.....quitting lasts forever....."

Giuseppe

unread,
May 18, 2012, 9:54:00 AM5/18/12
to andro...@googlegroups.com
Hi Jessica,
I tried to follow the link you give me, but this is for Linux plattform, I am working on Windows.
Do you have this job already done with sources?

Thank you,
Giuseppe

s.rawat

unread,
May 18, 2012, 11:12:05 AM5/18/12
to andro...@googlegroups.com
We have done it with the Linux/Android platform But I think you can do the similar job on windows as well.how far have you succeeded?.What have you tried so far.What is the blocking point?

rgds

"..pain is temporary.....quitting lasts forever....."


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/o5GAOxFGH18J.

Peter Arwanitis

unread,
May 18, 2012, 9:37:00 AM5/18/12
to andro...@googlegroups.com
Or download libs from JavaCV project:
http://code.google.com/p/javacv/downloads/list

regards
Peter
(=PA=)

usual

unread,
May 19, 2012, 10:51:07 AM5/19/12
to andro...@googlegroups.com
On 18/05/2012 13:17, s.rawat wrote:
> Try this <http://www.roman10.net/how-to-build-ffmpeg-for-android/> .It
> explains how to cross compile the ffmpeg.
You may also try this:
http://wiki.gnashdev.org/AndroidDependencies
-
Fabien
Reply all
Reply to author
Forward
0 new messages