mplayer for android?

554 views
Skip to first unread message

sandmen

unread,
Jul 8, 2010, 3:51:11 AM7/8/10
to android-ndk
Hi,
i'm a absolute beginner in porting native application to android :-(.
So it's possible that I'm totally wrong.
I try to compile mplayer for android.

What i have done:
1. download the android-ndk-r4
2. try to configure the mplayer with the follow command.

PREBUILT=/home/debian/Desktop/Cross/android-ndk-r4/build/prebuilt/
linux-x86/arm-eabi-4.4.0
./configure \
--enable-fbdev \
--enable-cross-compile \
--target=arm-linux \
--enable-static \
--disable-mencoder \
--disable-menu \
--disable-dvdnav \
--disable-dvdread-internal \
--disable-libdvdcss-internal \
--prefix=/home/debian/Desktop/Cross/mplayer-android-bin \
--host-cc=gcc \
--cc=$PREBUILT/bin/arm-eabi-gcc \
--as=$PREBUILT/bin/arm-eabi-as \
--ar=$PREBUILT/bin/arm-eabi-ar \
--ranlib=$PREBUILT/bin/arm-eabi-ranlib \
--enable-static \
--disable-dvdnav \
--disable-dvdread-internal \
--disable-libdvdcss-internal \
--disable-vcd \
--extra-cflags=" -fpic -DANDROID -I/home/debian/Desktop/Cross/android-
ndk-r4/build/platforms/android-8/arch-arm/usr/include -march=armv6j -
static -DHAVE_DIRENT_H -DHAVE_SYS_DIR_H -DHAVE_SYS_SELECT_H" \
--extra-ldflags=" -static -fPIC -s -L/home/debian/Desktop/Cross/
android-ndk-r4/build/platforms/android-8/arch-arm/usr/lib -lm -lc -
lgcc -nostdlib"

The configure script run's :-).

3. make

4. The mplayer is compiling but the linker gives me error's.

My question: is this the way to get the mplayer working on Android?

Thanks
peter

David Turner

unread,
Jul 8, 2010, 9:57:59 AM7/8/10
to andro...@googlegroups.com
nope, it wont' work.


--
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.


Nalin Savara

unread,
Jul 8, 2010, 1:01:02 PM7/8/10
to andro...@googlegroups.com
but why ?
How to get it to work ?

Regards,
Nalin

>> android-ndk...@googlegroups.com<android-ndk%2Bunsu...@googlegroups.com>


>> .
>> 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
> android-ndk...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/android-ndk?hl=en.
>
>

--
Sent from my mobile device

Andy Savage

unread,
Jul 8, 2010, 9:54:28 PM7/8/10
to andro...@googlegroups.com
Hmmm it sort of works. You may want to check the XDA developer forums.

Google search:
"mplayer android xda" should get you some results.

The problem is that using the framebuffer driver seems to conflict with Android's UI so that they both fight to be on top.

