繁体   English   中英

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

如果它返回各种详细信息,它可以正确找到插件。 如果找不到,它将返回:

No such element or plugin 'rtspsrc'

(编辑)

正如 OP 所说,对他来说

which gst-launch-1.0

返回

/home/lewis/anaconda3/bin

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

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

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

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

which gst-launch-1.0

返回 /home/lewis/anaconda3/bin

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

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