shirro
Posts: 248
Joined: Tue Jan 24, 2012 4:54 am

gstreamer openmax

Tue May 29, 2012 8:55 am

I have been waiting to see someone write up how to get gstreamer working with openmax. Not a big fan of gstreamer but it opens up a number of player options and works well from python so I want it.

So I built the gst-openmax from git and change the library path for the components to the broadcom openmaxil lib and I can see it dlopen the lib and set thing up but I haven't managed to get a full pipeline yet. I think I might need video and audio sinks as I see there is a special one for omap. Obviously we don't have xv so I tried ximagesink which works for some things but not for the omx stuff (if the omx stuff was working at all).

Anyway I think I am going around in circles so is there anyone out there who has this working or can offer guidance?

http://freedesktop.org/wiki/GstOpenMAX
http://cgit.freedesktop.org/gstreamer/gst-openmax/

User avatar
cnxsoft
Posts: 191
Joined: Sat Oct 15, 2011 2:33 pm
Location: Chiang Mai, Thailand

Re: gstreamer openmax

Thu Jun 14, 2012 10:58 am

Some work is apparently being done on supporting the Gstreamer OpenMAX implementation for the Raspberry Pi @ http://cgit.freedesktop.org/gstreamer/gst-omx

s7mx1
Posts: 78
Joined: Fri Sep 30, 2011 9:28 am

Re: gstreamer openmax

Thu Jun 14, 2012 12:36 pm

cnxsoft wrote:Some work is apparently being done on supporting the Gstreamer OpenMAX implementation for the Raspberry Pi @ http://cgit.freedesktop.org/gstreamer/gst-omx
Cool. Can't wait to see encoding/decoding function to be added into gst-omx.

Currently I am using gstreamer on a small wifi router do the video/audio collection from a cheap webcam and sends out collection data to a small server on the same network. I then use gstreamer on the small server do the decoding stuff which is quite cpu extensive. If gst-omx can utilise the hardware decoding on pi it will be great news for me (I know a separate license may needed).

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Sun Jun 17, 2012 10:12 am

Has anyone found out how to integrate openMAX with GStreamer yet? I'm going to spend today looking at it, but it's completely new to me so I don't think I will get far.

It looks like it's possible to build a media player with GStreamer and OpenMAX...

I have found some good links (But if your already working with GStreamer I'm sure you've read these)
- http://gstreamer.freedesktop.org/data/d ... index.html
- http://cgit.freedesktop.org/gstreamer/gst-omx/
- http://lists.freedesktop.org/archives/g ... r-openmax/
- http://www.khronos.org/files/openmax/wh ... reamer.pdf

If anyone has any experience with this can they please put in their two cents, if we get something up and running it will be really good that everybody will have some code they can play with and implement into their own ideas.

Richard_P
Posts: 39
Joined: Mon Jun 11, 2012 10:43 am

Re: gstreamer openmax

Sun Jun 17, 2012 11:54 am

I am pretty familiar with GStreamer but OpenMax is another beast. I compiled OpenMax-GST components and all the openmax IL things, but it still does not work :-P

Code: Select all

pi@raspberrypi:~$ gst-inspect |grep omx
omx:  omx_volume: OpenMAX IL Volume component
omx:  omx_audiosink: OpenMAX IL audiosink element
omx:  omx_mp3dec: OpenMAX IL MP3 audio decoder
omx:  omx_vorbisdec: OpenMAX IL Vorbis audio decoder
omx:  omx_h263enc: OpenMAX IL H.263 video encoder
omx:  omx_h264enc: OpenMAX IL H.264/AVC video encoder
omx:  omx_mpeg4enc: OpenMAX IL MPEG-4 video encoder
omx:  omx_wmvdec: OpenMAX IL WMV video decoder
omx:  omx_h263dec: OpenMAX IL H.263 video decoder
omx:  omx_h264dec: OpenMAX IL H.264/AVC video decoder
omx:  omx_mpeg4dec: OpenMAX IL MPEG-4 video decoder
omx:  omx_dummy_2: OpenMAX IL dummy element
omx:  omx_dummy: OpenMAX IL dummy element
when i try a dummy pipleline, I get an error

Code: Select all

pi@raspberrypi:~$ gst-launch fakesrc ! omx_mp3dec ! fakesink
OMX-library /usr/local/lib/omxloaders/libomxdynamicloader.so dlopen error: /usr/local/lib/omxloaders/libomxdynamicloader.so: undefined symbol: RM_Deinit
OMX-Component not found with current ST static component loader.
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
Freeing pipeline ...
I guess I have more hunting to do..

Richard

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Sun Jun 17, 2012 2:22 pm

I've spent all morning with GStreamer, at this point I've built basic pipelines and have played audio and video on my linux box. I'm going to download GstOpenMAX now and give it a try.

Let's keep this thread going for discussion and hopefully someone who has got this working can come along and drop some hints!

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Sun Jun 17, 2012 5:47 pm

I'm testing with
gst-launch-0.10 videotestsrc pattern=snow ! autovideosink
on the PI

And im getting a very quick display of about a second with just some garbage on the screen and an error message could not negotiate format.

EDIT: if i use
$ gst-launch videotestsrc ! video/x-raw-rgb, framerate=25/1, width=640, height=360 ! fbdevsink

I can get a box to appear, and the width, height will control the size.
Although the box is just a single colour, its suppose to be a test signal, so its still not working correctly.
Ill go ahead and try the IL specific elements.
Does any know the difference between
http://cgit.freedesktop.org/gstreamer/gst-openmax/
and
http://cgit.freedesktop.org/gstreamer/gst-omx/

Richard_P
Posts: 39
Joined: Mon Jun 11, 2012 10:43 am

Re: gstreamer openmax

Sun Jun 17, 2012 6:04 pm

pauly24 wrote:I'm testing with
gst-launch-0.10 videotestsrc pattern=snow ! autovideosink
on the PI

And im getting a very quick display of about a second with just some garbage on the screen and an error message could not negotiate format.

EDIT: if i use
$ gst-launch videotestsrc ! video/x-raw-rgb, framerate=25/1, width=640, height=360 ! fbdevsink

I can get a box to appear, and the width, height will control the size.
Although the box is just a single colour, its suppose to be a test signal, so its still not working correctly.
Ill go ahead and try the IL specific elements.
Does any know the difference between
http://cgit.freedesktop.org/gstreamer/gst-openmax/
and
http://cgit.freedesktop.org/gstreamer/gst-omx/
You need a colourspace convert.. (the below example works)

$ gst-launch videotestsrc ! video/x-raw-rgb, framerate=25/1, width=640, height=360 ! ffmpegcolorspace ! fbdevsink

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Sun Jun 17, 2012 6:10 pm

Thank you! testing is working now.

I'm having problems installing gst-openmax and gst-omx.

When I download the files, the configure has an ac extension and the makefile has an extension as well.

So i have to type ./configure.ac, and when I do type this I just get an error saying
line 1: syntax error near unexpected token '[2.52]'
line 1: 'AC_PREEQ([2.52])

Which is just the first line of the config file, and I doing something wrong to install these?

Richard_P
Posts: 39
Joined: Mon Jun 11, 2012 10:43 am

Re: gstreamer openmax

Sun Jun 17, 2012 6:12 pm

I used the guide there

http://freedesktop.org/wiki/GstOpenMAX

I get openmax things to register (by adding the /usr/local/lib/) paths to the /etc/ld.conf.d/ files so that loconfig could see the new omx libraries... thats as far as I got today.

R

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Sun Jun 17, 2012 6:28 pm

Ah yes, i missed the bit down the bottom.
./autogen.sh --noconfigure
./configure --prefix="$HOME/omx"
make install

this is for
http://cgit.freedesktop.org/gstreamer/gst-openmax/

will it also work for
http://cgit.freedesktop.org/gstreamer/gst-omx/?

Im struggling to find the difference between the two, plus gst-omx doesn't have a wiki page to explain about it.

Richard_P
Posts: 39
Joined: Mon Jun 11, 2012 10:43 am

Re: gstreamer openmax

Sun Jun 17, 2012 6:33 pm

I have no idea :-P ... perhaps the gst-omx is the Raspberry branch ? (maybe I went wrong there :-P)

R

shirro
Posts: 248
Joined: Tue Jan 24, 2012 4:54 am

Re: gstreamer openmax

Mon Jun 18, 2012 1:01 am

I think -omx is a fork but I can't remember the details. I got both to build and got configs that were dl-opening the openmax libs but I couldn't work out how to get a pipeline going or even if the config files were right.

I wish someone could tell us what needs to be done. It would be such a big win to get gstreamer working. Can we use omx as an audio sink as well? It would be handy to avoid the ALSA drivers in their current state.

Richard_P
Posts: 39
Joined: Mon Jun 11, 2012 10:43 am

Re: gstreamer openmax

Mon Jun 18, 2012 4:43 pm

shirro wrote:I think -omx is a fork but I can't remember the details. I got both to build and got configs that were dl-opening the openmax libs but I couldn't work out how to get a pipeline going or even if the config files were right.

I wish someone could tell us what needs to be done. It would be such a big win to get gstreamer working. Can we use omx as an audio sink as well? It would be handy to avoid the ALSA drivers in their current state.
I am trying to compile the fork gst-omx and have this problem..

checking whether gcc -std=gnu99 implements __func__... yes
checking for GLIB... no
configure: Requested 'glib-2.0 >= 2.32' but version of GLib is 2.24.2
configure: error: This package requires GLib >= 2.32 to compile.
pi@raspberrypi:~/Sources/gst-omx$

I cant seem to find the version in the repos. What package did you install to satisfy the glib issue?

Edit: changing the configure script, I got another error
configure: No package 'gstreamer-1.0' found
configure: error: no gstreamer-1.0 >= 0.11.90 (GStreamer) found


Richard
Last edited by Richard_P on Mon Jun 18, 2012 4:56 pm, edited 1 time in total.

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm

Re: gstreamer openmax

Mon Jun 18, 2012 4:46 pm

You'll want to use Debian wheezy and might have most luck building http://cgit.collabora.com/git/user/gkia ... ebian.git/ in the 'proper debian way'.

Richard_P
Posts: 39
Joined: Mon Jun 11, 2012 10:43 am

Re: gstreamer openmax

Mon Jun 18, 2012 6:32 pm

asb wrote:You'll want to use Debian wheezy and might have most luck building http://cgit.collabora.com/git/user/gkia ... ebian.git/ in the 'proper debian way'.
Thanks... taking a look now :D

I also noticed that I was using the wrong branch... GIT defaulted to HEAD and I wanted raspberry

git clone -b raspberry git://anongit.freedesktop.org/gstreamer/gst-omx

Richard

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Mon Jun 18, 2012 8:04 pm

Alright now im confused, i've been using linux for 3 weeks now.
What do you mean by debian proper way?
also what is that link you posted asb?

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Mon Jun 18, 2012 8:16 pm

Alright I git clone http://cgit.collabora.com/git/user/gkia ... ebian.git/

and the error I'm getting when I use ./configure is

Requested 'gstreamer-0.10>=0.10.35.1' but version of GStreamer is 0.10.30

I just apt-get install gstreamer0.10 and I'm still getting this error.

Richard_P
Posts: 39
Joined: Mon Jun 11, 2012 10:43 am

Re: gstreamer openmax

Mon Jun 18, 2012 8:38 pm

pauly24 wrote:Alright I git clone http://cgit.collabora.com/git/user/gkia ... ebian.git/

and the error I'm getting when I use ./configure is

Requested 'gstreamer-0.10>=0.10.35.1' but version of GStreamer is 0.10.30

I just apt-get install gstreamer0.10 and I'm still getting this error.
Stuck at the same place..... I did notice that Rasbian has 10.36 in their repo but I lost motivation to try it...

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Mon Jun 18, 2012 8:41 pm

I found 10.35
http://cgit.freedesktop.org/gstreamer/g ... SE-0.10.35

But when I download it, ./configure doesn't work, no file exists. So i have no idea how to install now.

Theres also other versions here, http://cgit.freedesktop.org/gstreamer/gstreamer/

How do I install the 0.10.35?

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Mon Jun 18, 2012 10:47 pm

Richard I did as asb said and it seems to be working so far.

I did a fresh install with a wheezy disto for raspberry I found in this forum.

Then I
apt-get install gstreamer0.10-0
apt-get install gstreamer0.10-tools
apt-get install gstreamer0.10-plugins
apt-get install gstreamer0.10-plugins-base
apt-get install gstreamer0.10-plugins-bad

After I did all them this code worked fine
gst-launch-0.10 videotestsrc ! video/x-raw-rgb, framerate=25/1, width=640, height=360 ! ffmpegcolorspace ! fbdevsink

I'm now installing git://git.collabora.co.uk/git/user/gkiagia/gst-omx0.10-debian.git
its happy because im using wheezy which means the gstreamer version that got installed is 0.36.

I'm just in the process of installing a bunch of packages it wants, which so far have been
sudo apt-get install autoconf
sudo apt-get install libtool
sudo apt-get install gtk-doc-tools

It seemed to have install, but where do I find a list of the elemnts that this plugin has installed?
Last edited by pauly24 on Mon Jun 18, 2012 11:10 pm, edited 1 time in total.

shirro
Posts: 248
Joined: Tue Jan 24, 2012 4:54 am

Re: gstreamer openmax

Mon Jun 18, 2012 11:07 pm

Yes Wheezy is the key. I have been using Raspbian but the "official" Debian Wheezy will do the job. I can't remember what I installed. I know I installed all the gstreamer packages and most likely the -dev versions and a few other things. I may have even done an apt-get build-dep on gstreamer. Having compiled it, and having dropped the config file in the proper place, how do you actually make it work? I just don't get it.

I was playing with vlc yesterday. I configured with omx and it compiled cleanly but I haven't tried it (there are two omx options, haven't worked out the details yet). I noticed it has an egl backend and though I might add dispmanx boilerplate. Has anyone been looking at that? I find it hard to complete anything with young kids running amok.

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Mon Jun 18, 2012 11:31 pm

I just dont understand enough linux.
I installed git://git.collabora.co.uk/git/user/gkiagia/gst-omx0.10-debian.git, did ./autogen.sh and configure and make, then make install.

There was a directory called omx, so i went into there and did the same thing, it said it copied a bunch of files to /usr/local/lib/gstreamer-0.10, so i went in there and theres 3 fiels. libgstopenmax.a, libgstopenmax.la and libgstopenmax.so.

But if I now do a
gst-inspect |grep omx
gst-inspect |grep open
gst-inspect |grep gst
I'm not finding any of these new elements.

Richard_P
Posts: 39
Joined: Mon Jun 11, 2012 10:43 am

Re: gstreamer openmax

Tue Jun 19, 2012 6:33 am

pauly24 wrote:I just dont understand enough linux.
I installed git://git.collabora.co.uk/git/user/gkiagia/gst-omx0.10-debian.git, did ./autogen.sh and configure and make, then make install.

There was a directory called omx, so i went into there and did the same thing, it said it copied a bunch of files to /usr/local/lib/gstreamer-0.10, so i went in there and theres 3 fiels. libgstopenmax.a, libgstopenmax.la and libgstopenmax.so.

But if I now do a
gst-inspect |grep omx
gst-inspect |grep open
gst-inspect |grep gst
I'm not finding any of these new elements.
If you just ran ./configure, then the libraries are in /usr/local/lib (the --prefix statement in ./configure will change the path) but you need to tell GStreamer where to look.

before running gst-inspect, rm -rf /home/pi/.gstreamer-0.10/ (remove the old plugin cache)
export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-0.10

then gst-inspect
this will rebuild the cache with the new components.

Richard

pauly24
Posts: 59
Joined: Fri May 18, 2012 2:42 pm

Re: gstreamer openmax

Tue Jun 19, 2012 6:23 pm

I updated the cache, but they still weren't showing.
It wasn't showing up because they were black listed.

If i type
$gst-inspect-0.10 -b
it returns

Blacklisted files:
libgstopus.so
libgstopenmax.so

then if i type
$gst-inspect-0.10 libgstopenmax.so

I get

Plugin Details:
Name libgstopenmax.so
Description: Plugin for blacklisted file
Filename: /usr/local/lib/gstreamer-0.10/libgstpopenmax.so
Version: 0.0.0
License: BLACKLIST
Source module: BLACKLIST
Binary package: BLACKLIST
Origin URL: BLACKLIST

0 features:

Return to “Graphics, sound and multimedia”