3

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
memo
  • 3,554
  • 4
  • 31
  • 36
  • 2
    Did you install a software package like anaconda? When I installed anaconda I encountered a similar problem because it installed its set of binaries including gst-launch-1.0 and gst-inspect-1.0 and added to the path. – Alper Kucukkomurler May 29 '17 at 06:05
  • Yes I do, and yes you're right, that is the issue. Apart from removing Anaconda from my path (Which I'd rather not do because I have a lot depending on that), is there a way of getting it to play with Anaconda? – memo May 29 '17 at 12:32
  • Maybe also ask another question about why you need another distribution (Anaconda/Conda) while you already have the Ubuntu/Apt distribution. There are hundreds of package-managers that break each other (and every one of them thinks that it's the center of the universe). – Velkan May 29 '17 at 13:02
  • @memo In my case, what I did was to remove binaries `gst-launch-1.0` and `gst-inspect-1.0` from `/bin/` because I had another version of gstreamer installed on my system. It seems to have done it for me. – Alper Kucukkomurler May 29 '17 at 13:30
  • @Velkan I work with many different projects which have many different requirements, some are py2.7 vs py3.5, and within that different versions of various packages. The whole thing is a nightmare, and while not perfect, Conda has been the best way to manage it so far (esp considering I use spyder etc). – memo May 29 '17 at 15:10
  • @AlperKucukkomurler sounds a bit nasty, but will try thx :) – memo May 29 '17 at 16:59
  • indeed Anaconda was the reason in my case, I ran conda deactivate and it sadly worked :|, see https://stackoverflow.com/questions/28712079/gstreamer-error-pipeline-could-not-be-constructed-no-element-v4l2src/61634481#61634481 – M.Hefny Nov 28 '20 at 17:12

1 Answers1

0

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

ignacio
  • 1,181
  • 2
  • 15
  • 28