Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: Plugin gstoverlayopencv not registered #1

Open
balajiraghuram92 opened this issue Aug 8, 2018 · 6 comments
Open

ImportError: Plugin gstoverlayopencv not registered #1

balajiraghuram92 opened this issue Aug 8, 2018 · 6 comments

Comments

@balajiraghuram92
Copy link

When executing the code,gettting the following error:
Note:no code changes,GStreamer - 1.15.1, Opencv-python is installed
(python3:11020): GStreamer-WARNING **: Element factory metadata for 'gstoverlayopencv' has no valid long-name field
Traceback (most recent call last):
File "run.py", line 19, in
from gst_overlay.gst_overlay_opencv import GstOverlayOpenCv
File "/work/mediaPlayer(Gstreamer)/gst-overlay/gst_overlay/gst_overlay_opencv.py", line 93, in
register_by_name(GST_OVERLAY_OPENCV)
File "/work/mediaPlayer(Gstreamer)/gst-overlay/gst_overlay/gst_overlay_opencv.py", line 90, in register_by_name
raise ImportError("Plugin {} not registered".format(plugin_name))
ImportError: Plugin gstoverlayopencv not registered

@jackersson
Copy link
Owner

Hi,

Can you print out of next command?:
gst-inspect-1.0 --version

Also I just cloned it to my PC and run next commands:
python3 run.py -f car.mpg -i attachments/cat -c

Produces next gstreamer pipeline:
gst-launch-1.0 filesrc location=car.mpg ! decodebin ! videoconvert ! gstoverlaycairo name=overlay ! videoconvert ! gtksink sync=false

And:
python3 run.py -f car.mpg -i attachments/cat -o

Produces:
gst-launch-1.0 filesrc location=car.mpg ! decodebin ! videoconvert ! gstoverlayopencv name=overlay ! videoconvert ! gtksink sync=false

Also check Gstreamer version (https://gstreamer.freedesktop.org/releases/1.14/#1.14.2). Latest is 14.2, but you have 1.15.1.

@balajiraghuram92
Copy link
Author

I am chechking the version using gst-inspect-1.0 --version and i am getting 1.15.0
Which ubuntu version you are using 18.04 or 16.04?

@jackersson
Copy link
Owner

jackersson commented Aug 9, 2018

16.04

I have an repository with simple plugin to run (https://github.com/jackersson/gst-python-plugins)
Just follow instructions in README.

P. S. - previous is from official supported examples, so it should work. In case of error - send me debug info.
Clean ~/.cache/gstreamer-1.0 folder to view full exception.

@balajiraghuram92
Copy link
Author

Hi,
when Executing the project getting the following error:
the log for the program
$gst-inspect-1.0 --version
gst-inspect-1.0 version 1.15.0
GStreamer 1.15.0 (GIT)
Unknown package origin
$ export GST_PLUGIN_PATH=$PWD
$ gst-launch-1.0 videotestsrc ! videoconvert ! gstplugin_py ! videoconvert ! fakesink
0:00:00.016566538 29172 0xf59660 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "gstplugin_py"
0:00:00.016630488 29172 0xf59660 ERROR GST_PIPELINE grammar.y:901:priv_gst_parse_yyparse: link has no sink [source=@0xf5b3c0]
0:00:00.016665694 29172 0xf59660 ERROR GST_PIPELINE grammar.y:901:priv_gst_parse_yyparse: link has no source [sink=@0xf5c4e0]
WARNING: erroneous pipeline: no element "gstplugin_py"
Do we have to run the python program, if i run it getting following error:
$python gstplugin_py.py

(python:30326): GStreamer-WARNING **: External plugin loader failed. This most likely means that the plugin loader helper binary was not found or could not be run. You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual. This should normally not be required though.
I have built the gstreamer from lastest source.

Did you try the same thing or are you using a installer of gstreamer 1.14

If need any logs of the gstreamer or program,please give a reply.Will send you all the required information

@jackersson
Copy link
Owner

jackersson commented Aug 31, 2018

Hi,

Any updates on your problem?

Answers to your questions:
Do we have to run the python program, if i run it getting following error?
$python gstplugin_py.py

  • No, just export GST_PLUGIN_PATH=... As gst-python has script for loading python plugins from files in GST_PLUGIN_PATH (here)

Did you try the same thing or are you using a installer of gstreamer 1.14?

  • I tried on Ubuntu 18, 16, with Gstreamers 1.14-15 and if you installed everything right than this code should work.

Check installation guide, especially part with gst-python

Hope everything works)

@jefflgaol
Copy link

I solved this problem by installing these (Python 3):

sudo apt-get update 
sudo apt-get install python3-gst-1.0
sudo apt-get install python3-gst-1.0-dbg (if necessary)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants