Solved No Mp4 Playback on Release Deployment
-
@JKSH said in No Mp4 Playback on Release Deployment:
QT_DEBUG_PLUGINS
Great, getting closer
I'm not sure how to set that variable as I run the app from within Visual Studio 2017
I tried and got this response does this look right?[9952] PPLE [Informational] LIFECYCLE: OnResuming [9952] PPLE [Informational] LIFECYCLE: OnSuspending [10420] VSMSOUI: Button 'Suspend' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:385) defined by package 'Visual Studio Debugger' ({C9DD4A57-47FB-11D2-83E7-00C04F9902C1}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button 'Resume' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:386) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button 'Suspend and shutdown' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:387) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button 'No Background Tasks' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:388) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:389) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:390) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:391) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:392) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:393) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:394) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:395) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:396) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:397) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:398) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:399) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:400) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:401) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:402) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:403) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:404) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:405) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:406) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:407) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:408) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:409) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:410) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:411) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:412) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:413) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:414) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [10420] VSMSOUI: Button '' ({C9DD4A59-47FB-11D2-83E7-00C04F9902C1}:415) defined by package 'Unknown' ({No Match}) uses icon guidOfficeIcon:746, which is no longer supported [9952] PPLE [Informational] LIFECYCLE: OnResuming [9952] PPLE [Informational] LIFECYCLE: OnSuspending
-
@celica said in No Mp4 Playback on Release Deployment:
I'm not sure how to set that variable as I run the app from within Visual Studio 2017
You could temporarily set it in your PC's global environment. Just remember to un-set it after.
I tried and got this response does this look right?
Unfortunately not. It should look something like this:
QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/5.14.1/msvc2017/plugins/mediaservice" ... QFactoryLoader::QFactoryLoader() looking at "C:/Qt/5.14.1/msvc2017/plugins/mediaservice/dsengine.dll" Found metadata in lib C:/Qt/5.14.1/msvc2017/plugins/mediaservice/dsengine.dll, metadata= { "IID": "org.qt-project.qt.mediaserviceproviderfactory/5.0", "MetaData": { "Keys": [ "directshow" ], "Services": [ "org.qt-project.qt.camera", "org.qt-project.qt.mediaplayer" ] }, "archreq": 0, "className": "DSServicePlugin", "debug": false, "version": 331264 } "The plugin 'C:/Qt/Online/5.14.1/msvc2017/plugins/mediaservice/dsengine.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin
-
@JKSH Thanks
I set it within my code using this: qputenv("QT_DEBUG_PLUGINS", QByteArray("1"));
This is what I get:
https://easyupload.io/11rf2kNote it says defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer
Not sure if this is relevant. -
@celica said in No Mp4 Playback on Release Deployment:
Note it says defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer
Not sure if this is relevant.Yes, it's relevant -- it shows that your app has not loaded your mediaservice plugins.
Your QFactoryLoader lines are:
QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/InCommand/mediaservice" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/InCommand/platforms" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/Win32/Release/platforms" ... QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/platforms/qwindows.dll" QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/InCommand/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/Win32/Release/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/InCommand/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/Win32/Release/styles" ... QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/styles/qwindowsvistastyle.dll" QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/InCommand/bearer" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/Win32/Release/bearer" ... QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/bearer/qgenericbearer.dll" QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/InCommand/imageformats" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/Win32/Release/imageformats" ... QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/imageformats/qgif.dll" QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/imageformats/qicns.dll" QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/imageformats/qico.dll" QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/imageformats/qjpeg.dll" QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/imageformats/qsvg.dll" QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/imageformats/qtga.dll" QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/imageformats/qtiff.dll" QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/imageformats/qwbmp.dll" QFactoryLoader::QFactoryLoader() looking at "C:/Users/USER/Documents/incommandnew/Win32/Release/imageformats/qwebp.dll" QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/InCommand/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/Win32/Release/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/InCommand/accessiblebridge" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/USER/Documents/incommandnew/Win32/Release/accessiblebridge" ...
- You have plugin folders in 2 places. How did this happen? (The folders should only be in 1 place, by the way)
- C:/Users/USER/Documents/incommandnew/platforms/
- C:/Users/USER/Documents/incommandnew/Win32/Release/platforms/
- What's in
C:/Users/USER/Documents/incommandnew/Win32/Release/mediaservice
?
- You have plugin folders in 2 places. How did this happen? (The folders should only be in 1 place, by the way)
-
@JKSH Based on your advice I have totally removed all versions of QT (I had two - 5.5 for a legacy project & 5.12.2 for this project)
Now if I run the application from visual studio in release mode it works fine.
Which was your advice to get that working first.
So that's a good first step I think, thanks,
Now I'll try and delpoy it. -
This post is deleted! -
@JKSH
Hi, So now it works in release mode within VS.
Videos however still don't play if I deploy using -
windeployqt --qmldir C:\Users\me\Documents\incommand2017\InCommand\Resources\videos C:\Users\me\Documents\incommandCopy\Win32\DebugWhats weird is if I run the above command then try and run a release build from within VS the videos will also no longer play.
I have to delete all files from the release folder then rebuild the project and then it works again. -
@celica said in No Mp4 Playback on Release Deployment:
C:\Qt\5.12.2\msvc2017 to C:\Users\me\Documents\incommandCopy\Win32\Release
Great!
windeployqt --qmldir C:\Users\me\Documents\incommand2017\InCommand\Resources\videos C:\Users\me\Documents\incommandCopy\Win32\Debug
Debug or Release?
Whats weird is if I run the above command then try and run a release build from within VS the videos will also no longer play.
- Before you run
windeployqt
, your app tries to load DLLs from C:\Qt\5.12.2\msvc2017. windeployqt
copies DLLs from C:\Qt\5.12.2\msvc2017 to C:\Users\me\Documents\incommandCopy\Win32\Release- After you run
windeployqt
, your app won't try to load DLLs from C:\Qt\5.12.2\msvc2017 anymore. - After you run
windeployqt
, your app tries to load DLLs from C:\Users\me\Documents\incommandCopy\Win32\Release
Here's the thing: If
windeployqt
"forgets" to copy some DLLs from C:\Qt\5.12.2\msvc2017 to C:\Users\me\Documents\incommandCopy\Win32\Release, then your app won't work correctly. Yes, it can miss important DLLs; it is not perfect.So, use QT_DEBUG_PLUGINS and ListDLLs again to find out which DLLs are missing. Manually copy the missing DLLs from C:\Qt\5.12.2\msvc2017 to C:\Users\me\Documents\incommandCopy\Win32\Release.
IMPORTANT NOTE: You should only manually copy Qt DLLs. Do not touch non-Qt DLLs.
- Before you run
-
@JKSH Ah I see, that explains it
Ok I will bring the dlls over -The Listdll when working - https://easyupload.io/afhf4h
The Listdll when not working - https://easyupload.io/h895eqThe QT_DEBUG_PLUGINS when working - https://easyupload.io/r293gd
The QT_DEBUG_PLUGINS when not working - https://easyupload.io/b97tcj -
@celica said in No Mp4 Playback on Release Deployment:
Ok I will bring the dlls over
Which DLLs did you bring over? List them one-by-one.
Also, my earlier question still stands: What's inside C:\Users\me\Documents\incommand2017\Win32\Release\mediaservice\ ?
-
@JKSH Ok, I'll do that.
Those files were the status before I brought anything over just to let you knowIn C:\Users\me\Documents\incommand2017\Win32\Release\mediaservice\ are the following files:
dsengine.dll
qtmedia_audioengine.dll
wmfengine.dll -
@JKSH So the only difference between when it works and when it doesn't (in terms of the QT dlls, I have ignored all windows system files) are the following are omitted when it fails to work correctly but are included when it works.
I wonder why it fails to load anything located in the mediaservice folder0x0000000079c20000 0x42000 C:\Qt\5.12.2\msvc2017\plugins\mediaservice\dsengine.dll 0x000000007a650000 0x8a000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\LAVSplitter.ax 0x000000007a6e0000 0x23c000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avutil-lav-56.dll 0x000000007bcc0000 0x389000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avformat-lav-58.dll 0x000000007bc70000 0x49000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\libbluray.dll 0x0000000003f60000 0x1350000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avcodec-lav-58.dll 0x000000007c050000 0x2d000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avresample-lav-4.dll 0x000000007c090000 0x104000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\LAVVideo.ax 0x000000007c1a0000 0x37000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avfilter-lav-7.dll 0x000000007c1e0000 0x94000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\swscale-lav-5.dll 0x000000007c280000 0x1d2000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\DirectVobSub\vsfilter.dll 0x000000007c700000 0x44000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\LAVAudio.ax
-
@celica said in No Mp4 Playback on Release Deployment:
@JKSH So the only difference between when it works and when it doesn't (in terms of the QT dlls, I have ignored all windows system files) are the following are omitted when it fails to work correctly but are included when it works.
Yep, that's what I found too.
I wonder why it fails to load anything located in the mediaservice folder
It's very strange... as far as I can tell, all your DLLs are in the right place.
Just as a sanity check, could you try to build the "Media Player Example" (https://doc.qt.io/qt-5/qtmultimedia-multimediawidgets-player-example.html ) and deploy that? Does that work?
I believe you can find the example in C:\Qt\Examples\Qt-5.14.1\multimediawidgets\player\
If that doesn't work, try uninstalling the K-Lite Codec Pack.
-
@JKSH Tried removing codecs no luck - went through my code to see if anything was amiss. Looks ok.
Did a build from a completely different PC and the same thing happens - fresh installs of VS 2017 & Q 5.12.2I can run the multimedia player ok - from within QT creator.
Do I need to deploy this example?
The deploy option is greyed out. -
@celica said in No Mp4 Playback on Release Deployment:
Do I need to deploy this example?
The deploy option is greyed out.The idea is to use
windeployqt
to produce a deployment that can play videos.This is to check if the problem is in your code or not.
-
@JKSH Ok thanks
It's gonna be a pain to convert this player example from working in QT Designer to work in Visual Studio -
@celica
Hi
Just as a note.
There is a Qt plugin for Visual Studio that allows the use of UI files
so nothing needs to be converted. -
@mrjj Yes, I have that but I'm getting lots of errors when for nearly all of the header includes
visual studio cannot open source QApplication -
@celica
Ok, it does sound like something in the setup didn't went all well.
Normally it just works and you can right click an UI files and it opens Designer.
So while not as good integration as in Creator it should compile fine. -
@celica said in No Mp4 Playback on Release Deployment:
It's gonna be a pain to convert this player example from working in QT Designer to work in Visual Studio
You don't have to build it in Visual Studio.
- Build the example in Release mode in Qt Creator.
- Check that the example runs correctly in Qt Creator.
- Run
windeployqt
. - Check that the deployed example runs correctly.