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

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

让我自己有点状态。我一直在尝试让 opencv 使用 gstreamer,在最终设法从源代码编译并让它获取 gstreamer 后,它无法正常工作。

所以我已经进入命令行以确保它首先在那里工作,并且我已经尝试了所有方法但 gstreamer 没有启动 "rtspsrc"。

我是 运行 下方的终端。

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

但是出现以下错误,有人知道这是为什么吗?

WARNING: erroneous pipeline: no element "rtspsrc"

运行 ubuntu - gstreamer1.0

Rtspsrc 是 Gst-plugins-good 的一部分。你确定你安装了那些?

如果没有,请尝试使用以下方式安装它:

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

检查GStreamer是否可以找到插件。 运行 终端中的以下内容:

gst-inspect-1.0 rtspsrc

如果是return各种细节,就可以正确找到插件。如果找不到,它将 return:

No such element or plugin 'rtspsrc'

(编辑)

正如OP所说,对他来说

which gst-launch-1.0

returns

/home/lewis/anaconda3/bin

显然 GStreamer 是通过 Anaconda 安装的,这意味着通过 Anaconda 安装插件可能是最简单的。我对 Anaconda 没有任何具体经验,但它认为以下内容应该有效:

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

如果还缺少其他元素,plugins-base/bad也可以安装

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

sudo apt install gstreamer1.0-rtsp

问题是使用 apt-get 时插件正在安装到 /usr/bin

但是

which gst-launch-1.0

returns /home/lewis/anaconda3/bin

我还不确定该怎么做,但在 linux 页面上打开了一个新问题。

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