My understanding is if you can get mplayer to use SDL or something like that then it should work okay (I havn't had any luck getting FFPlay to use SDL yet).

Nalin Savara

unread,
Jul 8, 2010, 10:39:27 PM7/8/10
to andro...@googlegroups.com
Hey Group, Andy...
Thanks for your kind and informative note.

The next slot of between projects time I have... I am going to boost
mplayer's code...

Thanks and Regards,
Nalin

>> <android-ndk%2Bunsu...@googlegroups.com<android-ndk%252Buns...@googlegroups.com>


>> >
>> >> .
>> >> 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
>> > android-ndk...@googlegroups.com<android-ndk%2Bunsu...@googlegroups.com>
>> .
>> > For more options, visit this group at
>> > http://groups.google.com/group/android-ndk?hl=en.
>> >
>> >
>>
>> --

sandmen

unread,
Jul 9, 2010, 1:41:58 AM7/9/10
to android-ndk
Hey Group,
@David Turner
Thank's for that :-), can you give me any hint's for the ndk
principle.
@all
That ffmpeg,mplayer porting is possible that show's the project
Rockplayerbase and yxplayer.
But both project are not open-source. (I think they violates the GPL)
@Nalin Savara
Thanks, but make the information and How-to "public". Thanks.


Nalin Savara schrieb:

sandmen

unread,
Jul 9, 2010, 7:12:07 AM7/9/10
to android-ndk
Hi Group,
i found this
http://vilivs5.git.sourceforge.net/git/gitweb.cgi?p=vilivs5/mplayer.git;a=shortlog;h=refs/heads/eclair-x86
.
I think this is a port to Android.
Maybe we can use somthing to port it to mobiledevice.
I have a look there. Maybe someone with more experience can help me.
Thanks


On 9 Jul., 07:41, sandmen <p.hafne...@googlemail.com> wrote:
> Hey Group,
> @David Turner
> Thank's for that :-), can you give me any hint's for the ndk
> principle.
> @all
> That ffmpeg,mplayer porting is possible that show's the project
> Rockplayerbase and yxplayer.
> But both project are not open-source. (I think they violates the GPL)
> @Nalin Savara
> Thanks, but make the information and How-to "public". Thanks.
>
> Nalin Savara schrieb:
>
> > Hey Group, Andy...
> > Thanks for your kind and informative note.
>
> > The next slot of between projects time I have... I am going to boost
> > mplayer's code...
>
> > Thanks and Regards,
> > Nalin
>
> > On 7/9/10, Andy Savage <a...@bluewire.net.nz> wrote:
> > > Hmmm it sort of works. You may want to check the XDA developer forums.
>
> > > Google search:
> > > "mplayer android xda" should get you some results.
>
> > > The problem is that using the framebuffer driver seems to conflict with
> > > Android's UI so that they both fight to be on top.
>
> > > My understanding is if you can get mplayer to use SDL or something like that
> > > then it should work okay (I havn't had any luck getting FFPlay to use SDL
> > > yet).
>
> > > On Fri, Jul 9, 2010 at 1:01 AM, Nalin Savara <nsn...@gmail.com> wrote:
>
> > >> but why ?
> > >> How to get it to work ?
>
> > >> Regards,
> > >> Nalin
>
> > >> On 7/8/10, David Turner <di...@android.com> wrote:
> > >> > nope, it wont' work.
>
> > >> > On Thu, Jul 8, 2010 at 12:51 AM, sandmen <p.hafne...@googlemail.com>

David Turner

unread,
Jul 9, 2010, 9:54:15 AM7/9/10
to andro...@googlegroups.com
On Thu, Jul 8, 2010 at 10:01 AM, Nalin Savara <nsn...@gmail.com> wrote:
but why ?

Because at this point, you cannot invoke the toolchain binaries directly to generate valid machine code for Android.
Special compiler and linker flags must be used instead, and there are even issues with the C runtime startup file
(e.g. crtbegin_android.o / crtend.o) or libgcc.a

We hope to have a much better toolchain in the future, but for now all attemps like the one described by the OP
are likely to produce code that will not properly run on all Android devices, if at all.

Olivier Guilyardi

unread,
Jul 9, 2010, 11:33:53 AM7/9/10
to andro...@googlegroups.com
> On Thu, Jul 8, 2010 at 10:01 AM, Nalin Savara <nsn...@gmail.com
> <mailto:nsn...@gmail.com>> wrote:

> How to get it to work ?

First, you could try to configure it with something like the following. You
certainly want to adjust the CPPFLAGS according to you Android target, and add
some --disable-* parameters.

./configure \
--host=arm-eabi \
CC=arm-eabi-gcc \
CPPFLAGS="-I$NDK/build/platforms/android-3/arch-arm/usr/include/" \
CFLAGS="-nostdlib" \
LDFLAGS="-Wl,-rpath-link=$NDK/build/platforms/android-3/arch-arm/usr/lib/ \
-L$NDK/build/platforms/android-3/arch-arm/usr/lib/" \
LIBS="-lc "

Configuring this way should help, creating config.h, etc...

But then, you can't rely on the usual make command. You need to read mplayer's
makefiles, and manually write an Android.mk file according to these, so that you
can build mplayer with ndk-build.

HTH

--
Olivier

Ngo Van Luyen

unread,
Jul 12, 2010, 5:22:37 AM7/12/10
to andro...@googlegroups.com
Anyone got this work?

I'm trying to convert my projects to Android, but the big problem is creating Android Makefile. Because I'm using some opensource lib, I am not familiar with GNU Makefile (I works on M$ Visual Studio C,C++)



2010/7/9 Olivier Guilyardi <li...@samalyse.com>

--
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.




--
Hello Android!
http://androidcore.com/

Olivier Guilyardi

unread,
Jul 12, 2010, 7:16:55 AM7/12/10
to andro...@googlegroups.com
Well, IMO, before trying to do this with the NDK, you should just learn how to
use autoconf, automake and make. It's most widespread building tools on Linux.
You could try to create a small "Hello World" example, that's fairly easy.

That should help you understand how it all works, and make it much easier to
write an Android.mk for existing libs.

Olivier

On 07/12/2010 11:22 AM, Ngo Van Luyen wrote:
> Anyone got this work?
>
> I'm trying to convert my projects to Android, but the big problem is
> creating Android Makefile. Because I'm using some opensource lib, I am
> not familiar with GNU Makefile (I works on M$ Visual Studio C,C++)
>
>
>

> 2010/7/9 Olivier Guilyardi <li...@samalyse.com <mailto:li...@samalyse.com>>


>
> > On Thu, Jul 8, 2010 at 10:01 AM, Nalin Savara <nsn...@gmail.com
> <mailto:nsn...@gmail.com>

> <mailto:andro...@googlegroups.com>.


> To unsubscribe from this group, send email to
> android-ndk...@googlegroups.com

> <mailto:android-ndk%2Bunsu...@googlegroups.com>.

Ngo Van Luyen

unread,
Jul 12, 2010, 8:28:21 AM7/12/10
to andro...@googlegroups.com
so can you help me at this thread: http://groups.google.com/group/android-ndk/browse_thread/thread/71a11291afe2f9d6



2010/7/12 Olivier Guilyardi <li...@samalyse.com>

品雪

unread,
Jul 21, 2010, 10:26:58 AM7/21/10
to android-ndk
Hi Sandmen,

Please be careful when censuring others violate license.

If you didn't mentioned RockPlayer, perhaps I have no chance to know
you guys are interested. RockPlayer dynamic linked to LGPLed splitters
and decoders of FFmpeg project, our copy of source code includes
Android.mk are available on our website. RockPlayer take advantage of
OpenCore as well in System Player Mode. We use a home-brewed rendering
engine which gives high performance for Android 1.6~2.2. Hope this
source code ball helps.

PS, we had a leaking incident a few weeks ago, which is a internal
testing version, called itself RockPlayerBase. Some bad guy cracked it
by replacing the Logo and called cracked one Rock Divx Player, if you
see a DivX icon in playback interface, then you are using this one. We
strongly suggest anyone who is still using these two version (indeed
is one) to remove it and to install the official release from Market.

As the incident mentioned above forced us rushing into release, we are
crazy busy in recent, perhaps I cannot observe this topic/group
actively, feel free to drop us an email if you have trouble to use the
FFmpeg source code downloaded from our website.

On 7月9日, 下午1时41分, sandmen <p.hafne...@googlemail.com> wrote:
> Hey Group,
> @David Turner
> Thank's for that :-), can you give me any hint's for the ndk
> principle.
> @all
> That ffmpeg,mplayer porting is possible that show's the project
> Rockplayerbase and yxplayer.
> But both project are not open-source. (I think they violates the GPL)
> @Nalin Savara
> Thanks, but make the information and How-to "public". Thanks.
>
> Nalin Savara schrieb:
>
>
>
> > Hey Group, Andy...
> > Thanks for your kind and informative note.
>
> > The next slot of between projects time I have... I am going to boost
> > mplayer's code...
>
> > Thanks and Regards,
> > Nalin
>
> > On 7/9/10, Andy Savage <a...@bluewire.net.nz> wrote:
> > > Hmmm it sort of works. You may want to check the XDA developer forums.
>
> > > Google search:
> > > "mplayer android xda" should get you some results.
>
> > > The problem is that using the framebuffer driver seems to conflict with
> > > Android's UI so that they both fight to be on top.
>
> > > My understanding is if you can get mplayer to use SDL or something like that
> > > then it should work okay (I havn't had any luck getting FFPlay to use SDL
> > > yet).
>
> > > On Fri, Jul 9, 2010 at 1:01 AM, Nalin Savara <nsn...@gmail.com> wrote:
>
> > >> but why ?
> > >> How to get it to work ?
>
> > >> Regards,
> > >> Nalin
>
> > >> On 7/8/10, David Turner <di...@android.com> wrote:
> > >> > nope, it wont' work.
>
> > >> > On Thu, Jul 8, 2010 at 12:51 AM, sandmen <p.hafne...@googlemail.com>
> > >> >> android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
> > >> <android-ndk%2Bunsu...@googlegroups.com<android-ndk%252Bunsubscribe@goo glegroups.com>
>
> > >> >> .
> > >> >> 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
> > >> > android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
> > >> .
> > >> > For more options, visit this group at
> > >> >http://groups.google.com/group/android-ndk?hl=en.
>
> > >> --
> > >> Sent from my mobile device
>
> > >> --
> > >> 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<android-ndk%2Bunsubscribe@googlegr oups.com>

品雪

unread,
Jul 21, 2010, 10:07:19 AM7/21/10
to android-ndk
Well, if you are not mention RockPlayer, maybe I have no chance to
know you guys are interested. But please be careful to censure others.
RockPlayer dynamic linked to FFmpeg to use its LGPLed splitter and
decoder, RockPlayer takes advantage of OpenCore as well in its System
Player Mode.

We have shared the FFmpeg sourced and Android.mk to generate the
ffmpeg.so used by RockPlayer, you may download it from our website
http://www.anplayer.com . Hope it may helps you guys a bit.

PS, the name of our player is RockPlayer. We got once leaking
incident, which is a internal testing version and shows itself as
RockPlayerBase, if you see the DivX logo in playback interface, which
is a logo cracked version based on the one leaked. I strongly suggest
you to install the official release from Market if you are still using
it.

Because the incident mentioned above pushed us rushing into release,
we are crazy busy in recent, perhaps I cannot observe this group
actively, feel free to drop us an email if you have trouble to use the
FFmpeg sourced from our website.

On 7月9日, 下午1时41分, sandmen <p.hafne...@googlemail.com> wrote:
> Hey Group,
> @David Turner
> Thank's for that :-), can you give me any hint's for the ndk
> principle.
> @all
> That ffmpeg,mplayer porting is possible that show's the project
> Rockplayerbase and yxplayer.
> But both project are not open-source. (I think they violates the GPL)
> @Nalin Savara
> Thanks, but make the information and How-to "public". Thanks.
>
> Nalin Savara schrieb:
>
>
>
> > Hey Group, Andy...
> > Thanks for your kind and informative note.
>
> > The next slot of between projects time I have... I am going to boost
> > mplayer's code...
>
> > Thanks and Regards,
> > Nalin
>
> > On 7/9/10, Andy Savage <a...@bluewire.net.nz> wrote:
> > > Hmmm it sort of works. You may want to check the XDA developer forums.
>
> > > Google search:
> > > "mplayer android xda" should get you some results.
>
> > > The problem is that using the framebuffer driver seems to conflict with
> > > Android's UI so that they both fight to be on top.
>
> > > My understanding is if you can get mplayer to use SDL or something like that
> > > then it should work okay (I havn't had any luck getting FFPlay to use SDL
> > > yet).
>
> > > On Fri, Jul 9, 2010 at 1:01 AM, Nalin Savara <nsn...@gmail.com> wrote:
>
> > >> but why ?
> > >> How to get it to work ?
>
> > >> Regards,
> > >> Nalin
>
> > >> On 7/8/10, David Turner <di...@android.com> wrote:
> > >> > nope, it wont' work.
>
> > >> > On Thu, Jul 8, 2010 at 12:51 AM, sandmen <p.hafne...@googlemail.com>
> > >> >> android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
> > >> <android-ndk%2Bunsu...@googlegroups.com<android-ndk%252Bunsubscribe@goo glegroups.com>
>
> > >> >> .
> > >> >> 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
> > >> > android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
> > >> .
> > >> > For more options, visit this group at
> > >> >http://groups.google.com/group/android-ndk?hl=en.
>
> > >> --
> > >> Sent from my mobile device
>
> > >> --
> > >> 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<android-ndk%2Bunsubscribe@googlegr oups.com>
Reply all
Reply to author
Forward
0 new messages