19

Been having the toughest time over the last week trying to get gst-omx plugin working with gstreamer on the Raspberry PI.

I wonder if anyone here has done it and could show me how?

I've installed wheezy as git://git.collabora.co.uk/git/user/gkiagia/gst-omx0.10-debian.git needs a testing version of gstreamer.

Gstreamer is working fine on the raspberry using the normal plugins, so no hardware acceleration.

Once I install the gst-omx it comes up in the blacklist for gstreamer and I'm completely stuck as my linux knowledge is very limited so debugging is impossible for me.

Oliver Salzburg
  • 1,794
  • 1
  • 19
  • 33
user185955
  • 291
  • 1
  • 2
  • 3

3 Answers3

9

Details from Raspberry Pi forum post

Get and install rpi-update if necessary

sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo apt-get -y install git-core

Upgrade to the latest packages and firmware

sudo apt-get update
sudo apt-get upgrade -y
sudo rpi-update
sudo reboot

Get gst-omx source from the raspberry branch

cd $HOME 
git clone -b 0.10 git://anongit.freedesktop.org/gstreamer/gst-omx

Install the Gstreamer packages, and the packages required to build omx

sudo apt-get install -y autoconf gtk-doc-tools libtool 

Autogenerate the configure script, configure, make and install gst-omx

cd gst-omx
./autogen.sh --noconfigure
./configure --prefix=/home/pi/omx
make 
make install

Set up the gst-omx environment for the pi user

cp  omx/gstomx-raspberry.conf $HOME/omx/lib/gstreamer-0.10/gstomx.conf
cd $HOME
echo -e \\n# Gstreamer environment >> .profile
echo export GST_PLUGIN_PATH=$HOME/omx/lib/gstreamer-0.10/ >> .profile
echo export GST_OMX_CONFIG_DIR=$HOME/omx/lib/gstreamer-0.10/ >> .profile
echo export LD_LIBRARY_PATH=$HOME/omx/lib/gstreamer-0.10/ >> .profile
. ./.profile

Install the GStreamer Tools

sudo apt-get install gstreamer0.10-tools

Verify that gst-omx has been installed correctly.

If it has the following command should show these plug-ins:

> gst-inspect-0.10 | grep omx
openmax  omxmpeg4videodec: OpenMAX MPEG4 Video Decoder
openmax  omxh264dec: OpenMAX H.264 Video Decoder

Problems with omxmpeg plug-ins being blacklisted

There's a conflict with omx and gstreamer-plugins-bad, so the following cleared the blacklisting:

sudo aptitude remove libgstreamer-plugins-bad0.10-0

Enable omxh264enc plugin for hardware h.264 Encoding

This plugin, so far, appears to be broken, but here's how to enable it. Add the following to $GST_OMX_CONFIG_DIR/gstomx.conf

[omxh264enc]
type-name=GstOMXH264Enc
core-name=/opt/vc/lib/libopenmaxil.so
component-name=OMX.broadcom.video_encode
rank=256
in-port-index=200
out-port-index=201
hacks=no-empty-eos-buffer;no-component-role
goldilocks
  • 60,325
  • 17
  • 117
  • 234
Unkle George
  • 91
  • 1
  • 2
4

Add this repo line into /etc/apt/sources.list

deb http://vontaene.de/raspbian-updates/ . main

Then simply ....

sudo apt-get update
sudo apt-get install gstreamer1.0

That 3rd party repository is hosted by a member off the Pi forums. They compile the latest versions of the gst-omx project and publish the files there.

You can check if it recognised the Pi's hardware capabilities using this command

gst-inspect-1.0 | grep omx

enter image description here

Piotr Kula
  • 17,336
  • 6
  • 66
  • 105
4

As of April 2015 Raspbian repositories include GStreamer 1.2 and the OpenMAX plugins, so the easiest way is ppumkin's answer but without editing /etc/apt/sources.list:

sudo apt-get update
sudo apt-get install gstreamer1.0

then check with:

gst-inspect-1.0 | grep omx
M. Rubio-Roy
  • 568
  • 6
  • 10