Support for h264 mpeg4 ?

Luis Linietsky llinietsky at dlatv.net
Thu Jan 10 14:04:26 PST 2013


Thanks Sebastian,
I have been reading some more on docs.gstreamer.

I added "ffmpeg" to the build script, as follows:

GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_PLAYBACK) $(GSTREAMER_PLUGINS_CODECS) $(GSTREAMER_PLUGINS_NET) $(GSTREAMER_PLUGINS_SYS) ffmpeg

and when I try to build the Tutorial5 project, I'm getting following error:
luigi at Fender:~/workspace/Tutorial5$ ndk-build
GStreamer      : [GEN] => gst-build/gstreamer_android.c
GStreamer      : [COMPILE] => gst-build/gstreamer_android.c
GStreamer      : [LINK] => gst-build/libgstreamer_android.so
/home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: error: /home/luigi/projects/gstreamer-sdk/lib/libavutil.a(mem.o): multiple definition of 'av_malloc'
/home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: /home/luigi/projects/gstreamer-sdk/lib/gstreamer-0.10/static/libgstffmpegcolorspace.a(libgstffmpegcolorspace_la-mem.o): previous definition here
/home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: error: /home/luigi/projects/gstreamer-sdk/lib/libavutil.a(mem.o): multiple definition of 'av_realloc'
/home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: /home/luigi/projects/gstreamer-sdk/lib/gstreamer-0.10/static/libgstffmpegcolorspace.a(libgstffmpegcolorspace_la-mem.o): previous definition here
/home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: error: /home/luigi/projects/gstreamer-sdk/lib/libavutil.a(mem.o): multiple definition of 'av_free'
/home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: /home/luigi/projects/gstreamer-sdk/lib/gstreamer-0.10/static/libgstffmpegcolorspace.a(libgstffmpegcolorspace_la-mem.o): previous definition here
/home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: /home/luigi/projects/gstreamer-sdk/lib/libavcodec.a(flashsvenc.o): in function flashsv_encode_frame:libavcodec/flashsvenc.c:169: error: undefined reference to 'compress2'
/home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: /home/luigi/projects/gstreamer-sdk/lib/libavcodec.a(tiffenc.o): in function encode_strip:libavcodec/tiffenc.c:165: error: undefined reference to 'compress'

I also try building  hlsdemux, but I got the following output:
luigi at Fender:~/workspace/Tutorial5$ ndk-build
GStreamer      : [GEN] => gst-build/gstreamer_android.c
GStreamer      : [COMPILE] => gst-build/gstreamer_android.c
GStreamer      : [LINK] => gst-build/libgstreamer_android.so
/home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: error: cannot find -lgsthlsdemux
/home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold: gst-build/gstreamer_android.o: in function gst_android_register_static_plugins:gstreamer_android.c(.text+0x174): error: undefined reference to 'gst_plugin_hlsdemux_register'
collect2: ld returned 1 exit status
make: *** [buildsharedlibrary] Error 1

Am I missing something ?
Thanks !

________________________________________
From: gstreamer-android-bounces+llinietsky=dlatv.net at lists.freedesktop.org [gstreamer-android-bounces+llinietsky=dlatv.net at lists.freedesktop.org] on behalf of Sebastian Dröge [sebastian.droege at collabora.co.uk]
Sent: Thursday, January 10, 2013 6:06 AM
To: Discussions about GStreamer on Android
Subject: Re: Support for h264 mpeg4 ?

On Mi, 2013-01-09 at 21:24 +0000, Luis Linietsky wrote:
> Hello guys,
> This must be a really basic thing, I just hope somebody could point me into the right direction.
> I got tutorial5 up and running (from the gstremaer sdk docs at http://docs.gstreamer.com/display/GstSDK/Android+tutorial+5%3A+A+Complete+media+player).
> But when I tried to change the "defaultMediaUri" into some other video formats, like mpeg4, I got the following error from the logcat:
>
> "
> W/GStreamer+uridecodebin(14774): 0:02:58.135494000 0x697ef0 gsturidecodebin.c:879:unknown_type_cb:<uridecodebin2> warning: No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)constrained-baseline, codec_data=(buffer)0142e01effe100196742e01e96560b8df55ff83380337b4400000fa40003a9821001000568ca818332, width=(int)366, height=(int)206, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true'.
> ...
> W/GStreamer+uridecodebin(14774): 0:02:58.171656000 0x697ec0 gsturidecodebin.c:879:unknown_type_cb:<uridecodebin2> warning: No decoder available for type 'audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2'.
> W/GStreamer+decodebin2(14774): 0:02:58.172505000 0x697ec0 gstdecodebin2.c:3677:gst_decode_bin_expose:<decodebin22> No suitable plugins found
> W/GStreamer+decodebin2(14774): 0:02:58.173134000 0x697ec0 gstdecodebin2.c:3679:gst_decode_bin_expose:<decodebin22> error: no suitable plugins found
> D/GStreamer+tutorial-5(14774): 0:02:58.173645000 0x649d20 jni/tutorial-5.c:104:set_ui_message Setting message to: Error received from element decodebin22: Your GStreamer installation is missing a plug-in."
>
> I build some entire plugin libraries by adding the following lines into the Android.mk in Tutorial5 project, but nothing changed:
>
> include /home/luigi/test/gst-plugins-good/Android.mk
> include /home/luigi/test/badbad/gst-plugins-bad/Android.mk
>
> Could somebody tell me how to build gstreamer with proper plugins ?

Please read the documentation at
> http://docs.gstreamer.com/display/GstSDK/Android+tutorial+1%3A+Link+against+GStreamer
Especially at the Android.mk part. That's what you need to do to link additional plugins.


For h264 and mpeg4 you will either need to ffmpeg plugin, or the androidmedia plugin
(which only works on JellyBean and newer but uses the system/hardware codecs).

> I am also going to need some plugins for playing hls + aes encoded video.

Use the hlsdemux plugin, encryption is not supported yet though.


This email and its contents (including any attachments) are being sent to you on condition of confidentiality and may be protected by legal privilege.  Disclosure to anyone other than intended recipients is unauthorized. Unless you are the intended recipient (or authorized to receive for the intended recipient), you may not read, print, retain, use, copy, distribute or disclose to anyone the email or its contents (including any attachments). If you have received the message in error, please advise the sender by reply e-mail, and destroy all copies of the email (including any attachments).  Any business terms incorporated in the email or its contents (including any attachments) are meant solely for purposes of discussion and are non-binding on DLA, Inc. and its affiliated companies. Further, no representation is made with respect to any content contained in this email (including any attachments). Any opinions contained in this e-mail are those of the author of the message and do not necessarily reflect those of DLA, Inc. or any of its affiliated companies.


More information about the gstreamer-android mailing list