Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

No Mp4 Playback on Release Deployment



  • Hi
    When I build a release version the background animations don't play (all of type mp4).
    They do play from within the Visual Studio debugger.

    I have tried the steps here and it still does not work when executed from the Deployment folder.
    All DLLs, QML folders and Plugin folders were copied over and still no luck.
    https://wiki.qt.io/Deploy_an_Application_on_Windows

    I use the windeployqt technique to build.
    I am building on VisualStudio 2017 and QT 5.12.2 (msvc2017)

    I have tried multiple versions of windows (xp, 7, 10) on multiple machines.
    Is it something I am forgetting to do when choosing to build a release version from within VS?
    Any ideas?


  • Moderators

    @celica said in No Mp4 Playback on Release Deployment:

    When I build a release version the background animations don't play (all of type mp4).
    They do play from within the Visual Studio debugger.

    1. Play your video in the Visual Studio debugger.
    2. While it is playing, use ListDLLs to print the list of all loaded DLLs.
    3. (Try to) play your video in your release build.
    4. While it is running, use ListDLLs to print the list of all loaded DLLs.

    What do you notice?


  • Moderators

    @celica

    I use the windeployqt technique

    can you post the command you used ?



  • Thanks for the replies.
    So the command I used was -
    cd C:\Qt\5.12.2\msvc2017\bin
    windeployqt C:\Users\me\Documents\incommandCopy\Win32\Release

    The ListDLLs displays a lot more entries for when the video plays compared to when it doesn't.
    Not sure where to start ->

    Working - https://easyupload.io/jbbnku
    Not Working - https://easyupload.io/2xu2tt


  • Moderators

    @celica said in No Mp4 Playback on Release Deployment:

    windeployqt C:\Users\me\Documents\incommandCopy\Win32\Release

    there you have it, you did not give the tool the path to (your) QMl files -> QML imports are not present

    --qmldir

    If your application uses Qt Quick, run:
      windeployqt --qmldir <path-to-app-qml-files> <path-to-app-binary>
    


  • @J-Hilk Ah I see, thanks. I thought that was definitely the solution
    However videos still not playing for the release build.
    I ran the following command

    windeployqt.exe --qmldir C:\Users\me\Documents\incommand2017\InCommand\Resources C:\Users\me\Documents\incommand2017\Win32\Release

    I even then pointed to the entire QML folder, still no luck
    windeployqt.exe --qmldir C:\Qt\5.12.2\msvc2017\qml C:\Users\me\Documents\incommand2017\Win32\Release

    I'm probably doing something silly here


  • Moderators

    @celica said in No Mp4 Playback on Release Deployment:

    Not sure where to start ->

    Working - https://easyupload.io/jbbnku
    Not Working - https://easyupload.io/2xu2tt

    Start by cross-checking the list of Qt DLLs. I've highlighted the ones that were present in your Debug build but not your Release deployment (some of them should now be captured when you use windeployqt with --qmldir):

    Working Not Working
    C:\Qt\5.12.2\msvc2017\plugins\bearer\qgenericbearerd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\bearer\qgenericbearer.dll
    C:\Qt\5.12.2\msvc2017\plugins\imageformats\qgifd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\imageformats\qgif.dll
    C:\Qt\5.12.2\msvc2017\plugins\imageformats\qicnsd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\imageformats\qicns.dll
    C:\Qt\5.12.2\msvc2017\plugins\imageformats\qicod.dll C:\Users\USER\Documents\incommand2017\Win32\Release\imageformats\qico.dll
    C:\Qt\5.12.2\msvc2017\plugins\imageformats\qjpegd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\imageformats\qjpeg.dll
    C:\Qt\5.12.2\msvc2017\plugins\imageformats\qsvgd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\imageformats\qsvg.dll
    C:\Qt\5.12.2\msvc2017\plugins\imageformats\qtgad.dll C:\Users\USER\Documents\incommand2017\Win32\Release\imageformats\qtga.dll
    C:\Qt\5.12.2\msvc2017\plugins\imageformats\qtiffd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\imageformats\qtiff.dll
    C:\Qt\5.12.2\msvc2017\plugins\imageformats\qwbmpd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\imageformats\qwbmp.dll
    C:\Qt\5.12.2\msvc2017\plugins\imageformats\qwebpd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\imageformats\qwebp.dll
    C:\Qt\5.12.2\msvc2017\plugins\mediaservice\dsengined.dll
    C:\Qt\5.12.2\msvc2017\plugins\platforms\qwindowsd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\platforms\qwindows.dll
    C:\Qt\5.12.2\msvc2017\plugins\styles\qwindowsvistastyled.dll C:\Users\USER\Documents\incommand2017\Win32\Release\styles\qwindowsvistastyle.dll
    C:\Qt\5.12.2\msvc2017\qml\QtQuick\Controls.2\qtquickcontrols2plugind.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\bearer\qnativewifibearerd.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\imageformats\qddsd.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\imageformats\qjp2d.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\imageformats\qmngd.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\InCommand.exe C:\Users\USER\Documents\incommand2017\Win32\Release\InCommand.exe
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5Cored.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5Core.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5Guid.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5Gui.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5Multimediad.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5Multimedia.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5MultimediaWidgetsd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5MultimediaWidgets.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5Networkd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5Network.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5OpenGLd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5OpenGL.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5Qmld.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5Qml.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5QuickControls2d.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5Quickd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5Quick.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5QuickTemplates2d.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5SerialPortd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5SerialPort.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5Svgd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5Svg.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\Qt5Widgetsd.dll C:\Users\USER\Documents\incommand2017\Win32\Release\Qt5Widgets.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\QtQuick.2\qtquick2plugind.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\QtQuick\Controls.2\qtquickcontrols2plugind.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\QtQuick\Templates.2\qtquicktemplates2plugind.dll
    C:\Users\USER\Documents\incommand2017\Win32\Debug\QtQuick\Window.2\windowplugind.dll

    See https://wiki.qt.io/Deploy_an_Application_on_Windows for manual deployment. Note that you also need to deploy the qmldir files for the Qt Quick plugins.



  • @JKSH Thanks for the help
    I ended up finding every file missing (there was 110) and moving them all to -:

    C:\Users\me\Documents\incommand2017\Win32\Release
    And still no mp4 playback when it runs as a release version rather than debug


  • Moderators

    @celica said in No Mp4 Playback on Release Deployment:

    I ended up finding every file missing (there was 110) and moving them all

    That's too many! You don't need to copy the DLLs from C:\Windows, for example.

    And still no mp4 playback when it runs as a release version rather than debug

    1. Did you deploy the qmldir files?
    2. What does ListDLLs show after you've moved the DLLs?


  • @JKSH
    OK thanks, just to be safe I took everything.

    The differential is a lot less now. (around 50 files)

    Working - https://easyupload.io/9f8zb0
    Not working - https://easyupload.io/38ngbq


  • Moderators

    @celica said in No Mp4 Playback on Release Deployment:

    just to be safe I took everything.

    Don't do that. It can cause crashes if you move system DLLs to a different PC with a slightly different version of Windows.

    The differential is a lot less now. (around 50 files)

    Working - https://easyupload.io/9f8zb0
    Not working - https://easyupload.io/38ngbq

    I'm still seeing C:\Windows DLLs that shouldn't be in your deployment folder, like C:\Users\USER\Documents\incommand2017\Win32\Release\WINMM.dll.

    Please clean up your build folder (delete everything), build your app from scratch, then deploy ONLY Qt files.

    BTW, I'm not seeing plugins\mediaservice\dsengine.dll get loaded. That's the one needed to play videos. One thing to try:

    • Put plugins\mediaservice\dsengine.dll in your release folder but delete plugins\mediaservice\wmfengine.dll
    • Put plugins\mediaservice\wmfengine.dll in your release folder but delete plugins\mediaservice\dsengine.dll


  • @JKSH Tried that, still no luck.
    Clean build.
    I just have a multimedia folder no plugins folder, don't know if that makes a difference -> \mediaservice\dsengine.dll

    I notice during the Listdll for when it works in debug it loads lots of codec files which are not present during the Release run, would this matter?

    0x0000000005a70000 0x23c000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avutil-lav-56.dll
    0x0000000005cb0000 0x49000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\libbluray.dll
    0x0000000005d00000 0x389000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avformat-lav-58.dll
    0x0000000006090000 0x1350000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avcodec-lav-58.dll
    0x00000000073f0000 0x2d000 C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avresample-lav-4.dll



  • @celica Hi Guys
    Still having issues, do you think the lack of codec files deployed during the release build has an effect?


  • Moderators

    @celica said in No Mp4 Playback on Release Deployment:

    I just have a multimedia folder no plugins folder, don't know if that makes a difference -> \mediaservice\dsengine.dll

    Sorry, The deployment shouldn't have a "plugins" folder. Rephrasing my last post, try:

    • Put mediaservice\dsengine.dll in your release folder but delete mediaservice\wmfengine.dll
    • Put mediaservice\wmfengine.dll in your release folder but delete mediaservice\dsengine.dll

    Your folder structure should be something like

    • app.exe
    • platform\qwindows.dll
    • mediaservice\dsengine.dll
    • ...

    I notice during the Listdll for when it works in debug it loads lots of codec files which are not present during the Release run, would this matter?

    Yes, it kind of matters because those codecs are used to play videos. However, you should not deploy those codec DLLs directly. They should be installed on your PC via the codec installer.

    Qt loads the codecs via a mediaservice plugin.



  • @JKSH Thanks, I tried that. You're right dsengine.dll does not get loaded.
    In fact nothing does from the mediaservice folder.
    Both from the output window within visual studio after a release build and from the Listdll result when it is running.
    Is there any way of forcing it to load this file?

    I tried removing the files you mention to no avail.
    All the codecs were installed via the codec installer.


  • Moderators

    @celica said in No Mp4 Playback on Release Deployment:

    In fact nothing does from the mediaservice folder.
    Both from the output window within visual studio after a release build

    Ah, this is an important clue.

    That means it's not a deployment issue. Rather, there's something broken in the Release build. Don't bother trying to deploy until the Release build works fine in Visual Studio.

    Try setting the environment variable QT_DEBUG_PLUGINS to 1 before running the app from Visual Studio OR from the command line. What messages do you see when it tries to load plugins?



  • @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
    

  • Moderators

    @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/11rf2k

    Note it says defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer
    Not sure if this is relevant.


  • Moderators

    @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" ... 
    
    1. 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/
    2. What's in C:/Users/USER/Documents/incommandnew/Win32/Release/mediaservice?


  • @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\Debug

    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.
    I have to delete all files from the release folder then rebuild the project and then it works again.


  • Moderators

    @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.



  • @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/h895eq

    The QT_DEBUG_PLUGINS when working - https://easyupload.io/r293gd
    The QT_DEBUG_PLUGINS when not working - https://easyupload.io/b97tcj


  • Moderators

    @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 know

    In 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 folder

    0x0000000079c20000  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
    

  • Moderators

    @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.2

    I can run the multimedia player ok - from within QT creator.
    Do I need to deploy this example?
    The deploy option is greyed out.


  • Moderators

    @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


  • Lifetime Qt Champion

    @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


  • Lifetime Qt Champion

    @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.


  • Moderators

    @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.

    1. Build the example in Release mode in Qt Creator.
    2. Check that the example runs correctly in Qt Creator.
    3. Run windeployqt.
    4. Check that the deployed example runs correctly.


  • @JKSH Great, thank you.
    So yes I deployed as a release build then used the command
    windeployqt.exe C:\Qt\Examples\Qt-5.12.2\multimediawidgets\build-player-Desktop_Qt_5_12_2_MSVC2017_32bit-Release\release

    and it works fine.

    https://ibb.co/9rSPFtj
    See screenshot, what does this tell us?



  • @JKSH Hi Guys
    Sorry to bother you again but is there anything else I can try here or am I out of luck?


  • Moderators

    @celica said in No Mp4 Playback on Release Deployment:

    it works fine.

    Hurray! 🎉🎉🎉

    what does this tell us?

    It tells us that there's nothing wrong with your copy of Qt and nothing wrong with your PC.

    So, there might be something wrong with your app. Post your code from main() (Please post the code in the forum; no need to use a file upload service)



  • @JKSH Here is main:
    I have also included the cpp file which does most of the heavy lifting as an uploaded file (this is huge) .
    https://easyupload.io/02m7h9

    #include "incommand.h"
    #include <QtWidgets/QApplication>
    #include "ButtonManager.h"
    #include <QtQuick/QQuickView>
    #include <QObject>
    #include <QtGlobal>
    
    
    
    int main(int argc, char *argv[])
    {
    
    
    	qputenv("QT_DEBUG_PLUGINS", QByteArray("1"));
    
    	QCoreApplication::addLibraryPath(".");
    	QApplication application(argc, argv);
    	InCommand mainWindow;
    	
    
    	QObject::connect(&application, SIGNAL(focusChanged(QWidget*, QWidget*)), &mainWindow, SLOT(focusChanged(QWidget*, QWidget*)));
    	mainWindow.setWindowFlags(Qt::FramelessWindowHint | Qt::Window);	//Set borderless window type
    #
    
    
    	QFile styleFile("Resources\\stylesheets\\defaultStyle.css");
    	QFile stylenightFile("Resources\\stylesheets\\NightStyleSheet.css");
    		
    	if (stylenightFile.open(QIODevice::ReadOnly | QIODevice::Text))
    	{
    		application.setStyleSheet(stylenightFile.readAll());
    		stylenightFile.close();
    		qDebug() << " -I: Stylesheet loaded OK";
    	}
    	else
    	{
    		qDebug() << " -E: Can't access default stylesheet!";
    	}
    
    
    #ifndef TESTING_ON_PC
    	application.setOverrideCursor(QCursor(Qt::BlankCursor));
    #endif	
    	QObject::connect(&application, SIGNAL(aboutToQuit()), &mainWindow, SLOT(appClosing()));
    
    	return application.exec();
    }
    
    
    class MyApi : public QObject
    {
    	Q_OBJECT
    public:
    	
    		Q_INVOKABLE virtual void setValue(int i);
    	
    };
    

Log in to reply