no such element "v4l2src" using gstreamer-1.0, but exists in gstreamer-0.10 [UBUNTU 16.04.2 LTS]

Viewed 4000

I'm having trouble with v4l2src in gstreamer-1.0, but it appears to be there in gstreamer-0.10. I've searched around online but none of the suggestions seems to make any difference. I've included a bunch of results below. Is there anything else I can try?


Update: @alper-kucukkomurler is correct. I have anaconda installed and which gst-inspect-1.0 is returning ~/anaconda2/bin. Removing anaconda from my path does resolve the issue. However, I'd prefer a solution which keeps anaconda in the path if possible. Is there a way to make this work? (I do have gstreamer and gst-plugins-base packages installed in anaconda).


Update2: A tip came from another forum https://forum.openframeworks.cc/t/error-ofgstutils-error-getting-device-data-no-element-v4l2src/26908/6

pointing to this post GStreamer plugin search path?

discussing GST_PLUGIN_PATH. I actually don't have such an env variable. But it is an additional point of info.


$ 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
1 Answers

You may have the same problem as I did, I was missing one .so file which was on one folder out of my dynamic shared libraries path. I could see that by following the steps in described here. To solve that I had to run export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib

Related