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

Re: gstreamer openmax

Mon Oct 08, 2012 7:52 pm

fbutler wrote:
m][sko wrote:Hi
it looks like with latest update (firmware and rapsbian)
gst-omx don't work

gst-omx lock in preloading

any idea how to fix it?
What's the full error message you get with --gst-debug-level=2
gst-launch-0.10 --gst-debug-level=3 uridecodebin uri="file:///home/pi/test/1778150-MZNqiO.mp4" ! fakesink sync=true

http://pastebin.com/3VBgke9P


GST_DEBUG="omx:5" gst-launch-0.10 uridecodebin uri="file:///home/pi/test/1778150-MZNqiO.mp4" ! fakesink sync=true

http://pastebin.com/2Qdfw7jy

all fine with gst-ffmpeg, omxplayer can play it fine

same with /opt/vc/src/hello_pi/hello_video/test.h264
GST_DEBUG="omx:5" gst-launch-0.10 -v filesrc location="./test.h264" ! h264parse ! omxh264dec ! ffmpegcolorspace ! fbdevsink sync=false

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

Re: gstreamer openmax

Tue Oct 09, 2012 4:35 pm

m][sko,

I've recreated my gst-omx environment and can confirm that I am now having exactly the same issue as you. Here's the debug output:

http://pastebin.com/gf26Gvtm

I've also got another Pi that I haven't updated since September 4th which is still working successfully with gst-omx. Here's the debug output from that one up to the point where it starts playing:

http://pastebin.com/bCWKzgWj

The issue appears to be something to do with the omx plugin output port 131.

In the successful run on line 209 of the paste you can see "Port 131 filled buffer 0x1bc5340 (0x45442020" message followed by a "Port 131 is flushing: " message on line 215 whereas in line 210 of the other unsuccessful run paste there is a "Settings changed (port index: 131)" message followed by a "Setting port 131 to disabled" on line 214

I've no idea what is causing this difference in behaviour.

Has anyone any ideas?

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

Re: gstreamer openmax

Tue Oct 09, 2012 4:39 pm

MattSwarbrick wrote:I followed your instructions step by step and am using the "big_buck_bunny_480p_surround-fix.avi" file but seems to hang on prerolling, did you find that before? How did you get around that to be able to play some video output? Thanks for your help btw, seem to be a bit closer, but still feel far away!
Matt,

See my other recent posting in response to m][sko. There appears to be an issue using gst-omx with recent changes for some reason. Can you do a run with --gst-debug=omx:5 to confirm if you are having the same issue that we are?

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

Re: gstreamer openmax

Tue Oct 09, 2012 4:44 pm

fbutler wrote:
MattSwarbrick wrote:I followed your instructions step by step and am using the "big_buck_bunny_480p_surround-fix.avi" file but seems to hang on prerolling, did you find that before? How did you get around that to be able to play some video output? Thanks for your help btw, seem to be a bit closer, but still feel far away!
Matt,

See my other recent posting in response to m][sko. There appears to be an issue using gst-omx with recent changes for some reason. Can you do a run with --gst-debug=omx:5 to confirm if you are having the same issue that we are?
last version of gst-omx plugin was not stable too. gst-omx element stuck sometimes if I pass some data to opengl. If I enable some debug output all works fine. It looks like some sync problem in openmax

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

Re: gstreamer openmax

Tue Oct 09, 2012 6:15 pm

m][sko wrote:
last version of gst-omx plugin was not stable too. gst-omx element stuck sometimes if I pass some data to opengl. If I enable some debug output all works fine. It looks like some sync problem in openmax
Yeah, it looks like openmax is raising an event which is causing the issue. Out of curiousity I modified the switch statement the EvenHandler in gstomx.c by adding a break to the

case OMX_EventPortSettingsChanged:

statement before the rest of the code in there. When recompiled and installed gst-omx started to play the video. It stopped after a few seconds but at least it confirmed that this particular issue is being caused by the handling of an event from openmax.

So the next question is, is it openmax causing the issue by raising the event or is it the handling of the event in gst-omx that is the cause? Unfortunately I'm not familiar enough with either to know the answer.

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

Re: gstreamer openmax

Tue Oct 09, 2012 7:07 pm

m][sko wrote:last version of gst-omx plugin was not stable too. gst-omx element stuck sometimes if I pass some data to opengl. If I enable some debug output all works fine. It looks like some sync problem in openmax
I've raised the issue as a separate thread to increase visibility here: http://www.raspberrypi.org/phpBB3/viewt ... 59#p190959

MattSwarbrick
Posts: 27
Joined: Thu Oct 04, 2012 3:15 pm

Re: gstreamer openmax

Fri Nov 09, 2012 11:48 am

Hey there, It's been a while since I've been looking at rendering video using gpu on the pi with gstreamer, has anyone seen any progress with this? Think I might take a look at it again, any suggestions?

My previous attempt was able to get videos playing but with cpu usage at about 70% for 480p. I had a look into use the gl gstreamer plugins but had no luck really

antonymous
Posts: 2
Joined: Wed Jan 02, 2013 6:28 pm

Re: gstreamer openmax

Wed Jan 02, 2013 6:36 pm

i have just tried to install gst-omx and followed the posts earlier in this thread. the only problem is that after i:

- checked out the "raspberry" branch of the source
- made sure all required packages are installed

i get this during configure:

Code: Select all

configure: No package 'gstreamer-plugins-base-0.10' found
configure: error: no gstreamer-plugins-base-0.10 >= 0.10.35.1 (GStreamer Base Plugins) found
  configure failed
the thing is i have a package installed called "gstreamer0.10-plugins-base". after i changed the strings in the generated configure file i get:

Code: Select all

configure: No package 'gstreamer0.10-plugins-base' found
configure: error: no gstreamer0.10-plugins-base >= 0.10.35.1 (GStreamer Base Plugins) found
while it gives me

Code: Select all

[email protected] ~/gst-omx $ sudo apt-get install gstreamer0.10-plugins-base
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gstreamer0.10-plugins-base is already the newest version.
and

Code: Select all

[email protected] ~/gst-omx $ apt-cache showpkg gstreamer0.10-plugins-base
Package: gstreamer0.10-plugins-base
Versions: 
0.10.36-1 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages) (/var/lib/dpkg/status)
not sure how to continue here... and it seems that so many people got it working. my raspberry shows this version on login:

