gstreamer-1.0 plugin for videosink without X

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

gstreamer-1.0 plugin for videosink without X

Mark
Hello,
I'm customizing a Raspbian Jessie Lite image for Raspberry Pi 3 (without
X server) and I compiled gstreamer 1.8.2 from sources.
The goal is to a have a videosink for OpenGL ES2.0 (which should not
require X) and to use gstreamer as a backend for QtMultimedia (Qt5.7.0).

On stackoverflow I received an hint to use glimagesink as videosink but
it still looks for X server.
Please, would you help me to understand what plugin I need?

Thanks!

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Dave
Hi,

I've been working on a the same with a Pi2 and have found it will work but I'm having a brief flash as the sink starts playback.  To get where I am, I needed to compile gst-omx then recompile plugins-bad with switches for no-x.  I'll be back working on it tomorrow and should be able to post my compile command.

Regards,

Dave.

Dave Johnstone
Design & Broadcast Engineer
Digits Broadcast
(61)(0)448 789986

On 19 Jun 2016, at 6:49 PM, Marco Trapanese <[hidden email]> wrote:

Hello,
I'm customizing a Raspbian Jessie Lite image for Raspberry Pi 3 (without X server) and I compiled gstreamer 1.8.2 from sources.
The goal is to a have a videosink for OpenGL ES2.0 (which should not require X) and to use gstreamer as a backend for QtMultimedia (Qt5.7.0).

On stackoverflow I received an hint to use glimagesink as videosink but it still looks for X server.
Please, would you help me to understand what plugin I need?

Thanks!

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Mark
Il 19/06/2016 13:50, Dave Johnstone ha scritto:
> I've been working on a the same with a Pi2 and have found it will work
> but I'm having a brief flash as the sink starts playback.  To get
> where I am, I needed to compile gst-omx then recompile plugins-bad
> with switches for no-x.  I'll be back working on it tomorrow and
> should be able to post my compile command.

I thank you very much. I'm waiting for you hints and then I'll report
back if it works also on my system.
Regards
Marco

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Mark

In the meanwhile I'm recompiling all from git sources which are more recent than tar.gz file and have fixed some issues.
After compiling gstreamer, plugins base/good I tried to compile gst-omx in this way:

./configure --prefix=/usr --sysconfdir=/etc --with-omx-header-path=/opt/vc/include/IL --with-omx-target=rpi CPPFLAGS="-I/tmp/src/gst-plugins-bad/gst-libs -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads/ -I/opt/vc/include/interface/vmcs_host/linux/"

but the building fails:

[lot of similar warnings]
testegl.c:1383:5: warning: nested extern declaration of ‘glDetachShader’ [-Wnested-externs]
testegl.c:1392:5: warning: implicit declaration of function ‘glDeleteProgram’ [-Wimplicit-function-declaration]
     glDeleteProgram (state->program);
     ^
testegl.c:1392:5: warning: nested extern declaration of ‘glDeleteProgram’ [-Wnested-externs]
  CCLD     testegl
testegl-testegl.o: In function `open_ogl':
/tmp/src/gst-omx/examples/egl/testegl.c:1425: undefined reference to `bcm_host_init'
testegl-testegl.o: In function `init_ogl':
/tmp/src/gst-omx/examples/egl/testegl.c:434: undefined reference to `eglSaneChooseConfigBRCM'
/tmp/src/gst-omx/examples/egl/testegl.c:451: undefined reference to `graphics_get_display_size'
/tmp/src/gst-omx/examples/egl/testegl.c:465: undefined reference to `vc_dispmanx_display_open'
/tmp/src/gst-omx/examples/egl/testegl.c:466: undefined reference to `vc_dispmanx_update_start'
/tmp/src/gst-omx/examples/egl/testegl.c:469: undefined reference to `vc_dispmanx_element_add'
/tmp/src/gst-omx/examples/egl/testegl.c:477: undefined reference to `vc_dispmanx_update_submit_sync'
testegl-testegl.o: In function `close_ogl':
/tmp/src/gst-omx/examples/egl/testegl.c:1410: undefined reference to `vc_dispmanx_update_start'
/tmp/src/gst-omx/examples/egl/testegl.c:1411: undefined reference to `vc_dispmanx_element_remove'
/tmp/src/gst-omx/examples/egl/testegl.c:1412: undefined reference to `vc_dispmanx_update_submit_sync'
/tmp/src/gst-omx/examples/egl/testegl.c:1413: undefined reference to `vc_dispmanx_display_close'
collect2: error: ld returned 1 exit status

so I added:

 -L/opt/vc/lib/ -lbcm_host

to CPPFLAGS but the behavior is the same.



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

ramtheconqueror
Hey Mark,

Have you tried using QtGstreamer library? I've used it with EGLFS (without X) for my Qt 5 project. Here it is:

https://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Dave
In reply to this post by Mark
Hi Marco,

Spent a few hours on this today but was unable to compile plugins-bad with egl and gles. I believe bad needs to be installed before omx will compile.  More time needed tomorrow.....

Dave

On 20 Jun 2016, at 4:34 AM, Marco Trapanese <[hidden email]> wrote:


In the meanwhile I'm recompiling all from git sources which are more recent than tar.gz file and have fixed some issues.
After compiling gstreamer, plugins base/good I tried to compile gst-omx in this way:

./configure --prefix=/usr --sysconfdir=/etc --with-omx-header-path=/opt/vc/include/IL --with-omx-target=rpi CPPFLAGS="-I/tmp/src/gst-plugins-bad/gst-libs -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads/ -I/opt/vc/include/interface/vmcs_host/linux/"

but the building fails:

[lot of similar warnings]
testegl.c:1383:5: warning: nested extern declaration of ‘glDetachShader’ [-Wnested-externs]
testegl.c:1392:5: warning: implicit declaration of function ‘glDeleteProgram’ [-Wimplicit-function-declaration]
     glDeleteProgram (state->program);
     ^
testegl.c:1392:5: warning: nested extern declaration of ‘glDeleteProgram’ [-Wnested-externs]
  CCLD     testegl
testegl-testegl.o: In function `open_ogl':
/tmp/src/gst-omx/examples/egl/testegl.c:1425: undefined reference to `bcm_host_init'
testegl-testegl.o: In function `init_ogl':
/tmp/src/gst-omx/examples/egl/testegl.c:434: undefined reference to `eglSaneChooseConfigBRCM'
/tmp/src/gst-omx/examples/egl/testegl.c:451: undefined reference to `graphics_get_display_size'
/tmp/src/gst-omx/examples/egl/testegl.c:465: undefined reference to `vc_dispmanx_display_open'
/tmp/src/gst-omx/examples/egl/testegl.c:466: undefined reference to `vc_dispmanx_update_start'
/tmp/src/gst-omx/examples/egl/testegl.c:469: undefined reference to `vc_dispmanx_element_add'
/tmp/src/gst-omx/examples/egl/testegl.c:477: undefined reference to `vc_dispmanx_update_submit_sync'
testegl-testegl.o: In function `close_ogl':
/tmp/src/gst-omx/examples/egl/testegl.c:1410: undefined reference to `vc_dispmanx_update_start'
/tmp/src/gst-omx/examples/egl/testegl.c:1411: undefined reference to `vc_dispmanx_element_remove'
/tmp/src/gst-omx/examples/egl/testegl.c:1412: undefined reference to `vc_dispmanx_update_submit_sync'
/tmp/src/gst-omx/examples/egl/testegl.c:1413: undefined reference to `vc_dispmanx_display_close'
collect2: error: ld returned 1 exit status

so I added:

 -L/opt/vc/lib/ -lbcm_host

to CPPFLAGS but the behavior is the same.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Sebastian Dröge-3
In reply to this post by Mark
On So, 2016-06-19 at 21:04 +0200, Marco Trapanese wrote:
> [...]

In general, make sure to compile gst-plugins-bad (and libgstgl in
there) without X11/GLX support and only EGL/DispManX support. Then it
will work without X11, and especially the X11 GL support on the RPi is
complete software based and you don't want to use it :)

> In the meanwhile I'm recompiling all from git sources which are more
> recent than tar.gz file and have fixed some issues.
> After compiling gstreamer, plugins base/good I tried to compile gst-
> omx in this way:
>
> ./configure --prefix=/usr --sysconfdir=/etc --with-omx-header-
> path=/opt/vc/include/IL --with-omx-target=rpi CPPFLAGS="-
> I/tmp/src/gst-plugins-bad/gst-libs -I/opt/vc/include/
> -I/opt/vc/include/interface/vcos/pthreads/
> -I/opt/vc/include/interface/vmcs_host/linux/"
>
> but the building fails:
>
> [lot of similar warnings]
> testegl.c:1383:5: warning: nested extern declaration of
> ‘glDetachShader’ [-Wnested-externs]
> testegl.c:1392:5: warning: implicit declaration of function
> ‘glDeleteProgram’ [-Wimplicit-function-declaration]
>      glDeleteProgram (state->program);
>      ^
> testegl.c:1392:5: warning: nested extern declaration of
> ‘glDeleteProgram’ [-Wnested-externs]
Can you file a bug about this? Looks like a problem with the build
system for the example application.

