Donot use display for gstreamer pipeline

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

Donot use display for gstreamer pipeline

Deepanshu
I am using gstreamer on google coral dev board and performing video analytics
on it.
The platform details are :
Linux bored-horse 4.9.51-imx #1 SMP PREEMPT Tue May 14 20:34:37 UTC 2019
*aarch64 GNU/Linux*

I have a pipeline of the form :

GST_DEBUG=*gl*:5 gst-launch-1.0 videotestsrc  !
video/x-raw,width=640,height=480,framerate=15/1 ! queue max-size-buffers=1
leaky=downstream  ! glupload ! queue max-size-buffers=1 leaky=downstream !
glfilterbin filter=glcolorscale  !
video/x-raw,format=RGBA,width=320,height=180 ! videoconvert !
video/x-raw,format=RGB,width=320,height=180 ! appsink name=appsink
sync=false emit-signals=true max-buffers=1 drop=true

It works fine when run from a terminal. However when i execute the pipeline
as a background service . it fails because background service do not have
access to display. Anyways I dont want to display the window , i just want
to connect the data to the appsink , so that i can perform video analytics
on it.  

So anyone has any idea about , how to force it to not use display  and just
forward the data to display . Please help



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

RE: Donot use display for gstreamer pipeline

Rand Graham-2
Hi there,

Your problem sounds similar to an issue I had (hard to tell for sure).

You may need to look into drm render mode on linux.

You may need to add the linux user running the background service to the "video" group.

Please check the response by Victor on Oct 27, 2018 on this thread and see if it helps:

http://gstreamer-devel.966125.n4.nabble.com/RE-gstvideoencoder-error-td4688786.html#a4688834

-----Original Message-----
From: gstreamer-devel [mailto:[hidden email]] On Behalf Of Deepanshu
Sent: Monday, March 2, 2020 5:57 AM
To: [hidden email]
Subject: Donot use display for gstreamer pipeline

I am using gstreamer on google coral dev board and performing video analytics on it.
The platform details are :
Linux bored-horse 4.9.51-imx #1 SMP PREEMPT Tue May 14 20:34:37 UTC 2019
*aarch64 GNU/Linux*

I have a pipeline of the form :

GST_DEBUG=*gl*:5 gst-launch-1.0 videotestsrc  !
video/x-raw,width=640,height=480,framerate=15/1 ! queue max-size-buffers=1 leaky=downstream  ! glupload ! queue max-size-buffers=1 leaky=downstream !
glfilterbin filter=glcolorscale  !
video/x-raw,format=RGBA,width=320,height=180 ! videoconvert !
video/x-raw,format=RGB,width=320,height=180 ! appsink name=appsink sync=false emit-signals=true max-buffers=1 drop=true

It works fine when run from a terminal. However when i execute the pipeline as a background service . it fails because background service do not have access to display. Anyways I dont want to display the window , i just want to connect the data to the appsink , so that i can perform video analytics on it.  

So anyone has any idea about , how to force it to not use display  and just forward the data to display . Please help



--
Sent from: http://gstreamer-devel.966125.n4.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: Donot use display for gstreamer pipeline

Nicolas Dufresne-5
In reply to this post by Deepanshu
On lun, 2020-03-02 at 05:56 -0600, Deepanshu wrote:

> I am using gstreamer on google coral dev board and performing video analytics
> on it.
> The platform details are :
> Linux bored-horse 4.9.51-imx #1 SMP PREEMPT Tue May 14 20:34:37 UTC 2019
> *aarch64 GNU/Linux*
>
> I have a pipeline of the form :
>
> GST_DEBUG=*gl*:5 gst-launch-1.0 videotestsrc  !
> video/x-raw,width=640,height=480,framerate=15/1 ! queue max-size-buffers=1
> leaky=downstream  ! glupload ! queue max-size-buffers=1 leaky=downstream !
> glfilterbin filter=glcolorscale  !
> video/x-raw,format=RGBA,width=320,height=180 ! videoconvert !
> video/x-raw,format=RGB,width=320,height=180 ! appsink name=appsink
> sync=false emit-signals=true max-buffers=1 drop=true
>
> It works fine when run from a terminal. However when i execute the pipeline
> as a background service . it fails because background service do not have
> access to display. Anyways I dont want to display the window , i just want
> to connect the data to the appsink , so that i can perform video analytics
> on it.  

The "display" in this context is the connection to the graphic card, which let
you use the HW acceleration. When you start a user session, you are dynamically
granted permission to access this HW, while in service, you have to configure it
(could be through user group, or let logind handle it). On the other side,
GStreamer has support for GLX and EGL platform, you really want the second, but
normally it should figure-out.

>
> So anyone has any idea about , how to force it to not use display  and just
> forward the data to display . Please help
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.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: Donot use display for gstreamer pipeline

Deepanshu
In reply to this post by Rand Graham-2
Thanks Rand . I have read the reply given by victor . Here is the output of
ls in /dev/dri

mendel@bored-horse /dev/dri $ ls
card0  *controlD64*

  Its  some other device than in the post . The listed device in the post is
*renderD128* .
Also the user has all the permissions to run the pipeline , because when i
run *gst-launch-1.0 videotestsrc ! waylandsink* . I can see the window on
screen.

Also here is the output of groups command

*mendel@bored-horse ~ $ groups
mendel adm sudo audio video plugdev staff games users netdev input bluetooth
i2c systemd-journal apex
*



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel