User avatar
fbutler
Posts: 302
Joined: Thu Mar 15, 2012 4:09 pm
Location: Surrey, England

Re: gstreamer openmax

Thu Mar 28, 2013 8:08 am

emmynet wrote:Hi,
What do you think of this guide?
http://permalink.gmane.org/gmane.comp.v ... evel/43011
E*
The guide didn't work for me without modifications. Scroll down in this thread for further comments made on the guide since it was posted:

http://comments.gmane.org/gmane.comp.vi ... evel/43011

I'm now attempting to compile it directly on the Pi with the additional inclusion of the gtk-doc-tools package using:

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

and the use of the

make CFLAGS+="-Wno-error"

flag on the gst-plugins-bad and gst-omx compilations.

I also had to edit one of the source files to correct an unterminated #ifdef issue, but I can't remember which file it was in. <doh!>

For reference here's the complete list of commands I've now used for compilation. Apologies in advance if I've made any typos etc in my cutting and pasting of this:

Code: Select all

# 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

################# COMPILE GSTREAMER 1.0 ############

sudo apt-get install -y build-essential autotools-dev automake autoconf libtool autopoint libxml2-dev zlib1g-dev libglib2.0-dev pkg-config bison flex python git

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

sudo apt-get install -y libasound2-dev libgudev-1.0-dev libxt-dev libvorbis-dev libcdparanoia-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev iso-codes libgtk-3-dev libraw1394-dev libiec61883-dev libavc1394-dev libv4l-dev libcairo2-dev libcaca-dev libspeex-dev libpng-dev libshout3-dev libjpeg-dev libaa1-dev libflac-dev libdv4-dev libtag1-dev libwavpack-dev libpulse-dev libsoup2.4-dev libbz2-dev libcdaudio-dev libdc1394-22-dev ladspa-sdk libass-dev libcurl4-gnutls-dev libdca-dev libdirac-dev libdvdnav-dev libexempi-dev libexif-dev libfaad-dev libgme-dev libgsm1-dev libiptcdata0-dev libkate-dev libmimic-dev libmms-dev libmodplug-dev libmpcdec-dev libofa0-dev libopus-dev librsvg2-dev librtmp-dev libschroedinger-dev libslv2-dev libsndfile1-dev libsoundtouch-dev libspandsp-dev libx11-dev libxvidcore-dev libzbar-dev libzvbi-dev liba52-0.7.4-dev libcdio-dev libdvdread-dev libmad0-dev libmp3lame-dev libmpeg2-4-dev libopencore-amrnb-dev libopencore-amrwb-dev libsidplay1-dev libtwolame-dev libx264-dev

cd $HOME 
mkdir gstreamer-1.0
cd gstreamer-1.0

git clone git://anongit.freedesktop.org/git/gstreamer/gstreamer
cd gstreamer
./autogen.sh 
make
sudo make install
cd ..

git clone git://anongit.freedesktop.org/git/gstreamer/orc
cd orc
./autogen.sh
make
sudo make install
cd ..

git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-base
cd gst-plugins-base
./autogen.sh
make
sudo make install
cd ..

git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-good
cd gst-plugins-good
./autogen.sh 
make
sudo make install
cd ..

git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-ugly
cd gst-plugins-ugly
./autogen.sh 
make
sudo make install
cd ..

git clone git://anongit.freedesktop.org/git/gstreamer/gst-libav
cd gst-libav
./autogen.sh
make
sudo make install
cd ..

git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad
cd gst-plugins-bad
LDFLAGS='-L/opt/vc/lib' CPPFLAGS='-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux' ./autogen.sh 
make CFLAGS+="-Wno-error"
sudo make install
cd ..

################# COMPILE GST-OMX ##########

git clone git://anongit.freedesktop.org/git/gstreamer/gst-omx
cd gst-omx
LDFLAGS='-L/opt/vc/lib' CPPFLAGS='-I/opt/vc/include -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux' ./autogen.sh --with-omx-target=rpi
make CFLAGS+="-Wno-error"
sudo make install

