"Your GStreamer installation is missing a plug-in." (GstURIDecodeBin) - c

I have: gstreamer-sdk, gstreamer-ffmpeg, gstreamer-plugins-good, bad, and ugly. I googled everywhere for this error and have found nothing relevant. I'm going a little nuts trying to figure out this error:
Error received from element decodebin20: Your GStreamer installation is missing a plug-in.
Debugging information: gstdecodebin2.c(3576): gst_decode_bin_expose (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20:
no suitable plugins found
It throws when I run my gstreamer program. Any ideas on why?

You may not be missing any plugins at all.
This error can be a result of just an unlinked pipeline.
Playbin2(decodebin2) got some changes that made it unable to automatically link up some pipelines that formally worked, for example transcoding a decoder to an encoder. In my case, explicitly adding the ffdec_h264 that it used to add automatically fixed it.
Relying on the Playbin2 can be very frustrating when it does not work. Using the setup below, you can create a .png diagram of the pipeline in various phases of construction. It's very helpful in finding why it isn't linking up.
export GST_DEBUG_DUMP_DOT_DIR=~/gstdump
for f in $GST_DEBUG_DUMP_DOT_DIR/*.dot ; do dot -T png $f >$f.png; done
This tool also lets you learn from it how to link up pipelines, and replace them with explicit ones that are easier to debug and less likely to break.

In Fedora, I resolved this issue removing gstreamer1-vaapi.x86_64:
sudo yum remove gstreamer1-vaapi.x86_64

uridecodebin is part of the "base" plugin set, so make sure you have gstreamer-plugins-base.
Another thing to look into is your LD_LIBRARY_PATH and GST_PLUGIN_PATH. If they point to a different GStreamer installation, it could cause problems like this. Also, if you didn't install GStreamer with a package manager, you may need to set your LD_LIBRARY_PATH to point to it (or better yet, install it with a package manager).

Pleas try to use gst-inspect command to find out if environment is correctly setup.
use gst-launch -v playbin2 uri = "your_uri_here" to find more information to trace this issue.

Related

How to cause build system to fail compilation in case patch fail to apply

I'm using an OpenWRT environment for code development.
Now, OpenWRT build works by first fetching a package from remote repository, extract it and later apply local patches on top of that code.
What I've noticed is that in case the patch fails to apply, the build itself not always fail, and that creates problems from entire system perspective.
I'm looking for a way to define that in case a patch is fail to apply, the entire build will fail.
Thank you all in advance!
According to the documentation, the easiest way to spot build failures would be to run make V=s 2>&1 | tee build.log | grep -i '[^_-"a-z]error[^_-.a-z]'.
If you know you are having issues with a specific package, I would specifically build those packages via make package/<pkgname>/compile V=s and see where it is failing.
Also, I would try testing the image out in qemu before flashing a real device. That way you can verify your build.

GStreamer video window not opening (macOS)

I am trying to run the first tutorial on GStreamer and running into some issues.
When I compile the code found here and run it, no compilation errors or warnings occur and the stream is found, but only the audio plays. When I run the executable with the GST_DEBUG environment variable set to 3, then I get the following debug output:
0:00:00.312559000 5230 0x7f8326031ad0 FIXME videodecoder gstvideodecoder.c:928:GstFlowReturn gst_video_decoder_drain_out(GstVideoDecoder *, gboolean):<vp8dec0> Sub-class should implement drain()
0:00:00.355530000 5230 0x7f8325139ed0 FIXME videodecoder gstvideodecoder.c:928:GstFlowReturn gst_video_decoder_drain_out(GstVideoDecoder *, gboolean):<vp8dec0> Sub-class should implement drain()
0:00:00.355659000 5230 0x7f8325139ed0 FIXME videodecoder gstvideodecoder.c:928:GstFlowReturn gst_video_decoder_drain_out(GstVideoDecoder *, gboolean):<vp8dec0> Sub-class should implement drain()
So it seems like there is some error either in my install of the videodecoder or the videodecoder itself, I can't say for certain.
When I try running the same media directly from the gstreamer CLI using the command
./gst-launch-1.0 -v playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
I get a small OpenGL window that plays both the video and audio without any hiccups.
When I tried to install GStreamer and its plugins from brew, I ran into issues with certain plugins missing (namely certain decoders and demuxeres like vorbisdec). When I run the gst-launch tool from the brew install, I get warnings regarding the missing vorbis decoder. In this case, video plays without incident but audio does not.
Could this be an issue with the GStreamer framework pointing to the wrong plugins or directories? How can I diagnose this and/or fix it? Any help is greatly appreciated!
You might be running into https://gitlab.freedesktop.org/gstreamer/gst-docs/-/issues/10: on macOS you need to have a GLib main-loop running in order to display an OpenGL window. So in the tutorial you'll need to add something along the lines of this to make it work:
// Construct main-loop
GMainLoop *main_loop;
main_loop = g_main_loop_new(NULL, FALSE);
(...)
// Run main-loop
g_main_loop_run(main_loop);
(...)
// Clean-up
g_main_loop_unref(main_loop);
See tutorial 12 for an example.
As for the plugins not working with the Homebrew installation, you'll need to specify the location of the plugins manually. Depending on where Homebrew installed them and which ones you installed, it might look something like this:
export GST_PLUGIN_SYSTEM_PATH="/usr/local/opt/gst-plugins-good/lib/gstreamer-1.0/:/usr/local/opt/gst-plugins-bad/lib/gstreamer-1.0/:/usr/local/opt/gst-plugins-base/lib/gstreamer-1.0/:/usr/local/opt/gstreamer/lib/"

How do you install OCaml with Jane Street's Core using OPAM?

The simple directions found all over the internet for installing Core using OPAM no longer work. What is the new way to install and use Core?
I think I tracked the problem down to a message on the ocaml-core mailing list about renaming several dependencies https://groups.google.com/forum/#!topic/ocaml-core/Te6LTiNBO08.
Paired down, the widely published installation instructions amount to two steps after installing opam itself:
$ opam install core
$ cat >> ~/.ocamlinit <<EOF
#use "topfind";;
#thread;;
#camlp4o;;
#require "core.top";;
#require "core.syntax";;
EOF
Following these directions result in an error about the "sexprlib.syntax" package missing when using ocaml (or corebuild, utop, etc).
Failing directions can be found in this widely referenced ebook
https://github.com/realworldocaml/book/wiki/Installation-Instructions#setting-up-and-using-utop
and are reflected in directions here on Stackoverflow in questions such as:
Ocaml utop library paths, Core module
What is the new way to set up Core?
opam install core no longer seems to be sufficient since it does not pull in the new syntax packages. I am not sure if this is a dependency bug or not.
The recommended ocamlinit settings also seem wrong.
I found that the core 113.24.00 is defective and all the installation instructions on the net as of this writing are out of date.
Users must make the following corrective steps:
Remove all #require references to packages ending in .syntax from ~/.ocamlinit.
Make your own corebuild script without any references to syntax packages
as found at https://github.com/janestreet/core/blob/master/corebuild.
You may also remove the #camlp4o;; line from your .ocamlinit as this library is no longer required by Core.

How do I compile/build against Ocamlodbc

I've installed Ocamlodbc using opam install odbc, but I can't work out how to build an app that uses it with ocamlbuild. The examples that come with the source don't build either.
If I put
#require "odbc";;
into my .ocamlinit, I can open Odbc_unixodbc;; in utop, but any reference to functions in that module result in a "Reference to undefined global 'Odbc_unixodbc'" error.
The following snippet also fails with an error about no implementation for "Odbc_unixodbc"
open Odbc_unixodbc
let () = ignore (Odbc_unixodbc.connect "DSN" "UID" "PWD")
Trying
open Odbc
fails with "Unbound module Odbc"
I'm building the code with
ocamlbuild -pkg odbc test.native
The generated documentation for the package seem to suggest I should be opening the "Ocamlodbc" module, but that also results in an "Unbound module" error.
TL;DR
ocamlbuild -use-ocamlfind -pkg odbc test.native
Description
-use-ocamlfind tells ocamlbuild to use ocamlfind system to find libraries on your system. Otherwise, without this flag, you need to provide flags with concrete locations and also take care of the package dependencies. So, it is a good idea to always use ocamlfind.
If this command still doesn't work for you, then make sure, that you chose the right package name. You can use ocamlfind list to look at the set of all packages available on your system.
Further reading
While the above is ok for small programs, I would suggest to use OASIS system to handle all the flags for you.
You can start from this example, adapting dependency list to your neeeds.

Why gst_element_factory_find can't find factory "decodebin"?

I have installed gstreamer-1.4.0 in order to create simple app for decoding video files.
The pipeline which I try to create looks simple:
filesrc location="file.h264" ! decodebin ! filesink location="file.raw"
This pipeline works fine when i launch it using gst-launch-1.0, however when I try to run my program written in C, it cannot find factory called "decodebin".
GstElementFactory *factory;
factory = gst_element_factory_find("decodebin");
if( !factory )
// fail
Above code always fails (factory is NULL). gst-inspect-1.0 recognizes "decodebin" correctly, so my guess is that something's wrong with GST_PLUGIN_PATH or something similar, but I have no idea how should I configure it properly. But it's just my guess based on the fact that my app creates other elements from factories such as filesrc or filesink which are in plugin called coreelements, and still decodebin which is from plugin 'playback' failes.
My question: How can i fix my gstreamer configuration in order to recognize all plugins, not just coreelements?
If i skipped some important info please let me know so that I could append it asap :)
// EDIT:
Let's say i've installed gstreamer from sources (i'm using ubuntu 14.04).
I've also installed all plugins (base, bag, good), also from sources.
Installation directory was /opt/gstreamer-1.4.0/, maybe this causes some problem.
If I execute command:
echo $GST_PLUGINS_PATH
all I get is an empty line, similar effect when i try to display values of other GST_* environmental variables.
more specific question: Which directories should I append to which variables in order to make non coreelements plugins work?
And if this question is too general, than:
how gst_element_factory_find("factory_name") checks if a given factory exists?
Don't know if what i did fixed everything, but for now i solved my problem by copying libplayback.so and other compiled plugins binaries to the folder with libcoreelements.so
It appears that the problem was caused by the non-standard installation directories,
so my solution is a hotfix, since I still don't know how was it possible that gst-inspect-1.0 recognized all plugins whilst gst_element_factory_find() couldn't. Any further inside will be appreciated :)

Resources