【问题标题】:no such element "v4l2src" using gstreamer-1.0, but exists in gstreamer-0.10 [UBUNTU 16.04.2 LTS]没有使用 gstreamer-1.0 的元素“v4l2src”,但存在于 gstreamer-0.10 [UBUNTU 16.04.2 LTS]
【发布时间】:2017-05-28 23:52:04
【问题描述】:

我在使用 gstreamer-1.0 中的 v4l2src 时遇到问题,但它似乎在 gstreamer-0.10 中存在。我在网上搜索过,但似乎没有任何建议有任何区别。我在下面列出了一堆结果。还有什么我可以尝试的吗?


更新:@alper-kucukkomurler 是正确的。我安装了 anaconda,which gst-inspect-1.0 正在返回~/anaconda2/bin。从我的路径中删除 anaconda 确实解决了这个问题。但是,如果可能的话,我更喜欢将 anaconda 保持在路径中的解决方案。有没有办法使这项工作? (我确实在 anaconda 中安装了 gstreamer 和 gst-plugins-base 软件包)。


更新 2:提示来自另一个论坛 https://forum.openframeworks.cc/t/error-ofgstutils-error-getting-device-data-no-element-v4l2src/26908/6

指向这篇文章 GStreamer plugin search path?

讨论 GST_PLUGIN_PATH。我实际上没有这样的环境变量。但这是一个额外的信息点。


$ sudo apt-get install gstreamer1.0-plugins-good
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gstreamer1.0-plugins-good is already the newest version (1.8.3-1ubuntu0.4).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

# (I've tried --reinstall too)


$ locate libgstvideo4linux2.so
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so



$ gst-inspect-1.0 -b
Blacklisted files:
Total count: 0 blacklisted files

$ gst-inspect-0.10 -b
Blacklisted files:
Total count: 0 blacklisted files



$ gst-launch-1.0 v4l2src
ERROR: pipeline could not be constructed: no element "v4l2src".

$ gst-launch-0.10 v4l2src
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-linked (-1)
Execution ended after 2089256849 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...


$ gst-inspect-1.0 v4l2src
No such element or plugin 'v4l2src'

$ gst-inspect-0.10 v4l2src
Factory Details:
  Long name:    Video (video4linux2) Source
  Class:    Source/Video
  Description:  Reads frames from a Video4Linux2 device
  Author(s):    Edgard Lima <edgard.lima@indt.org.br>, Stefan Kost <ensonic@users.sf.net>
  Rank:     primary (256)

Plugin Details:
  Name:         video4linux2
  Description:      elements for Video 4 Linux
  Filename:     /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so
  Version:      0.10.31
  License:      LGPL
  Source module:    gst-plugins-good
  Source release date:  2012-02-20
  Binary package:   GStreamer Good Plugins (Ubuntu)
  Origin URL:       https://launchpad.net/distros/ubuntu/+source/gst-plugins-good0.10
 ...
 ...



$ uname -a
Linux MSA-BLADE-UBUNTU 4.11.3-041103-generic #201705251233 SMP Thu May 25 16:34:52 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:   xenial

【问题讨论】:

  • 你安装过anaconda之类的软件包吗?当我安装 anaconda 时,我遇到了类似的问题,因为它安装了包括 gst-launch-1.0 和 gst-inspect-1.0 在内的一组二进制文件并添加到了路径中。
  • 是的,我知道,是的,你是对的,这就是问题所在。除了从我的路径中删除 Anaconda(我不想这样做,因为我有很多依赖于此),有没有办法让它与 Anaconda 一起玩?
  • 也许还会问另一个问题,即为什么您需要另一个发行版(Anaconda/Conda),而您已经拥有 Ubuntu/Apt 发行版。有数百个包管理器相互破坏(每个包管理器都认为它是宇宙的中心)。
  • @memo 就我而言,我所做的是从&lt;anaconda-dir&gt;/bin/ 中删除二进制文件gst-launch-1.0 和gst-inspect-1.0,因为我的系统上安装了另一个版本的gstreamer。它似乎为我做到了。
  • @Velkan 我与许多不同的项目合作,这些项​​目有许多不同的要求,有些是 py2.7 和 py3.5,并且在不同版本的各种包中。整个事情是一场噩梦,虽然并不完美,但 Conda 是迄今为止管理它的最佳方式(尤其是考虑到我使用 spyder 等)。

标签: ubuntu anaconda gstreamer ubuntu-16.04 v4l2


【解决方案1】:

您可能遇到与我相同的问题,我丢失了一个 .so 文件,该文件位于我的动态共享库路径之外的一个文件夹中。按照here 中描述的步骤,我可以看到这一点。为了解决这个问题,我不得不运行export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-27
    • 2023-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-22
    相关资源
    最近更新 更多