Code: Select all

Linux raspberrypi 3.6.11+ #348 PREEMPT Tue Jan 1 16:33:22 GMT 2013 armv6l

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

Re: gstreamer openmax

Wed Jan 02, 2013 8:27 pm

You need the -dev packages. Try
-libgstreamer0.10-dev
-libgstreamer-plugins-base0.10-dev

antonymous
Posts: 2
Joined: Wed Jan 02, 2013 6:28 pm

Re: gstreamer openmax

Wed Jan 02, 2013 9:17 pm

Defiant wrote:You need the -dev packages. Try
-libgstreamer0.10-dev
-libgstreamer-plugins-base0.10-dev
oh my god, thanks. i was only looking for packages starting with gstreamer, not lib. :oops:

luke404
Posts: 4
Joined: Mon Dec 19, 2011 9:52 pm

Re: gstreamer openmax

Fri Jan 04, 2013 4:36 pm

Is there any news on the encoding side of things or is it still not working?

biiiep
Posts: 1
Joined: Tue Feb 05, 2013 6:01 pm

Re: gstreamer openmax

Thu Feb 07, 2013 12:59 pm

hi guys,

i debugged the problem in the most recent version of gst-omx (d2f031808b4e1d51546245ee93cd5524d1ce2f63) and it seems the problem is a blocking call of OMX_GetParameter in a wrong state of the omx module.

According to OMX_Core header:
"The OMX_GetParameter macro will get one of the current parameter
settings from the component. This macro cannot only be invoked when
the component is in the OMX_StateInvalid state."

and according to OMX_STATETYPE:
" OMX_StateLoaded, /**< component has been loaded but has not completed
initialization. The OMX_SetParameter macro
and the OMX_GetParameter macro are the only
valid macros allowed to be sent to the
component in this state. */
"

So when the call is done in an invalid state the plugin is blocked and stops working.

It looks like for some reason gst_omx_video_dec_reset is called while "prerolling" which seems to be the origin for the call of OMX_GetParameter.

I suspect gst_omx_video_dec_reset is called due to some timeout.

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

Re: gstreamer openmax

Mon Feb 11, 2013 11:00 am

I hope you can fix it

DanielZ
Posts: 10
Joined: Wed Feb 06, 2013 3:31 am

Re: gstreamer openmax

Mon Feb 11, 2013 5:21 pm

Somebody said something about a some omxplayer library, does anybody know anything?

Timmmm
Posts: 14
Joined: Sun Jul 15, 2012 3:13 pm

Re: gstreamer openmax

Mon Feb 11, 2013 5:32 pm

Luca Carlon is working on something like that and says "Code might be available in [the] near future.":

http://thebugfreeblog.blogspot.it/2013/ ... dware.html

I also vaguely recall reading that the original authors of omxplayer were considering, or are actively turning it into a library. I may be making that up though.

DanielZ
Posts: 10
Joined: Wed Feb 06, 2013 3:31 am

Re: gstreamer openmax

Mon Feb 11, 2013 5:48 pm

Thanks Timmmm I'll take a look to luca's job and to the omxplayer sorce to see if I can do anything like that.

nemilos
Posts: 27
Joined: Sat Jan 05, 2013 4:16 am

Re: gstreamer openmax

Tue Feb 12, 2013 12:44 pm

ouch :(

I try to have video working in qt5 ( qtquick )

It seems that

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

is not available anymore ..

Cloning into 'gst-omx'...
fatal: Remote branch raspberry not found in upstream origin

I try with

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

but i don't have the gstomx-raspberry.conf created :(

Any solution ?

I am right to think it's possible to play hw accelerated h264 video in qt5 ?

thank you !


nemilos
Posts: 27
Joined: Sat Jan 05, 2013 4:16 am

Re: gstreamer openmax

Tue Feb 12, 2013 5:28 pm

Woaw thx ;o

Now i have well
gst-inspect-0.10 | grep omx
openmax: omxh264enc: OpenMAX H.264 Video Encoder
openmax: omxmpeg4videoenc: OpenMAX MPEG4 Video Encoder
openmax: omxh264dec: OpenMAX H.264 Video Decoder
openmax: omxmpeg4videodec: OpenMAX MPEG4 Video Decoder

My simple QML qt5 video with bunny 480p h264 still give :

- no video
- i have the sound ...
- top on raspberry give me about 80% usage of cpu ....

And qt5 output :

Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)main, codec_data=(buffer)014d401effe10015274d401ea9181b07bcde00d4040406db0ad7bdf01001000428de09c8, width=(int)854, height=(int)480, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true'."


i'am doing something wrong ?

thx for your help ;)



thx!

nemilos
Posts: 27
Joined: Sat Jan 05, 2013 4:16 am

Re: gstreamer openmax

Tue Feb 12, 2013 6:59 pm

Okay ... so ..

gst-launch-0.10 playbin2 uri=file:///big_buck_bunny_480p_h264.mov

Give me sound without video

I restarded again all the procedure ... now

gst-launch-0.10 playbin2 uri=file:///big_buck_bunny_480p_h264.mov
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPlayBin2:playbin20/GstPlaySink:playsink0: The autovideosink element is not working.
Additional debug info:
gstplaysink.c(1396): gen_video_chain (): /GstPlayBin2:playbin20/GstPlaySink:playsink0
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

BUT, i am able to play SMALL 180p h264 video in Qt5 .. no hw accelerated .. about 90% CPU used :D with this output :
xcb_connection_has_error() returned true
virtual bool QSGVideoItemSurface::present(const QVideoFrame&) I'm getting bad frames here...
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPlayBin2:playbin20/GstPlaySink:playsink0: The autovideosink element is not working.
Additional debug info:
gstplaysink.c(1396): gen_video_chain (): /GstPlayBin2:playbin20/GstPlaySink:playsink0
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
Warning: "A lot of buffers are being dropped."

i guess i still need some advice to make it hw accelerated ..thx for help ;), but i don't know if somebody success to make it happend :( ?

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

Re: gstreamer openmax

Wed Feb 13, 2013 7:43 am

try this
GST_DEBUG="omx:5" gst-launch-0.10 playbin2 uri=file:///big_buck_bunny_480p_h264.mov ! fakesink sync=true

git://anongit.freedesktop.org/gstreamer/gst-omx
don't work on raspberry pi
raspberry branch should be ok but as it is not available anymore :evil:
I don't know.

I don't know if master branch support both 0.10 and 1.0 version
But you can try gstreamer 1.0

gkiagia
Posts: 6
Joined: Mon Sep 03, 2012 9:24 am

Re: gstreamer openmax

Sat Feb 16, 2013 11:15 am

