我在gstreamer-1.0中遇到了v4l2src的问题,但它似乎存在于gstreamer-0.10中。我在网上搜索过,但没有任何建议似乎有任何区别。我在下面列出了一堆结果。还有什么我可以尝试的吗?
更新:@ alper-kucukkomurler是正确的。我安装了anaconda,which gst-inspect-1.0
正在返回~/anaconda2/bin
。从我的路径中删除anaconda确实解决了这个问题。但是,如果可能的话,我更喜欢一种让anaconda保持在路径上的解决方案。有没有办法让这项工作? (我确实在anaconda中安装了gstreamer和gst-plugins-base软件包。)
Update2:来自另一个论坛的提示 https://forum.openframeworks.cc/t/error-ofgstutils-error-getting-device-data-no-element-v4l2src/26908/6
指着这篇文章 GStreamer plugin search path?
讨论GST_PLUGIN_PATH。我实际上没有这样的env变量。但这是一个额外的信息点。
$ 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
答案 0 :(得分:0)
您可能遇到与我相同的问题,我丢失了一个.so
文件,该文件位于动态共享库路径之外的一个文件夹中。通过遵循here中描述的步骤,我可以看到这一点。为了解决这个问题,我必须运行export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib