Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. No Mp4 Playback on Release Deployment
Forum Updated to NodeBB v4.3 + New Features

No Mp4 Playback on Release Deployment

Scheduled Pinned Locked Moved Solved General and Desktop
45 Posts 4 Posters 4.2k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C celica

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

    JKSHJ Offline
    JKSHJ Offline
    JKSH
    Moderators
    wrote on last edited by
    #24

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

    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

    C 1 Reply Last reply
    3
    • JKSHJ JKSH

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

      C Offline
      C Offline
      celica
      wrote on last edited by
      #25

      @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

      JKSHJ 1 Reply Last reply
      0
      • C celica

        @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

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #26

        @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\ ?

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        C 2 Replies Last reply
        2
        • JKSHJ JKSH

          @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\ ?

          C Offline
          C Offline
          celica
          wrote on last edited by
          #27

          @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

          1 Reply Last reply
          0
          • JKSHJ JKSH

            @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\ ?

            C Offline
            C Offline
            celica
            wrote on last edited by
            #28

            @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
            
            JKSHJ 1 Reply Last reply
            0
            • C celica

              @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
              
              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #29

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

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              C 1 Reply Last reply
              0
              • JKSHJ JKSH

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

                C Offline
                C Offline
                celica
                wrote on last edited by
                #30

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

                JKSHJ 1 Reply Last reply
                0
                • C celica

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

                  JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #31

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

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  C 1 Reply Last reply
                  0
                  • JKSHJ JKSH

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

                    C Offline
                    C Offline
                    celica
                    wrote on last edited by
                    #32

                    @JKSH Ok thanks
                    It's gonna be a pain to convert this player example from working in QT Designer to work in Visual Studio

                    mrjjM JKSHJ 2 Replies Last reply
                    0
                    • C celica

                      @JKSH Ok thanks
                      It's gonna be a pain to convert this player example from working in QT Designer to work in Visual Studio

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #33

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

                      C 1 Reply Last reply
                      0
                      • mrjjM mrjj

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

                        C Offline
                        C Offline
                        celica
                        wrote on last edited by
                        #34

                        @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

                        mrjjM 1 Reply Last reply
                        0
                        • C celica

                          @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

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #35

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

                          1 Reply Last reply
                          0
                          • C celica

                            @JKSH Ok thanks
                            It's gonna be a pain to convert this player example from working in QT Designer to work in Visual Studio

                            JKSHJ Offline
                            JKSHJ Offline
                            JKSH
                            Moderators
                            wrote on last edited by
                            #36

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

                            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                            C 2 Replies Last reply
                            3
                            • JKSHJ JKSH

                              @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.
                              C Offline
                              C Offline
                              celica
                              wrote on last edited by
                              #37

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

                              JKSHJ 1 Reply Last reply
                              0
                              • JKSHJ JKSH

                                @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.
                                C Offline
                                C Offline
                                celica
                                wrote on last edited by
                                #38

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

                                1 Reply Last reply
                                0
                                • C celica

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

                                  JKSHJ Offline
                                  JKSHJ Offline
                                  JKSH
                                  Moderators
                                  wrote on last edited by
                                  #39

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

                                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                  C 1 Reply Last reply
                                  3
                                  • JKSHJ JKSH

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

                                    C Offline
                                    C Offline
                                    celica
                                    wrote on last edited by
                                    #40

                                    @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);
                                    	
                                    };
                                    
                                    JKSHJ 1 Reply Last reply
                                    0
                                    • C celica

                                      @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);
                                      	
                                      };
                                      
                                      JKSHJ Offline
                                      JKSHJ Offline
                                      JKSH
                                      Moderators
                                      wrote on last edited by JKSH
                                      #41

                                      @celica said in No Mp4 Playback on Release Deployment:

                                      QMediaPlayer *player = new QMediaPlayer;
                                      QMediaPlayer *playernew = new QMediaPlayer;
                                      

                                      Here is your problem.

                                      You must ensure that QApplication is the very first QObject that is constructed in your app.

                                      However, your QMediaPlayers are initialized statically (in other words, they are initialized outside of a function), which means they can be created before QApplication. When this happens, they look for the mediaservice plugin but they can't find it (because QApplication hasn't loaded it yet), so they give up and they can't play your video.

                                      Go through you entire code base and make sure that you don't have any QObjects that are initialized statically.

                                      QCoreApplication::addLibraryPath(".");
                                      

                                      This line is not necessary. Remove it.

                                      (To understand why, read https://doc.qt.io/qt-5/qcoreapplication.html#libraryPaths )

                                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                      C 1 Reply Last reply
                                      3
                                      • JKSHJ JKSH

                                        @celica said in No Mp4 Playback on Release Deployment:

                                        QMediaPlayer *player = new QMediaPlayer;
                                        QMediaPlayer *playernew = new QMediaPlayer;
                                        

                                        Here is your problem.

                                        You must ensure that QApplication is the very first QObject that is constructed in your app.

                                        However, your QMediaPlayers are initialized statically (in other words, they are initialized outside of a function), which means they can be created before QApplication. When this happens, they look for the mediaservice plugin but they can't find it (because QApplication hasn't loaded it yet), so they give up and they can't play your video.

                                        Go through you entire code base and make sure that you don't have any QObjects that are initialized statically.

                                        QCoreApplication::addLibraryPath(".");
                                        

                                        This line is not necessary. Remove it.

                                        (To understand why, read https://doc.qt.io/qt-5/qcoreapplication.html#libraryPaths )

                                        C Offline
                                        C Offline
                                        celica
                                        wrote on last edited by
                                        #42

                                        @JKSH Thanks so much. This is great.
                                        It is now loading the files previously it was not loading i.e.

                                        incommandnew\Win32\Release\mediaservice\dsengine.dll
                                        

                                        Plus the codecs it is now loading.

                                        0x000000005d520000  0x8a000   C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\LAVSplitter.ax
                                        
                                        0x000000005bc00000  0x23c000  C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avutil-lav-56.dll
                                        0x000000005bbb0000  0x49000   C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\libbluray.dll
                                        0x000000005be40000  0x389000  C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avformat-lav-58.dll
                                        0x000000005c1d0000  0x1350000  C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avcodec-lav-58.dll
                                        0x000000005bb80000  0x2d000   C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avresample-lav-4.dll
                                        

                                        The video is still not playing however when it is deployed.

                                        JKSHJ 1 Reply Last reply
                                        0
                                        • C celica

                                          @JKSH Thanks so much. This is great.
                                          It is now loading the files previously it was not loading i.e.

                                          incommandnew\Win32\Release\mediaservice\dsengine.dll
                                          

                                          Plus the codecs it is now loading.

                                          0x000000005d520000  0x8a000   C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\LAVSplitter.ax
                                          
                                          0x000000005bc00000  0x23c000  C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avutil-lav-56.dll
                                          0x000000005bbb0000  0x49000   C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\libbluray.dll
                                          0x000000005be40000  0x389000  C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avformat-lav-58.dll
                                          0x000000005c1d0000  0x1350000  C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avcodec-lav-58.dll
                                          0x000000005bb80000  0x2d000   C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV\avresample-lav-4.dll
                                          

                                          The video is still not playing however when it is deployed.

                                          JKSHJ Offline
                                          JKSHJ Offline
                                          JKSH
                                          Moderators
                                          wrote on last edited by
                                          #43

                                          Great progress!

                                          @celica said in No Mp4 Playback on Release Deployment:

                                          The video is still not playing however when it is deployed.

                                          Then it's time to start debugging your app.

                                          Back up your code (using source control, like Git, is best). After that, keep removing large blocks of code from your app and keep retrying the deployment until your problem disappears.

                                          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                          C 1 Reply Last reply
                                          2

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved