Gst-python is installed, but can't find plugins
Asked Answered
E

3

9

I'm trying to run some Gstreamer examples for the Google Coral USB accelerator - I'm not using the Coral dev board. The driver is installed and works and I can classify images from my camera using OpenCV and the edgetpu library. I'd like to get the web server demo running. I've narrowed it down to Gstreamer not being able to find a plugin that Coral provides.

The plugins are from this repo (which also contains the demo code edgetpu_detect_server and edgetpu_detect: https://coral.googlesource.com/edgetpuvision/+/refs/heads/master/plugins/

There are three plugins that Coral provides:

linaro@linaro-alip:~$ ls /home/linaro/edgetpuvision/plugins/
glbox.py  glsvgoverlaysink.py  glsvgoverlaysrc.py

The error I get when trying to run, e.g. the detection server is:

(edgetpu_detect:28764): dbind-WARNING **: 11:38:56.589: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
v4l2src device=/dev/video0 ! video/x-raw,format=YUYV,width=640,height=512,framerate=30/1 ! glupload ! tee name=t
t. ! queue ! glsvgoverlaysink name=glsink
t. ! queue max-size-buffers=1 leaky=downstream ! glfilterbin filter=glbox ! video/x-raw,format=RGB,width=300,height=300 ! appsink name=appsink emit-signals=True max-buffers=1 drop=True sync=False
Traceback (most recent call last):
  File "/usr/local/bin/edgetpu_detect", line 11, in <module>
    load_entry_point('edgetpuvision==1.0', 'console_scripts', 'edgetpu_detect')()
  File "/home/linaro/.local/lib/python3.7/site-packages/edgetpuvision/detect.py", line 207, in main
    run_app(add_render_gen_args, render_gen)
  File "/home/linaro/.local/lib/python3.7/site-packages/edgetpuvision/apps.py", line 70, in run_app
    display=args.displaymode):
  File "/home/linaro/.local/lib/python3.7/site-packages/edgetpuvision/gstreamer.py", line 248, in run_gen
    display=display)
  File "/home/linaro/.local/lib/python3.7/site-packages/edgetpuvision/gstreamer.py", line 254, in run
    run_pipeline(pipeline, layout, loop, render_overlay, display)
  File "/home/linaro/.local/lib/python3.7/site-packages/edgetpuvision/gstreamer.py", line 300, in run_pipeline
    pipeline = Gst.parse_launch(pipeline)
gi.repository.GLib.Error: gst_parse_error: no element "glsvgoverlaysink" (1)

I've installed gst-python from source as described here: lifestyletransfer.com/how-to-install-gstreamer-from-sources-on-ubuntu/

Seems to be OK, I've linked it against Python 3.7.

linaro@linaro-alip:$ gst-inspect-1.0 /usr/local/lib/gstreamer-1.0/libgstpython.cpython-37m-aarch64-linux-gnu.so
Plugin Details:
  Name                     python
  Description              loader for plugins written in python
  Filename                 /usr/local/lib/gstreamer-1.0/libgstpython.cpython-37m-aarch64-linux-gnu.so
  Version                  1.14.2
  License                  LGPL
  Source module            gst-python
  Binary package           GStreamer GObject Introspection overrides for Python
  Origin URL               http://gstreamer.freedesktop.org


  0 features:

However when I try to load the plugins, gst-inspect can't find them, e.g.

gst-inspect-1.0 --gst-plugin-path=$PWD | grep glbox

Is there some other configuration thing I need to do?

EDIT: Interestingly on the dev board itself (which works), the gstreamer libs don't even seem to be installed (there is no gst-inspect), but the demo clearly uses gstreamer somewhere via Python.

Exeter answered 27/1, 2020 at 12:40 Comment(1)
Did you maybe have an answer after all. I am having the same issueRathenau
W
1

I would check if the python plugins are located in $GST_PLUGIN_PATH/python directory.

Whiz answered 17/6, 2020 at 5:48 Comment(1)
That doesn't seem to be necessary in this guide (they just use pwd) mathieuduponchelle.github.io/… - does gstreamer specifically look for a python subfolder? EDIT: actually seems like yes: #56265572, will check it out!Exeter
S
0

That plugin was made specifically for the dev board and is actually optimized for dev board's HW. I'm not so sure if there is a better easy way to get it working besides actually digging more into it. Would this demo works? https://github.com/google-coral/examples-camera/tree/master/gstreamer

Sentence answered 23/6, 2020 at 17:10 Comment(0)
B
0

There is a bug in gst-python (I've sent a patch upstream) whereby it fails to look in the right default places for python plugins. However it does correctly look in a 'python' subdirectory of wherever the various GST_PLUGIN_PATH environment variables point.

Butyrate answered 13/5, 2021 at 18:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.