[ error ] ofGstUtils: error getting device data: no element "v4l2src"

I’m not sure if this is better suited here or stackoverflow. I posted on SO too with more detail:

short version is I get the error above regarding v4l2srv, even though i have the gs plugins installed. Interestingly I also have gs 0.10 installed and that does have v4l2src. Is it a compatibility issue? Any ideas why this might be!?

Try checking with the command: “which command” which “gst- *” you are using, as he suggests Alper Kucukkomurler on stackoverflow, maybe you’re tricked by “gst *” installed by anaconda?

which gst-inspect-1.0
which gst-launch-1.0

yup that was an issue :S removing Anaconda from my path isn’t a good permanent solution for me, but for now I did, and now

$ gst-launch-1.0 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(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-linked (-1)
Execution ended after 0:00:00.049353063
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

And now when I run videoGrabberExample from the terminal, it works;

However in QT Creator I get the same error! Somehow QT Creator is not finding the plugin. Only when I renamed my anaconda folder to something else did it work in QT Creator. I looked in all options / settings but couldn’t find anything related to a path or Anaconda :confused:

Try to give an eye to the file: “.bashrc” of the user you use to run qtcreator
maybe QTc takes the PATH from them…

yea I looked at .bashrc and .profile, no mention of anaconda in either of them. I even uninstalled QTCreator, renamed anaconda folder (to anaconda-no), restarted, reinstalled QTCreator, and renamed anaconda-no back to anaconda. Still same thing! If I have a folder called anaconda, it doesn’t work, even if it’s not in the path. There must be a config somewhere, digging through right now :S

So the issue isn’t executable path, but libraries. I narrowed down the problem to ~/anaconda/lib/libgst*. I’ve moved them to a gst-backup folder, and for now I can run videoGrabberExample from QTCreator even with anaconda2 in the path and the gst* bins in anaconda2/bin. It feels pretty dirty and I hope nothing else breaks, but it works okish for now :S

1 Like

you can tell gstreamer to look for pluings in an specific folder using an environment variable or through code:

the default path for gst plugins is usully /usr/lib/x86_64-linux-gnu/gstreamer-1.0/ so setting:

export GST_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/gstreamer-1.0/

should make gstreamer look for pluigns there instead of in the anaconda folder or check if anaconda is somehow setting that and undefine it before using OF

oh wow, that’s a much better option thanks :slight_smile: I’ll try that. Upon a quick glance, I don’t have a GST_PLUGIN_PATH set (at least in terminal). Is there a way to see the environment in QTCreator?