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

WARNING: erroneous pipeline: no element "gstplugin_py" #1

Open
balajiraghuram92 opened this issue Aug 9, 2018 · 11 comments
Open

WARNING: erroneous pipeline: no element "gstplugin_py" #1

balajiraghuram92 opened this issue Aug 9, 2018 · 11 comments

Comments

@balajiraghuram92
Copy link

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

@ghost
Copy link

ghost commented Mar 9, 2020

the thing is, the python loader plugin is not properly installed or you are lacking to install the package called gobject-devel in your computer. To check if python plugin is installed run the command gst-inspect-1.0 python if python loader is installed it should show the details

in my case:

[flaskuser@localhost cli]$ gst-inspect-1.0 python
Plugin Details:
Name python
Description loader for plugins written in python
Filename /usr/lib64/gstreamer-1.0/libgstpython.cpython-36m-x86_64-linux-gnu.so
Version 1.14.3
License LGPL
Source module gst-python
Binary package GStreamer GObject Introspection overrides for Python
Origin URL http://gstreamer.freedesktop.org

0 features:

[flaskuser@localhost cli]$

@jackersson
Copy link
Owner

jackersson commented Mar 23, 2020

Hi @ejlungay,

Make sure you reproduced everything with installation and export:

export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/venv/lib/gstreamer-1.0/:$PWD/gst/
> GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/venv/lib/gstreamer-1.0/:$PWD/gst/ gst-inspect-1.0 python
Plugin Details:
  Name                     python
  Description              loader for plugins written in python
  Filename                 /home/taras/coder/lifestyletransfer/gst-python-plugins-versions/gst-python-plugins/venv/lib/gstreamer-1.0/libgstpython.cpython-36m-x86_64-linux-gnu.so
  Version                  1.14.5
  License                  LGPL
  Source module            gst-python
  Binary package           GStreamer GObject Introspection overrides for Python 
  Origin URL               http://gstreamer.freedesktop.org

  gaussian_blur: GaussianBlur
  median_filter: Median Filter
  gstplugin_py: Name

  3 features:
  +-- 3 elements

Reproduced with docker container

Note: gstreamer-python package installs everything inplace

Hope this helps ;)
Best regards,

@codethief
Copy link

codethief commented Nov 22, 2020

I'm experiencing the same issue. I installed gstreamer1.0-python3-plugin-loader on my Ubuntu 20.04 machine and, afterwards, gst-inspect-1.0 python showed:

$ gst-inspect-1.0 python
Plugin Details:
  Name                     python
  Description              loader for plugins written in python
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpython.so
  Version                  1.16.2
  License                  LGPL
  Source module            gst-python
  Binary package           GStreamer Python
  Origin URL               http://gstreamer.freedesktop.org
  0 features:

Five minutes, later, however, after testing various Python plugins/transforms (among others, the ones in this repository), I suddenly got an Erroneous pipeline error and gst-inspect-1.0 python now says that it cannot find the Python plugin – even in the shell in which it had originally reported that the Python plugin was installed successfully, i.e. outside the venv I created for this repo! In those five minutes I didn't change anything about my system or my environment variables, though, and libgstpython.so is still where it was:

$ ls -l /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpython.so 
-rw-r--r-- 1 root root 23K Mär 24  2020 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpython.so

I'm at a complete loss as to what happened and I've already apt purged and reinstalled gstreamer1.0-python3-plugin-loader to no avail. I would be very grateful for any pointers!

EDIT: Come to think of it, in those five minutes mentioned above, I followed the installation steps from https://github.com/jackersson/gst-python-plugins/blob/master/README.md . Did the installation of https://github.com/jackersson/gstreamer-python.git possibly change anything permanently about my setup (i.e. outside the venv)? Could it be that, e.g., there's a bug somewhere in https://github.com/jackersson/gstreamer-python/blob/master/build-gst-python.sh causing the script to write things to the wrong directory?

EDIT2: I just ran

sudo apt purge python3-gi python3-gst-1.0 gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0 gir1.2-gst-plugins-bad-1.0 gir1.2-gst-rtsp-server-1.0 gstreamer1.0-python3-plugin-loader

(Careful! Due to gstreamer being a crucial dependency, this purges about a hundred other packages, too!)

followed by

sudo apt install python3-gi python3-gst-1.0 gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0 gir1.2-gst-plugins-bad-1.0 gir1.2-gst-rtsp-server-1.0 gstreamer1.0-python3-plugin-loader
sudo apt install <all the other packages that were uninstalled previously>

and now gst-inspect-1.0 python reports that the Python plugin is available. (Thank god!) I have no idea what was going on but I'm somewhat afraid of installing gstreamer-python again.

EDIT3: I couldn't resist and tried setting up gst-python-plugins again. First, I tried installing gstreamer-python without gst-python (which failed). Then I bit the bullet and followed the ordinary setup instructions of gst-python-plugins again. Once again, gst-inspect-1.0 python now reports No element or plugin »python«. Therefore, I am now certain that gstreamer-python modifies dependencies on a system level, even when it is installed inside a virtual environment. (I have no idea, how it does that, though, as I didn't execute any command as root.)

Unfortunately, my previous "fix" of reinstalling all packages no longer does the trick. Once again, libgstpython.so is still in place and it seems gst-inspect can find it, too:

$ GST_DEBUG="*:5" gst-inspect-1.0 python
[…]
0:00:00.214735190 30432 0x55578ba6f400 DEBUG           GST_REGISTRY gstregistry.c:461:gst_registry_add_plugin:<registry0> adding plugin 0x55578bbe3d30 for filename "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpython.so"
0:00:00.214742851 30432 0x55578ba6f400 DEBUG           GST_REGISTRY gstregistrychunks.c:878:_priv_gst_registry_chunks_load_plugin: Added plugin 'libgstpython.so' plugin with 0 features from binary registry
[…]
No such element or plugin 'python'

I'm at a complete loss now. :|

@ghost
Copy link

ghost commented Nov 28, 2020

Solved the problem
install python3-gstreamer1 python3-devel

@codethief
Copy link

@ejlungay What kind of packages are these? I can't find them in the Ubuntu repositories.

@alhoo
Copy link

alhoo commented Dec 3, 2020

There seems to be something wrong with the instructions. Edit: This comment contained a bad Dockerfile. Working dockerfile available in the end of this thread.

@ghost
Copy link

ghost commented Dec 3, 2020

Solved the problem
install python3-gstreamer1 python3-devel

@ejlungay What kind of packages are these? I can't find them in the Ubuntu repositories.

@codethief

search packages via apt and find gstreamer

get the result of the search and install

@alhoo
Copy link

alhoo commented Dec 3, 2020

 $ apt-cache search python3-gstreamer1

does not return anything. Maybe you are referring to one of these:

 $ apt-cache search gstreamer|grep python
gstreamer1.0-python3-dbg-plugin-loader - GStreamer Loader for Python Plugin (Python 3, debug extensions)
gstreamer1.0-python3-plugin-loader - GStreamer Loader for Python Plugin (Python 3)
python-audioread - Backend-agnostic audio decoding Python package
python-gst-1.0 - GStreamer GObject Introspection overrides for Python
python-gst-1.0-dbg - GStreamer GObject Introspection overrides for Python (debug extensions)
python3-gst-1.0 - GStreamer GObject Introspection overrides for Python (Python 3)
python3-gst-1.0-dbg - GStreamer GObject Introspection overrides for Python (Python 3, debug extensions)

@alhoo
Copy link

alhoo commented Dec 3, 2020

Ok finally got it working with:

FROM ubuntu:18.04

USER root

RUN apt-get update && apt-get -y --no-install-recommends install \
    build-essential \
    git \
    cmake \
    autoconf \
    automake \
    libtool \
    pkg-config \
    python3.6 \
    python3-pip \
    python3-dev


RUN apt-get -y --no-install-recommends install \
    gstreamer-1.0 \
    gstreamer1.0-dev \
    gstreamer1.0-plugins-base \
    gstreamer1.0-tools \
    libgstreamer1.0-0 \
    libgstreamer1.0-0 \
    libgirepository1.0-dev \
    libgstreamer-plugins-base1.0-dev \
    libcairo2-dev \
    gir1.2-gstreamer-1.0 \
    python-gst-1.0 \
    python3-gi \
    gstreamer1.0-python3-plugin-loader
    # python-gi-dev

RUN pip3 install -U wheel pip setuptools

RUN pip3 install git+https://github.com/jackersson/gstreamer-python.git#egg=gstreamer-python

RUN ln -s /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpython.cpython-36m-x86_64-linux-gnu.so /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpython.so

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -y --no-install-recommends install python3-opencv

ADD gst gst
ENV GST_PLUGIN_PATH /usr/lib/gstreamer-1.0/:/gst/
CMD gst-inspect-1.0 gaussian_blur

Results:

$ docker build -t gstreamer-python . && docker run -it gstreamer-python
Factory Details:
  Rank                     none (0)
  Long-name                GaussianBlur
  Klass                    Filter
  Description              Apply Gaussian Blur to Buffer
  Author                   Taras Lishchenko <taras at lifestyletransfer dot com>

Plugin Details:
  Name                     python
  Description              loader for plugins written in python
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpython.so
  Version                  1.14.5
  License                  LGPL
  Source module            gst-python
  Binary package           GStreamer GObject Introspection overrides for Python 
  Origin URL               http://gstreamer.freedesktop.org
...

Thanks @ejlungay!

@aanishatdatakalp
Copy link

i have been getting the same error on my jetson nano
WARNING: erroneous pipeline: no element "gstplugin_py"
i tried to reproduce it with a Ubuntu18 docker container setuphttps://github.com/jackersson/env-setup and it works fine.
i have followed the installation process and the export and there were no errors.
Due to some reasons i don't want to use the docker container.

@ghost
Copy link

ghost commented Oct 3, 2021

i have been getting the same error on my jetson nano WARNING: erroneous pipeline: no element "gstplugin_py" i tried to reproduce it with a Ubuntu18 docker container setuphttps://github.com/jackersson/env-setup and it works fine. i have followed the installation process and the export and there were no errors. Due to some reasons i don't want to use the docker container.

@aanishatdatakalp
When writing gst-plugins in python, you should format your structure like this:
python
app.py

where:
python is a folder in root directory

when running your program, you must do:
export GST_PLUGIN_PATH=$PWD

then you can verify if your python plugin is working by:
gst-inspect-1.0 <name_of_plugin_you_made>

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

5 participants