Deployment on Windows with Qt Multimedia
-
Hello,
I'm trying to deploy my Qt software on Windows (using dynamic linking), but I can't get Qt Multimedia working correctly on an other computer than my development computer. Probably some DLL missing...
I've followed the instructions at http://wiki.qt.io/Deploy_an_Application_on_Windows, especially what they call the "Initial deployment", so now my software launches correctly on the computer without Qt installed. But my software makes use of Qt Multimedia to playback a video file, and this doesn't work (the video can't be started, even though I noticed that the video duration can be read correctly using the
duration
property of my MediaPlayer).Here's my setup :
- Windows 8.1 64bits (both for compilation and on the test computer)
- Qt 5.4.1
- MSVC2013 64bits
Could it have something to do with the Windows Media Foundation on which Qt Multimedia relies in my case ? Is there something special I should include with my software besides what is mentioned in the above link ?
Thanks,
iKrosoft -
Hi and welcome to devnet,
Did you deploy the QtMultimedia plugins ?
-
Hi @iKrosoft, and welcome to the Qt Dev Net!
I've followed the instructions at http://wiki.qt.io/Deploy_an_Application_on_Windows, especially what they call the "Initial deployment", so now my software launches correctly on the computer without Qt installed.
What happens when you perform the "Initial Deployment" steps (especially step #3) on your development PC?
-
@SGaist said:
Did you deploy the QtMultimedia plugins ?
For QtMultimedia, I have copied next to my executable
- the folder QtMultimedia (found under Qt\5.4\msvc2013_64\qml)
- Qt5Multimedia.dll, Qt5MultimediaQuick_p.dll and Qt5MultimediaWidgets.dll (found under Qt\5.4\msvc2013_64\bin)
@JKSH said:
What happens when you perform the "Initial Deployment" steps (especially step #3) on your development PC?
When I rename C:\Qt\ to C:\QtHidden\ on my development PC, my software works perfectly and is able to playback video files. So there must be something outside of the Qt folder that is needed (and absent on my test PC).
Thank you
-
@iKrosoft said:
For QtMultimedia, I have copied next to my executable
- the folder QtMultimedia (found under Qt\5.4\msvc2013_64\qml)
- Qt5Multimedia.dll, Qt5MultimediaQuick_p.dll and Qt5MultimediaWidgets.dll (found under Qt\5.4\msvc2013_64\bin)
What about the "audio", "mediaservice", and "playlistformats" folders? The "Initial Deployment" told you to copy the contents of the "plugins" folder too.
@JKSH said:
What happens when you perform the "Initial Deployment" steps (especially step #3) on your development PC?
When I rename C:\Qt\ to C:\QtHidden\ on my development PC, my software works perfectly and is able to playback video files. So there must be something outside of the Qt folder that is needed (and absent on my test PC).
What video format is it? Did you install any codecs on your development PC?
You can launch your app on your development PC, play a video, then use Sysinternals ListDLLs to show you the DLLs that it uses. Then, repeat the same on your test PC to find which DLLs are missing.
-
@JKSH said:
What about the "audio", "mediaservice", and "playlistformats" folders? The "Initial Deployment" told you to copy the contents of the "plugins" folder too.
I did copy everything that's mentioned in the "Initial Deployment" (see below). In my above post I only mentioned what I thought was directly related to QtMultimedia, sorry for the misunderstanding.
http://wiki.qt.io/Deploy_an_Application_on_Windows:Copy the following into C:\Deployment\
- The release version of MyApp.exe
- All the .dll files from C:\Qt\5.2.1\mingw48_32\bin\
- All the folders from C:\Qt\5.2.1\mingw48_32\plugins\
- (If you used QML) All the folders from C:\Qt\5.2.1\mingw48_32\qml\
@JKSH said:
What video format is it? Did you install any codecs on your development PC?
It is MP4 (codecs reported by VLC: Video: H264 - MPEG-4 AVC (part 10) (avc1), and Audio: MPEG AAC Audio (mp4a)). I also tried a MOV and a 3GP video, but none of these can be read by my software on my test PC. But all of those videos can be read by Windows Media Player on my test PC, and also by my software on my development PC with the Qt directory renamed.
AFAIK I didn't explicitly install any codec on my development PC. The codecs set on both PCs match exactly (as reported by Windows Media Player), except for a CyberLink audio codec.@JKSH said:
use Sysinternals ListDLLs to show you the DLLs that it uses
Using ListDLLs, I see on my development PC that 10 DLLs get loaded as I open the video. On my test PC, the DLLs that get loaded as I open the video are the 10 same ones, except for the version build number (e.g. 12.0.9600.16477 instead of 12.0.9600.17415). Could the problem be these versions differences? In this case how can I fix this, because even if I distribute the newest versions with my software, the old ones still get loaded.
Thanks a lot