Search code examples
qtdeploymentqmlgstreamer

Error: Your GStreamer installation is missing a plugin: Deploying Gstreamer plugins with QML application


I am trying to create a package for a QML application which plays both audio and video and i'm stuck at GStreamer plugins. I use cqtdeployer to create this distribution package. This tool beautifully gathers the libraries and (qml)plugins that the executable needs. However, it cannot detect some libraries such as GStreamer and its plugins even if I increase the recursive depth.

If i install gstreamer1.0-libav from apt video and audio do play. However, I will be deploying this package offline.

I've checked the contents of this package https://packages.ubuntu.com/xenial/gstreamer1.0-libav and the only shared library it consists is libgstlibav.so, and I also copied it to my lib/ folder. Also installed gstreamer1.0-plugins-base on my development environment and copied everything under /usr/lib/x86_64-linux-gnu/gstreamer-1.0/ to my application's lib/ folder as well.

When I try and run the software on a virtual machine audio alone plays, however, the video does not play and gives the following error: Warning: "No decoder available for type 'video/x-h264, stream-format=(string)main, codec_data.. etc.

Similar warning for audio as well when I attempt to play the video: "Warning: No decoder available for 'audio/mpeg, mpegversion=(int)4.. etc. But i suppose this is about video's playback audio. Because as I said, i can play audio alone.

Thanks for any help in advance. I can share an ugly list of libraries that I ship with my software if it helps.


Solution

  • Check https://gstreamer.freedesktop.org/documentation/gstreamer/running.html?gi-language=c. Specifically GST_PLUGIN_PATH you can set a directory to scan for plugins.

    Note that plugins really are plugins. They are scanned and run at time. That is also the reason no qtdeploy script etc can detect potential missing plugins. The use of plugins is being done by names, not bt actually linking them to the application.