Search code examples
ubuntugstreamerrtsp

gstreamer RTSP on ubuntu - WARNING: erroneous pipeline: no element "rtspsrc"


Getting my self in a bit of a state. I've been trying to get opencv to use gstreamer and after finally manage to compile from source and have it pick up gstreamer its not working.

So i've taken to the command line to make sure its working there first, and I've tried everything but gstreamer is not picking up "rtspsrc".

I'm running the below in the terminal.

gst-launch-1.0 rtspsrc location=rtsp://admin:[**mypassword**]@192.168.0.40/h264Preview_01_main ! decodebin ! videoconvert ! appsink max-buffers=1 drop=true")

But am getting the below error, does anyone know why this might be?

WARNING: erroneous pipeline: no element "rtspsrc"

Running ubuntu - gstreamer1.0


Solution

  • Rtspsrc is part of the Gst-plugins-good. Are you sure you have those installed?

    If not, try installing it using:

    apt install libgstreamer-plugins-good1.0-0 libgstreamer-plugins-good1.0-dev gstreamer1.0-plugins-good
    

    To check if GStreamer can find the plugin. Run the following in the terminal:

    gst-inspect-1.0 rtspsrc
    

    If it returns all kinds of details, it can correctly find the plugin. If it cannot find it, it will return:

    No such element or plugin 'rtspsrc'
    

    (edit)

    As OP said, for him

    which gst-launch-1.0
    

    returns

    /home/lewis/anaconda3/bin
    

    So apparently GStreamer is installed through Anaconda, which means it is probably easiest to also install the plugins through Anaconda. I don't have any specific experience with Anaconda, but it think the following should work:

    conda install -c conda-forge gst-plugins-good
    

    If other elements are also missing, plugins-base/bad can also be installed