Guys, you should use the gst-omx master branch and gstreamer 1.0. The raspberry branch was deleted because it wasn't working anymore. The changes were merged in master and fixed for gstreamer 1.0. GStreamer 0.10 is no longer supported on the raspberry pi (unless somebody cares to backport the code).

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

Re: gstreamer openmax

Sat Feb 16, 2013 11:20 am

gkiagia wrote:Guys, you should use the gst-omx master branch and gstreamer 1.0. The raspberry branch was deleted because it wasn't working anymore. The changes were merged in master and fixed for gstreamer 1.0. GStreamer 0.10 is no longer supported on the raspberry pi (unless somebody cares to backport the code).
What do you use for the framebuffer element for the Pi with 1.0 as fbdevsink doesn't appear to exist in 1.0?

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

Re: gstreamer openmax

Sun Feb 17, 2013 3:32 pm

gkiagia wrote:Guys, you should use the gst-omx master branch and gstreamer 1.0. The raspberry branch was deleted because it wasn't working anymore. The changes were merged in master and fixed for gstreamer 1.0. GStreamer 0.10 is no longer supported on the raspberry pi (unless somebody cares to backport the code).


I get this on gstreamer 1.0 and gst-omx master from 17.2.

0:00:00.744419824 2650 0xfb2720 ERROR omx gstomx.c:1418:gst_omx_port_set_flushing:<omxh264dec-omxh264dec0> Failed to pass buffer 0xfcd7c0 (0xb1317020) to port 131: Bad port index (0x8000101b)
0:00:00.745987949 2650 0xfb2720 ERROR omx gstomx.c:915:gst_omx_component_set_last_error:<omxh264dec-omxh264dec0> Setting last error: Bad port index (0x8000101b)
0:00:00.748304135 2650 0xfb2720 ERROR omxvideodec gstomxvideodec.c:1154:gst_omx_video_dec_set_format:<omxh264dec-omxh264dec0> Component in error state: Bad port index (0x8000101b)
0:00:00.749858260 2650 0xfb2720 WARN videodecoder gstvideodecoder.c:788:gst_video_decoder_setcaps:<omxh264dec-omxh264dec0> Subclass refused caps
0:00:00.751556397 2650 0xfb2720 WARN videodecoder gstvideodecoder.c:1968:gst_video_decoder_chain:<omxh264dec-omxh264dec0> error: encoder not initialized
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: GStreamer error: negotiation problem.
Additional debug info:
gstvideodecoder.c(1968): gst_video_decoder_chain (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0:
encoder not initialized
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
0:00:00.763418349 2650 0xf8e820 ERROR omx gstomx.c:1307:gst_omx_port_set_flushing:<omxh264dec-omxh264dec0> Component is in error state: Bad port index (0x8000101b)
0:00:00.765047480 2650 0xf95860 WARN qtdemux qtdemux.c:3946:gst_qtdemux_loop:<qtdemux0> error: streaming stopped, reason not-negotiated
0:00:00.768997797 2650 0xf8e820 ERROR omx gstomx.c:1307:gst_omx_port_set_flushing:<omxh264dec-omxh264dec0> Component is in error state: Bad port index (0x8000101b)
0:00:00.771352987 2650 0xf8e820 ERROR omx gstomx.c:1307:gst_omx_port_set_flushing:<omxh264dec-omxh264dec0> Component is in error state: Bad port index (0x8000101b)
0:00:00.773453155 2650 0xf8e820 ERROR omx gstomx.c:1307:gst_omx_port_set_flushing:<omxh264dec-omxh264dec0> Component is in error state: Bad port index (0x8000101b)
0:00:00.777091447 2650 0xf8e820 ERROR omx gstomx.c:1607:gst_omx_port_deallocate_buffers_unlocked:<omxh264dec-omxh264dec0> Component in error state: Bad port index (0x8000101b)
0:00:00.786459200 2650 0xf8e820 ERROR omx gstomx.c:1607:gst_omx_port_deallocate_buffers_unlocked:<omxh264dec-omxh264dec0> Component in error state: Bad port index (0x8000101b)
F

gkiagia
Posts: 6
Joined: Mon Sep 03, 2012 9:24 am

Re: gstreamer openmax

Mon Feb 18, 2013 2:06 pm

The most probable cause of those errors is incorrect struct packing. Configure gst-omx with the option: --with-omx-struct-packing=4

Return to “Graphics, sound and multimedia”