cd $HOME
echo -e \\n# Gstreamer environment >> .profile
echo export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0/ >> .profile
echo export GST_OMX_CONFIG_DIR=/usr/local/etc/xdg/ >> .profile
echo export LD_LIBRARY_PATH=/usr/local/lib/ >> .profile
. ./.profile

rm ~/.cache/gstreamer-1.0/registry.armv6l.bin

# Install the v4l-utils to be able to use the v4l2-ctl command to configure v4l2 input devices, such as webcams, if required
sudo apt-get install v4l-utils
And here's the result:

Code: Select all

pi@raspberrypi ~/gstreamer-1.0 $ gst-inspect-1.0 | grep omx
omx:  omxmpeg2videodec: OpenMAX MPEG2 Video Decoder
omx:  omxmpeg4videodec: OpenMAX MPEG4 Video Decoder
omx:  omxh263dec: OpenMAX H.263 Video Decoder
omx:  omxh264dec: OpenMAX H.264 Video Decoder
omx:  omxtheoradec: OpenMAX Theora Video Decoder
omx:  omxvp8dec: OpenMAX VP8 Video Decoder
omx:  omxmjpegdec: OpenMAX MJPEG Video Decoder
omx:  omxvc1dec: OpenMAX WMV Video Decoder
omx:  omxh264enc: OpenMAX H.264 Video Encoder
pi@raspberrypi ~/gstreamer-1.0 $ gst-inspect-1.0 | grep fbdevsink
fbdevsink:  fbdevsink: fbdev video sink
Now that it appears to have compiled OK I'll start testing it tonight.

User avatar
Defiant
Posts: 181
Joined: Tue Oct 30, 2012 6:17 pm
Location: Hamburg, Germany

Re: gstreamer openmax

Thu Mar 28, 2013 8:16 am

For GStreamer 1.0 you could have just compiled the debian packages.

Vavooon
Posts: 10
Joined: Mon Dec 17, 2012 1:48 pm

Re: gstreamer openmax

Thu Mar 28, 2013 8:19 am

I can dump my OS with fully working gst-omx and upload ot, if you want.

User avatar
fbutler
Posts: 302
Joined: Thu Mar 15, 2012 4:09 pm
Location: Surrey, England

Re: gstreamer openmax

Thu Mar 28, 2013 8:21 am

Defiant wrote:For GStreamer 1.0 you could have just compiled the debian packages.
Yeah, but last time I looked they didn't include fbdevsink which I wanted so I decided to use the git source for them all.

User avatar
wouter
Posts: 12
Joined: Sat Jan 21, 2012 12:13 pm

Re: gstreamer openmax

Thu Mar 28, 2013 9:01 pm

fbutler wrote:The guide didn't work for me without modifications. Scroll down in this thread for further comments made on the guide since it was posted:
--cut--
Now that it appears to have compiled OK I'll start testing it tonight.
First off all, I would really like to thank you for the guide :D

I'm trying to get this stuff working through your guide, but I get an error when I try to 'make' the gst-plugins-base. Gstreamer and orc are succesfully installed.


When I try to execute 'make' it returns this error:
http://imgur.com/djU9SAv

Because some people have problems with this plugin and orc, I tried to make it with the "Cflags += -WNO-Errors" argument. This resulted in another error:
http://imgur.com/NW5lHUI

I'm not using the official raspbian image because it produces lot of overhead. I'm using the darkbasic minimal image (http://www.linuxsystems.it/2012/06/rasp ... mal-image/).

Do you (or somebody else) have any idea how I can solve this? :)

User avatar
wouter
Posts: 12
Joined: Sat Jan 21, 2012 12:13 pm

Re: gstreamer openmax

Tue Apr 02, 2013 8:35 pm

I finally got the h.264 hardware encoder to work :D

If you want to start very quickly, just add 'defiants' repository, and download the packages. That way you don't have to waste hours on compiling. The packages are up to date.


