简体   繁体   English

ubuntu 上的 gstreamer RTSP - 警告:错误的管道:没有元素“rtspsrc”

[英]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.我一直在尝试让 opencv 使用 gstreamer,在最终设法从源代码编译并让它接收 gstreamer 之后,它无法正常工作。

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".所以我已经进入命令行以确保它首先在那里工作,并且我已经尝试了所有方法但 gstreamer 没有选择“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运行 ubuntu - gstreamer1.0

Rtspsrc is part of the Gst-plugins-good. Rtspsrc 是 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.检查 GStreamer 是否可以找到该插件。 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正如 OP 所说,对他来说

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.所以显然 GStreamer 是通过 Anaconda 安装的,这意味着通过 Anaconda 安装插件可能是最简单的。 I don't have any specific experience with Anaconda, but it think the following should work:我对 Anaconda 没有任何具体经验,但它认为以下应该有效:

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

If other elements are also missing, plugins-base/bad can also be installed如果还缺少其他元素,也可以安装plugins-base/bad

The issue is when using apt-get the plugins are installing to /usr/bin问题是当使用 apt-get 插件安装到 /usr/bin

BUT

which gst-launch-1.0

returns /home/lewis/anaconda3/bin返回 /home/lewis/anaconda3/bin

I'm not sure what to do yet, but have opened a new question on the linux pages.我不确定该怎么做,但在 linux 页面上提出了一个新问题。

https://unix.stackexchange.com/questions/575262/whereis-gstreamer-located-in-two-paths-causing-issues https://unix.stackexchange.com/questions/575262/whereis-gstreamer-located-in-two-paths-causing-issues

请注意,尽管 RTSP 组件位于 Debian/Ubuntu 上的一组good的插件中,但它们已被分离到自己的包中:

sudo apt install gstreamer1.0-rtsp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM