Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
Problem to deploy Qt app with QtMultimedia on Linux
I tried to deploy an application Qt (5.3) on Linux (Ubuntu 14.04) which use QtMultimedia I have first deployed a simple application (Hello World) to understand. I have had no problem ro run the application on Pc without install Qt.
In the same way, I have tried to desploy my whole app but I have a problem when I want execute my application :
bq. QQmlApplicationEngine failed to load component
qrc:/main.qml:3 module "QtMultimedia" is not installed
I have understand the problem comes to QtMultimedia but I don't find which library I have forgotten. I have the tree for my project deployment :
Of course, my app run correctly on machine (ubuntu 13.10). My app.pro :
@TEMPLATE = app
QT += qml quick multimedia
SOURCES += main.cpp
RESOURCES += qml.qrc
Additional import path used to resolve QML modules in Qt Creator's code model
Default rules for deployment.
Thank you for your help
Do you have gstreamer-0.10 installed on Ubuntu-14.04?
By default it is not included so you need to take care about it.
QtMultimedia uses gstreamer-0.10 on linux.
Indeed, I think gstreamer-0.10 was no install.
Now, I have install gstreamer-0.10 with lines :
bq. sudo add-apt-repository ppa:gstreamer-developers/ppa
sudo apt-get update
sudo apt-get install gstreamer1.0*
After, I have still the same problem. How can I see if gstreamer-0.10 is correctly installed ?
You have installed gstreamer-1.0.
Ubuntu-14.04 does not have gstreamer-0.10 in its default repositories.
Yes I have seen there are problem with ubuntu 14.04.
What can I do ? Install others packages ? Change version of ubuntu ?
Looks like I was wrong about gstreamer-0.10 in Ubuntu-14.04
apt-cache search gstreamer0.10
and if it will find the packages then
sudo apt-get-install libgstreamer0.10-0 gstreamer0.10-ffmpeg gstreamer0.10-plugins-base gstreamer0.10-plugins-ugly gstreamer0.10-plugins-good gstreamer0.10-plugins-bad
add other gstreamer packages that you need to the list.
Thank you to take time for my problem.
I had already install all packages gstreamer0.10
@apt-get install gstreamer0.10*@
I have install several without succes to run my app.
How I can be sure the problem comes to gstreamer and not something else ?
I think you also need to install libgstreamer0.10-0
You can use "GST_DEBUG":http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gst-running.html to control debug output from gstreamer
I have already instaledl libgstreamer0.10*
If I run my application with GST_DEBUG, I have the same message : "QtMultimedia is not installed".
[quote author="helenebro" date="1406206379"] I have the same message : "QtMultimedia is not installed".[/quote]You also need to deploy Qt's QML libraries. Copy the folder <Qt>/qml/QtMultimedia/
Indeed, it works. Thank you.
I have a new problem but it seems easy to solve :
@libdeclarative_multimedia.so uses incompatible Qt library (5.3.1).@
I build my app with "Desktop Qt 5.3 GCC 64 bits".
On qml, I import QtMultimedia 5.0 (or 5.3)
I have copy the file on Qt/5.3/gcc_64/qml
Is there a different to 5.3 and 5.3.1 ?
Qt 5.3.1 is the latest version of Qt 5.3.
[quote]libdeclarative_multimedia.so uses incompatible Qt library (5.3.1)[/quote]Ubuntu contains older versions of Qt 5. Are you sure your app is linking to the correct versions of all the libraries? Use ldd to check.
It seems that I build my app with Qt 5.3 and I have had libraries on file Qt/5.3/gcc_64. The lib uses for QtMultimedia are 5.3.1 extensions.
I have succeed to run my app by using Qt 5.2.1 but I have a new problem with QtMultimedia.
When I run my app, I have the error
bq. defaultServiceProvider::requestService():no service found for - "org.qt-project.qt.mediaplayer"
Files libQt5Multimedia.so.5, libQt5MultimediaQuick_p.so.5 and libQt5MultimediaWidgets.so.5 are on libs folder and I had copied QtMultimedia folder.
Does it work when you run your app in Qt Creator?
Yes, I have no problem on Qt Creator. I have also update the version of my development PC to Ubuntu 14.4 to check the problem doesn't come to this version.
That's good! :) Then you just need to deploy correctly. You are probably missing a multimedia plugin (check your plugins folder)
See "this page":http://qt-project.org/wiki/Deploy_an_Application_on_Windows for the correct folder structure (it's written for Windows, but it applies to Ubuntu too).
This blog has very good details on the deployment process, including Linux-specific descriptions:
Thank you for the links. I use the method to clean my environment on my development comptuter (change Qt folder to QtHidden), and my app run correctly on this computer. I think it miss a library what is not on is folder.
I have the tree :
| |...and other files given by ldd...
Before to start app, I set LD_LIBRARY_PATH (export LD_LIBRARY_PATH=libs).
Is it normal that ldd don't name multimedia files ?
I have also test the method "Quick and dirty" of the first link (I have copy all files on Qt/Qt5.2/gcc_64/plugins, Qt/Qt5.2/gcc_64/qml and Qt/Qt5.2/gcc_64/lib) whitout succeed
Further, I have checked gstreamer is correctly install on computer for the deployment. I have test some command gst-launch-1.0 wihout problem
I have found a solution. I have directly install liqt5multumedia5-plugins on the target computer. i think it isn't the cleanest solution but it works.
Thank you for your help
masum last edited by
I am also fetching same problem at windows environment (windows 8.1 64bit). When ever try to deploy app into android emulator then it show following errors.
qrc:///demos/maroon/content/SoundEffect.qml:45 ((null)): qrc:///demos/maroon/content/SoundEffect.qml:45: Error: Qt.createQmlObject(): failed to create object:
qrc:///demos/maroon/content/inline:1:1: module "QtMultimedia" is not installed