Code: Select all

echo "deb http://vontaene.de/raspbian-updates/ . main" >> /etc/apt/sources.list

apt-get update

apt-get install libgstreamer1.0-0 libgstreamer1.0-0-dbg libgstreamer1.0-dev liborc-0.4-0 liborc-0.4-0-dbg liborc-0.4-dev liborc-0.4-doc gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gstreamer1.0-alsa gstreamer1.0-doc gstreamer1.0-omx gstreamer1.0-plugins-bad gstreamer1.0-plugins-bad-dbg gstreamer1.0-plugins-bad-doc gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-base-dbg gstreamer1.0-plugins-base-doc gstreamer1.0-plugins-good gstreamer1.0-plugins-good-dbg gstreamer1.0-plugins-good-doc gstreamer1.0-plugins-ugly gstreamer1.0-plugins-ugly-dbg gstreamer1.0-plugins-ugly-doc gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-x libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-bad1.0-dev libgstreamer-plugins-base1.0-0 libgstreamer-plugins-base1.0-dev
Last edited by wouter on Sun Apr 21, 2013 2:59 pm, edited 1 time in total.

gzahl
Posts: 2
Joined: Thu Apr 04, 2013 1:43 pm

Re: gstreamer openmax

Thu Apr 04, 2013 1:47 pm

Hey,

My goal is to get hw accelerated html5 video tags trough gstreamer in uzbl.
I have installed the debian packages from Defiant, but uzbl does not recognizes any plugins to play the html5 video. Is it even included in gstreamer1.0?
Maybe i should try gstreamer0.10 with openmax support?

The gstreamer0.10 plugins which come prepackaged in raspbian enable video playback in uzbl, but of course it is more of a very slow slideshow.

User avatar
Defiant
Posts: 181
Joined: Tue Oct 30, 2012 6:17 pm
Location: Hamburg, Germany

Re: gstreamer openmax

Thu Apr 04, 2013 5:35 pm

There is no specific html5 decoder plugin or element. You have to check the video codec used in your html5 video. If it is h264 then gstreamer-openmax should be able to handle it.

Afaik other commonly used formats in html5, like VP8 or Ogg are currently not handled by the hardware decoder.

Please note that I currently don't have any libav/gst-ffmpeg software-decoder in the repository.
So yes, some codecs are missing.

wouter:
Usually there is no need to install -doc or -dbg packages.

gzahl
Posts: 2
Joined: Thu Apr 04, 2013 1:43 pm

Re: gstreamer openmax

Fri Apr 05, 2013 10:09 am

Ok, This works:
gst-launch-1.0 uridecodebin uri="file:///var/www/movie.mp4" ! aasink
but my browser uzbl is not able to play the same file in a html5 video tag. The same file works on my desktop pc. But i guess this is a uzbl related issue not able to use gstreamer at the moment :cry:
I hope i can find a fix, that would be awesome for my digital signage solution :)

m][sko
Posts: 134
Joined: Fri Jul 20, 2012 6:37 am
Location: Slovakia

Re: gstreamer openmax

Fri Apr 05, 2013 1:34 pm

gzahl wrote:Ok, This works:
gst-launch-1.0 uridecodebin uri="file:///var/www/movie.mp4" ! aasink
but my browser uzbl is not able to play the same file in a html5 video tag. The same file works on my desktop pc. But i guess this is a uzbl related issue not able to use gstreamer at the moment :cry:
I hope i can find a fix, that would be awesome for my digital signage solution :)
I don't think that your uzbl is compiled with gstreamer 1.0 or support gstreamer 1.0
You sould build gst-omx for gstreamer 0.10 ( branch 0.10 )
and if gst-launch-0.10 uridecodebin uri="file:///var/www/movie.mp4" works fine
uzbl should work too

satadru
Posts: 42
Joined: Thu Apr 18, 2013 5:18 pm

Re: gstreamer openmax

Thu Apr 18, 2013 5:22 pm

Does somebody have a working command line to test the omx encoding?

I'm trying to encode an mpeg2 file to h264. This should be possible with omxmpeg2videodec and omxh264enc, yes? (Assuming that a MPEG2 license has been purchased to enable this?)

I've installed the version of gstreamer-1.0 as mentioned by wout above on a current raspbian system.

I've gotten this to work w/o audio (for 14 seconds of video before it quits), with some video corruption at the bottom of the video, using this pipeline:

Code: Select all

gst-launch-1.0 filesrc location=test.mpg ! decodebin ! videoconvert ! omxh264enc ! "video/x-h264,profile=high" ! h264parse ! matroskamux ! filesink location=test.mkv
This is the output I get:

Code: Select all

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

** (gst-launch-1.0:2570): WARNING **: Too old frames, bug in decoder -- please file a bug
Got EOS from element "pipeline0".
Execution ended after 51472179878 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
If I prepend my pipeline command with GST_DEBUG="omx:5" I get a bigger file... which is 600ms longer.

I'd like to find a proper pipeline to do both video and audio from an mpeg file, which as much gpu acceleration as possible.

Mediainfo tells me my mpeg looks like this:

Code: Select all

General
ID                                       : 0 (0x0)
Complete name                            : test.mpg
Format                                   : MPEG-TS
File size                                : 24.1 MiB
Duration                                 : 14s 239ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 14.1 Mbps

Video
ID                                       : 1006 (0x3EE)
Menu ID                                  : 1 (0x1)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@High
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : Variable
Codec ID                                 : 2
Duration                                 : 14s 248ms
Bit rate mode                            : Variable
Bit rate                                 : 12.8 Mbps
Maximum bit rate                         : 20.0 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 29.970 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.206
Time code of first frame                 : 09:07:25;29
Time code source                         : Group of pictures header
Stream size                              : 21.7 MiB (90%)

Audio #1
ID                                       : 1007 (0x3EF)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : 129
Duration                                 : 14s 240ms
Bit rate mode                            : Constant
Bit rate                                 : 384 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 668 KiB (3%)
Language                                 : English

Audio #2
ID                                       : 1008 (0x3F0)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : 129
Duration                                 : 14s 272ms
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 223 KiB (1%)
Language                                 : English
Language, more info                      : Visual impaired commentary

Audio #3
ID                                       : 2079 (0x81F)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : 129
Duration                                 : 14s 272ms
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 223 KiB (1%)
Language                                 : Spanish
Mediainfo tells me the created mkv file from the above pipeline has this:

Code: Select all

General
Unique ID                                : 70278982459263369138293341470800223660 (0x34DF3D5B8880F605106190B374781DAC)
Complete name                            : test.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 2.49 MiB
Duration                                 : 14s 812ms
Overall bit rate                         : 1 411 Kbps
Encoded date                             : UTC 2013-04-18 18:00:52
Writing application                      : GStreamer Matroska muxer
Writing library                          : GStreamer plugin version 1.0.6

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.0
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 1 frame
Format settings, GOP                     : M=1, N=60
Codec ID                                 : V_MPEG4/ISO/AVC
Bit rate                                 : 1 383 Kbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Title                                    : Video
Language                                 : English
Default                                  : Yes
Forced                                   : No

Laeraren
Posts: 3
Joined: Mon May 13, 2013 6:23 pm

Re: gstreamer openmax

Mon May 13, 2013 6:28 pm

When I heard of the QtonPi project, I thought I was going to be able to install a package on my Pi and get cracking. How woefully wrong I was. Cross-compiling hither and dither, godawful documentation (if any), broken code and no consensus about how to get something as simple as a video running. Well, that's the open source community for you.

albertd
Posts: 51
Joined: Thu Aug 30, 2012 8:10 pm

Re: gstreamer openmax

Mon May 13, 2013 11:06 pm

Hi Laeraren,