https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer

> testegl-testegl.o: In function `open_ogl':
> /tmp/src/gst-omx/examples/egl/testegl.c:1425: undefined reference to
> `bcm_host_init'
> [...]

Also these. It would have to link with -lbcm_host.

--

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Sebastian Dröge-3
In reply to this post by Dave
On Mo, 2016-06-20 at 21:31 +0930, Dave Johnstone wrote:
> Hi Marco,
>
> Spent a few hours on this today but was unable to compile plugins-bad
> with egl and gles. I believe bad needs to be installed before omx
> will compile.  More time needed tomorrow.....

Yes, -bad needs to be compiled before gst-omx.

--

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Dave
In reply to this post by Sebastian Dröge-3
I compiled and installed -plugins-bad and -omx but was getting low framerates using omxh264dec so I created a fresh Raspbian Jessie Lite and started again.  Replicating previous steps, I now cannot compile gst-plugins-bad without X (configure completes OK) but make fails in '...gst-libs/gst/gl/egl'
gsteglimage.c:74:1: error 'gst_egl_image_ensure_debug_category' defined but not used.

I have provided configure with the locations of the RPi provided libraries (/opt/vc/include and /opt/vc/lib), are there dependencies I need to satisfy which aren't in /opt/vc?

Is there a definitive guide to installing GStreamer on the Pi with hardware acceleration and without X anywhere?

Regards,

Dave.  



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Sebastian Dröge-3
On Do, 2016-06-23 at 21:34 +0930, Dave Johnstone wrote:
> I compiled and installed -plugins-bad and -omx but was getting low
> framerates using omxh264dec so I created a fresh Raspbian Jessie Lite
> and started again.  Replicating previous steps, I now cannot compile
> gst-plugins-bad without X (configure completes OK) but make fails in
> '...gst-libs/gst/gl/egl' 
> gsteglimage.c:74:1: error 'gst_egl_image_ensure_debug_category'
> defined but not used.

That's fixed now:
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=0e58e86c4ca903c2193aa793d2b8ad4a61506799

--

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Dave
Thanks Sebastian the fix now allows -plugins-bad to compile.  I then compiled and installed omx which also worked but a simple test pipeline (gst-launch-1.0 playbin uri=file:///opt/vc/src/hello_pi/hello_video/test.h264) does not play, it is stuck prerolling.  When I exit there is a non-negotiated error:

0:00:49.911569398  2094 0x70801c00 ERROR            omxvideodec gstomxvideodec.c:974:gst_omx_video_dec_reconfigure_output_port:<omxh264dec-omxh264dec0> Failed to negotiate RGBA for EGLImage
0:00:49.914545060  2094 0x70801c00 ERROR            omxvideodec gstomxvideodec.c:1144:gst_omx_video_dec_reconfigure_output_port:<omxh264dec-omxh264dec0> Failed to negotiate

Same error when attempting uridecodebin autovideoconvert glimagesink or fbdevsink

Testing with a mjpeg file (uridecodebin selects omxmjpegdec) does play but slowly and it does not exit when finished.

Strangely, the omx plugins show 1.2.0 2014-07-23 with gst-inspect-1.0 although the path and date of libgstomx.so is correct (today).

Regards,

Dave.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Sebastian Dröge-3
On Fr, 2016-06-24 at 11:14 +0930, Dave Johnstone wrote:

> Thanks Sebastian the fix now allows -plugins-bad to compile.  I then
> compiled and installed omx which also worked but a simple test
> pipeline (gst-launch-1.0 playbin
> uri=file:///opt/vc/src/hello_pi/hello_video/test.h264) does not play,
> it is stuck prerolling.  When I exit there is a non-negotiated error:
>
> 0:00:49.911569398  2094 0x70801c00 ERROR            omxvideodec
> gstomxvideodec.c:974:gst_omx_video_dec_reconfigure_output_port:<omxh2
> 64dec-omxh264dec0> Failed to negotiate RGBA for EGLImage
> 0:00:49.914545060  2094 0x70801c00 ERROR            omxvideodec
> gstomxvideodec.c:1144:gst_omx_video_dec_reconfigure_output_port:<omxh
> 264dec-omxh264dec0> Failed to negotiate
That's probably https://bugzilla.gnome.org//show_bug.cgi?id=767801

--

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Dave
It does look similar, only my source is a file and the caps filter/set workaround doesn't help.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Dave
In reply to this post by Mark
Hi Marco,

In case you still need it, here is my configure line for -plugins-bad without X.

./configure --disable-gtk-doc --disable-x11 --disable-glx --enable-egl --enable-dispmanx CFLAGS="-I/opt/vc/include/EGL -I/opt/vc/include/GLES -I/opt/vc/include/GLES2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux" 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 -I/opt/vc/include/EGL"

Regards,

Dave.


On 19/06/2016 9:23 PM, Marco Trapanese wrote:
I thank you very much. I'm waiting for you hints and then I'll report back if it works also on my system.
Regards
Marco


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

zacattackcit
Hi Dave (or anyone else)--

Did you ever sort this issue out?  I'm interested in using glimagesink on my raspberry pi 3 as well.

Thanks!

-Zac
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Digits Info
Hi Zac,

Yes it did work in the end but I was experiencing a flash on screen at the start of playback and the video did not end cleanly. See bug 768116 at Bugzilla. It was determined to be a Broadcom issue, maybe it will work on a Pi3.

Dave Johnstone


On 13 Jul 2016, at 4:45 AM, zacattackcit <[hidden email]> wrote:

Hi Dave (or anyone else)--

Did you ever sort this issue out?  I'm interested in using glimagesink on my
raspberry pi 3 as well.

Thanks!

-Zac



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/gstreamer-1-0-plugin-for-videosink-without-X-tp4678151p4678644.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Digits Info
In reply to this post by zacattackcit
Hi Zac,

I ran autogen first, then my omx compile command was:

./configure --with-omx-header-path=/opt/vc/include/IL --with-omx-target=rpi --disable-gtk-doc --disable-opengl --disable-glx --enable-egl --enable-dispmanx CPPFLAGS="-I/opt/vc/include/ -I/opt/vc/ -I/opt/vc/include/interface/vcos/pthreads/ -I/opt/vc/include/interface/vmcs_host/linux" CFLAGS="-I/opt/vc/include/ -I/opt/vc/ -I/opt/vc/include/interface/vcos/pthreads/ -I/opt/vc/include/interface/vmcs_host/linux" LDFLAGS="-L/opt/vc/lib"

Hopefully this will compile on your system.

Dave.

Hi Dave--

Thanks for responding to my email on gstreamer-devel, glad you eventually got your gst-plugins-bad and gst-omx building.  I managed to get gst-plugins-bad build with X11 disabled and dispmax enabled, but I'm still having trouble with gst-omx.

Can you remember the commands you ran to get gst-omx to build?

Thanks,

-Zac


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

zacattackcit
Dave--

Thanks for your help.  With your compile command for gst-plugins-bad (earlier in this thread) and gst-omx (in the previous post), I got both packages to compile!  I'm now hitting a run-time error.  When I run my minimal test pipeline:

gst-launch-1.0 rpicamsrc ! h264parse ! omxh264dec ! glimagesink

I get this error:

0:00:00.190762969 31880   0x197400 ERROR              gldisplay gstgldisplay_wayland.c:120:gst_gl_display_wayland_new: Failed to open X11 display connection with name, '(null)'

Looks like not all the X11 stuff was really disabled?  Have you seen anything like this?  I think I'm getting closer...

Thanks,

-Zac
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 plugin for videosink without X

Digits Info
Hi Zac,

I can't find my notes but I have my bash history - try recompiling plugins-bad.  The relevant section of my history is:

git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-bad
cd gst-plugins-bad
./autogen.sh
./configure --disable-gtk-doc --disable-x11 --disable-glx --enable-egl --enable-dispmanx CFLAGS="-I/opt/vc/include/EGL -I/opt/vc/include/GLES -I/opt/vc/include/GLES2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux" 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 -I/opt/vc/include/EGL"
make -j8
sudo make install

Regards,

Dave.

On 16/07/2016 8:59 AM, zacattackcit wrote:

Dave--

Thanks for your help.  With your compile command for gst-plugins-bad
(earlier in this thread) and gst-omx (in the previous post), I got both
packages to compile!  I'm now hitting a run-time error.  When I run my
minimal test pipeline:

gst-launch-1.0 rpicamsrc ! h264parse ! omxh264dec ! glimagesink

I get this error:

0:00:00.190762969 31880   0x197400 ERROR              gldisplay
gstgldisplay_wayland.c:120:gst_gl_display_wayland_new: Failed to open X11
display connection with name, '(null)'

Looks like not all the X11 stuff was really disabled?  Have you seen
anything like this?  I think I'm getting closer...

Thanks,

-Zac

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel