Problem to deploy Qt app with QtMultimedia on Linux
-
Hi,
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 installedI 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 :
@ myApp/
|____libs/
| |____libQt5Multimedia.so.5.3.1
| |____libQt5MultimediaQuick_p.so.5.3.1
| |libQt5MultimediaWidgets.so.5.3.1
| |...
|
|_____myApp
|
|Makefile
|
|...@Of course, my app run correctly on machine (ubuntu 13.10). My app.pro :
@TEMPLATE = app
QT += qml quick multimedia
SOURCES += main.cpp
datacube.cppRESOURCES += qml.qrc
img_interface.qrc
img_contenu.qrc
media.qrcAdditional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
Default rules for deployment.
include(deployment.pri)
HEADERS +=
datacube.h@Thank you for your help
-
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 ?
-
Looks like I was wrong about gstreamer-0.10 in Ubuntu-14.04
https://launchpad.net/ubuntu/trusty/+search?text=gstreamer0.10
Try
@
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. -
-
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
@
GST_DEBUG=4 ./app
@ -
Hi,
[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/qmlIs 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 errorbq. 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?
-
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 :
@Deployment/
|____myApp
|____myApp.sh
|____libs/
| |____libQt5Multimedia.so.5
| |____libQt5MultimediaQuick_p.so.5
| |libQt5MultimediaWidgets.so.5
| |...and other files given by ldd...
|____platforms/
| |___libqeglfs.so
| |___libqlinuxfb.so
| |___libqminimalegl.so
| |___libqminimal.so
| |___libqoffscreen.so
| |___libqxcb.so
|____QtMultimedia/
| |___libdeclarative_multimedia.so
| |___plugins.qmltypes
| |___qmldir
| |___Video.qml
|____QtQuick.2/
|___libqtquick2plugin.so
|___plugins.qmltypes
|___qmldir@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 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