We're working on a QT5 Build Environment as we speak, feel free to checkout our github:

https://github.com/albertd/buildroot-rpi

Cheers,
Albert

m][sko
Posts: 134
Joined: Fri Jul 20, 2012 6:37 am
Location: Slovakia

Re: gstreamer openmax

Tue May 14, 2013 9:03 am

satadru wrote:Does somebody have a working command line to test the omx encoding?
If I generate .ts all works fine
gst-omx encoder don't set up encoder bittrate correctly( you will get some default output bitrate ).
I found solution and I will post patch to gst-omx
Last edited by m][sko on Tue May 14, 2013 10:27 am, edited 1 time in total.

m][sko
Posts: 134
Joined: Fri Jul 20, 2012 6:37 am
Location: Slovakia

Re: gstreamer openmax

Tue May 14, 2013 9:05 am

albertd wrote:Hi Laeraren,

We're working on a QT5 Build Environment as we speak, feel free to checkout our github:

https://github.com/albertd/buildroot-rpi

Cheers,
Albert
Do you have working QML video ?

albertd
Posts: 51
Joined: Thu Aug 30, 2012 8:10 pm

Re: gstreamer openmax

Tue May 14, 2013 10:02 am

Not yet but you could add the following in the QtMultimedia:

http://thebugfreeblog.blogspot.com

Cheers,
Albert

User avatar
Defiant
Posts: 181
Joined: Tue Oct 30, 2012 6:17 pm
Location: Hamburg, Germany

Re: gstreamer openmax

Mon May 20, 2013 8:06 am

omxh264enc seems to fail if I try to set any parameter, like i-Frames, does someone know whats wrong?

Code: Select all

erik@rpi:~> GST_DEBUG="omx:5" gst-launch-1.0 videotestsrc ! omxh264enc quant-i-frames=1 ! fakesink
0:00:00.317038437  2620  0x12b4d20 DEBUG                    omx gstomx.c:2758:plugin_init: Registering element 'omxmpeg2videodec'
0:00:00.319908622  2620  0x12b4d20 DEBUG                    omx gstomx.c:2758:plugin_init: Registering element 'omxmpeg4videodec'
0:00:00.322081762  2620  0x12b4d20 DEBUG                    omx gstomx.c:2758:plugin_init: Registering element 'omxh263dec'
0:00:00.324576923  2620  0x12b4d20 DEBUG                    omx gstomx.c:2758:plugin_init: Registering element 'omxh264dec'
0:00:00.326071019  2620  0x12b4d20 DEBUG                    omx gstomx.c:2758:plugin_init: Registering element 'omxtheoradec'
0:00:00.327619119  2620  0x12b4d20 ERROR                    omx gstomx.c:2773:plugin_init: Invalid type name 'GstOMXTheoraDec' for element 'omxtheoradec'
0:00:00.327912137  2620  0x12b4d20 DEBUG                    omx gstomx.c:2758:plugin_init: Registering element 'omxvp8dec'
0:00:00.328919203  2620  0x12b4d20 ERROR                    omx gstomx.c:2773:plugin_init: Invalid type name 'GstOMXVP8Dec' for element 'omxvp8dec'
0:00:00.329198221  2620  0x12b4d20 DEBUG                    omx gstomx.c:2758:plugin_init: Registering element 'omxmjpegdec'
0:00:00.330410299  2620  0x12b4d20 DEBUG                    omx gstomx.c:2758:plugin_init: Registering element 'omxvc1dec'
0:00:00.331817390  2620  0x12b4d20 DEBUG                    omx gstomx.c:2758:plugin_init: Registering element 'omxh264enc'
0:00:00.333427494  2620  0x12b4d20 DEBUG                    omx gstomx.c:2635:_class_init: No sink template caps specified for element 'omxh264enc', using default 'video/x-raw, width = (int) [ 1, max ], height = (int) [ 1, max ], framerate = (fraction) [ 0, max ]'
0:00:00.337641765  2620  0x12b4d20 DEBUG                    omx gstomx.c:2659:_class_init: No src template caps specified for element 'omxh264enc', using default 'video/x-h264, width=(int) [ 16, 4096 ], height=(int) [ 16, 4096 ]'
0:00:00.339654895  2620  0x12b4d20 DEBUG                    omx gstomx.c:2684:_class_init: Using hack: no-component-role
Setting pipeline to PAUSED ...
0:00:00.371980979  2620  0x12b4d20 DEBUG                    omx gstomx.c:129:gst_omx_core_acquire: Successfully loaded core '/opt/vc/lib/libopenmaxil.so'
0:00:00.376071242  2620  0x12b4d20 DEBUG                    omx gstomx.c:144:gst_omx_core_acquire: Successfully initialized core '/opt/vc/lib/libopenmaxil.so'
0:00:00.380312515  2620  0x12b4d20 DEBUG                    omx gstomx.c:653:gst_omx_component_new:<omxh264enc-omxh264enc0> Successfully got component handle 0x12df600 (OMX.broadcom.video_encode) from core '/opt/vc/lib/libopenmaxil.so'
0:00:00.383036691  2620  0x12b4d20 DEBUG                    omx gstomx.c:807:gst_omx_component_get_state:<omxh264enc-omxh264enc0> Getting state of video_encode
0:00:00.384972816  2620  0x12b4d20 DEBUG                    omx gstomx.c:884:gst_omx_component_get_state:<omxh264enc-omxh264enc0> video_encode returning state Loaded
0:00:00.386944943  2620  0x12b4d20 DEBUG                    omx gstomx.c:906:gst_omx_component_add_port:<omxh264enc-omxh264enc0> video_encode adding port 200
0:00:00.388104018  2620  0x12b4d20 DEBUG                    omx gstomx.c:997:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x02000001
0:00:00.390176152  2620  0x12b4d20 DEBUG                    omx gstomx.c:1000:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x02000001: None (0x00000000)
0:00:00.392200282  2620  0x12b4d20 DEBUG                    omx gstomx.c:906:gst_omx_component_add_port:<omxh264enc-omxh264enc0> video_encode adding port 201
0:00:00.392503302  2620  0x12b4d20 DEBUG                    omx gstomx.c:997:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x02000001
0:00:00.394196411  2620  0x12b4d20 DEBUG                    omx gstomx.c:1000:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x02000001: None (0x00000000)
0:00:00.395459492  2620  0x12b4d20 DEBUG                    omx gstomx.c:997:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000002
0:00:00.396230542  2620  0x12b4d20 DEBUG                    omx gstomx.c:1000:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000002: None (0x00000000)
0:00:00.397616631  2620  0x12b4d20 DEBUG                    omx gstomx.c:1016:gst_omx_component_set_parameter:<omxh264enc-omxh264enc0> Setting video_encode parameter at index 0x06000002
0:00:00.398370680  2620  0x12b4d20 DEBUG                    omx gstomx.c:1019:gst_omx_component_set_parameter:<omxh264enc-omxh264enc0> Set video_encode parameter at index 0x06000002: Version mismatch (0x8000100f)
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0: Could not initialize supporting library.
Additional debug info:
gstvideoencoder.c(1407): gst_video_encoder_change_state (): /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0:
Failed to open encoder
Setting pipeline to NULL ...
Freeing pipeline ...

sulix
Posts: 1
Joined: Wed Jun 05, 2013 5:19 pm

Re: gstreamer openmax

Wed Jun 05, 2013 5:45 pm

m][sko wrote:
satadru wrote:Does somebody have a working command line to test the omx encoding?
If I generate .ts all works fine
gst-omx encoder don't set up encoder bittrate correctly( you will get some default output bitrate ).
I found solution and I will post patch to gst-omx
Hi m][sko,

i am very interested in a patch so that setting the bitrate works. Do you have some news about it?

Best regards,
Christoph

m][sko
Posts: 134
Joined: Fri Jul 20, 2012 6:37 am
Location: Slovakia

Re: gstreamer openmax

Wed Jun 05, 2013 8:46 pm

sorry, this is really hotfix !

static gboolean
gst_omx_h264_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port,
GstVideoCodecState * state)
{
GstOMXH264Enc *self = GST_OMX_H264_ENC (enc);
GstCaps *peercaps;
OMX_PARAM_PORTDEFINITIONTYPE port_def;
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
OMX_ERRORTYPE err;
const gchar *profile_string, *level_string;

gst_omx_port_get_port_definition (GST_OMX_VIDEO_ENC (self)->enc_out_port,
&port_def);
port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingAVC;

GST_WARNING_OBJECT(self, "port_def.format.video.bitrate:%u", port_def.format.video.nBitrate);

GST_DEBUG_OBJECT (self, "gst_omx_h264_enc_set_format:videobitrate:%u", port_def.format.video.nBitrate);
if(enc->target_bitrate != 0xffffffff) {
port_def.format.video.nBitrate = enc->target_bitrate;
}
GST_DEBUG_OBJECT (self, "gst_omx_h264_enc_set_format:videobitrate:%u", port_def.format.video.nBitrate);

err =
gst_omx_port_update_port_definition (GST_OMX_VIDEO_ENC
(self)->enc_out_port, &port_def);
if (err != OMX_ErrorNone)
return FALSE;

cmarty
Posts: 40
Joined: Thu Jul 19, 2012 7:23 am
Location: Czech Republic

Re: gstreamer openmax

Tue Jun 18, 2013 6:53 am

Does anybody know if there is a plan to add to gst-omx the element for decoding jpeg pictures with openmax library ?

m][sko
Posts: 134
Joined: Fri Jul 20, 2012 6:37 am
Location: Slovakia

Re: gstreamer openmax

Tue Jun 18, 2013 7:37 am

cmarty wrote:Does anybody know if there is a plan to add to gst-omx the element for decoding jpeg pictures with openmax library ?
something for mjpeg ?

cmarty
Posts: 40
Joined: Thu Jul 19, 2012 7:23 am
Location: Czech Republic

Re: gstreamer openmax

Tue Jun 18, 2013 10:50 am

m][sko wrote:
cmarty wrote:Does anybody know if there is a plan to add to gst-omx the element for decoding jpeg pictures with openmax library ?
something for mjpeg ?
Can I understand that omxmjpegdec can also decode jpeg pictures ? In that case I can not find out the proper gst-launch-1.0 pipeline to test it.

dijichi
Posts: 8
Joined: Thu Aug 01, 2013 12:17 am

Re: gstreamer openmax

Thu Aug 01, 2013 7:59 am

Defiant, thank you very (very) much for providing your gstreamer repository. Why this isn't in the official raspbian is really a mystery, as it's the only way of using gstreamer effectively on the pi which is too weak to handle much outside of the GPU.

I'm successfully en(trans?)coding an ip camera stream to mkv through omxh264enc and matroskamux using high profile, but the quality is terrible due I assume to the default settings on the omx h264 encoder. But it's impossible to alter any of the settings due to the bug mentioned above.

Could you pretty please update your gst-omx with a fix?

User avatar
Defiant
Posts: 181
Joined: Tue Oct 30, 2012 6:17 pm
Location: Hamburg, Germany

Re: gstreamer openmax

Thu Aug 01, 2013 8:29 am

Problem is I don't know how.
I havn't found a commit I can compile, they seem to have abandoned GStreamer 1.0 for 1.1.

dijichi
Posts: 8
Joined: Thu Aug 01, 2013 12:17 am

Re: gstreamer openmax

Thu Aug 01, 2013 8:35 am

Oh, I see. Any chance of providing 1.1 packages? I'd be happy to have a go, but i haven't got a clue what I'm doing with debian, more of an rpm man :)

Return to “Graphics, sound and multimedia”