[solved] Deploy app with QtMultimedia on Windows
-
Hi,
I have an app (with Qt5.2.1) which use QtMultimedia (5.0) to play Audio (or Video). When I run the app on Qt Creator, I've no problem. I want deploy this application but my media doesn't work.
This is my main.qml :import QtQuick 2.2
import QtQuick.Window 2.1
import QtMultimedia 5.0Window {
visible: true
width: 360
height: 360MouseArea { anchors.fill: parent onClicked: mediaplayer.play() } Video { id: mediaplayer anchors.fill: parent source: "file:/myVideo.mp4" }
}
and my folder of deployement :
myFloderDeploy/
|___myVideo.mp4
|___icudt51.dll
|___icuin51.dll
|___icuuc51.dll
|___libgcc_s_dw2-1.dll
|___libstdc++-6.dll
|___libwinpthread-1.dll
|___Qt5Core.dll
|___Qt5Gui.dll
|___Qt5Multimedia.dllWhen I display state of Video, I see status : "noMedia", the error : "FormatError" and the source is correct.
I don't find what's missing.Thnak you for your help
|___Qt5MultimediaQuick_p.dll
|___Qt5MultimediaWidgets.dll
|___Qt5Network.dll
|___Qt5Qml.dll
|___Qt5Quick.dll
|___Qt5Sql.dll
|___Qt5Widgets.dll
|___testVideo.exe
|___imageformats/
|___platforms/
|___QtGraphicalEffects/
|___QtMultimedia/
|___QtQuick/
|___QtQuick.2/
|___sqldrivers/ -
Hi,
You are missing the QtMultimedia plugins. You can use windeployqt to get all dependencies deployed
-
@SGaist
I have the folder QtMultimedia ( it's a copy of the file C:\Qt\5.2.1\mingw48_32\qml\QtMultimedia) . Is it the right file (and the right place)?I test windeployqt but it doesn't work. When I manually add dll : libgcc_s_dw2-1.dll, libstdc++-6.dll, libwinpthread-1.dll, Qt5Quick.dll and Qt5MultimediaQuick_p.dll, app run but I have the same problem : no video.
This the tree when I deploy with windeployqt :
|___arbre.txt
|___icudt51.dll
|___icuin51.dll
|___icuuc51.dll
|___libgcc_s_dw2-1.dll
|___libstdc++-6.dll
|___libwinpthread-1.dll
|___main.o
|___moc_myapp.cpp
|___moc_myapp.o
|___myapp.o
|___qrc_qml.cpp
|___qrc_qml.o
|___qrc_ressources.cpp
|___qrc_ressources.o
|___Qt5Core.dll
|___Qt5Gui.dll
|___Qt5Multimedia.dll
|___Qt5MultimediaQuick_p.dll
|___Qt5Network.dll
|___Qt5Qml.dll
|___Qt5Quick.dll
|___qt_cs.qm
|___qt_de.qm
|___qt_hu.qm
|___qt_it.qm
|___qt_ja.qm
|___qt_ru.qm
|___qt_sk.qm
|___qt_uk.qm|___ testVideo.exe
|___ accessible/
|___ bearer/
|___iconengines/
|___imageformats/
|___platforms/ -
Again, you are missing the QtMultimedia plugins
-
I don't understand. Is the QtMultimedia plugins correspond to the folder QtMultimedia (on C:\Qt\5.2.1\mingw48_32\qml or C:\Qt\5.2.1\mingw48_32\include) ? When I include this folder (next to .exe), it doesn't work.
myFloderDeploy/
|___myVideo.mp4
|___icudt51.dll
|___icuin51.dll
|___icuuc51.dll
|___libgcc_s_dw2-1.dll
|___libstdc++-6.dll
|___libwinpthread-1.dll
|___Qt5Core.dll
|___Qt5Gui.dll
|___Qt5Multimedia.dll
|___Qt5MultimediaQuick_p.dll
|___Qt5MultimediaWidgets.dll
|___Qt5Network.dll
|___Qt5Qml.dll
|___Qt5Quick.dll
|___Qt5Sql.dll
|___Qt5Widgets.dll
|___testVideo.exe
|___platforms/
|___accessible/
|___bearer/
|___iconengines/
|___imageformats/
|___platforms/
|___qmltooling/
|___QtGraphicalEffects
|___QtMultimedia/
|___QtMultimediaQuick_p/
|___QtMultimediaWidgets/
|___QtQuick/
|___QtQuick.2/
|___sqldrivers/ -
Good !
Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)