jackersson / gst-overlay

10 stars 3 forks source link

ImportError: Plugin gstoverlayopencv not registered #1

Open balajiraghuram92 opened 6 years ago

balajiraghuram92 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

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

Check installation guide, especially part with gst-python

Hope everything works)

jefflgaol commented 4 years ago

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)