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. [SOLVED] Video files in external Qt resource file can not play
Forum Update on Monday, May 27th 2025

[SOLVED] Video files in external Qt resource file can not play

Scheduled Pinned Locked Moved General and Desktop
qmlvideomp4resource
6 Posts 4 Posters 3.1k Views
  • 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.
  • P Offline
    P Offline
    Phataas
    wrote on last edited by Phataas
    #1

    I have an application where I included text, images and video in the Qt resource file. I want to add more files and I want to use the rcc tool included with Qt to make a external binary resource files that I can dynamically load on startup.

    There has been no change to the code as the paths to the files are the same. The only difference is that I must load the external binary resource file with QResource::registerResource().

    The application still works as intended except video files. This means the text and images are read/shown as before, but the video can not play. I do not get any runtime warnings or error.

    I packed the resource file with -binary and -no-compress options. Is there some reason for why the video files can not be played? The resource is found!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I may be wrong, but it's possible that the multimedia backend don't handle media files from Qt's resources system. AFAIK, the backends are using native APIs that don't know how to handle qrc paths.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Phataas
        wrote on last edited by
        #3

        I have filed a bug report and it seems this is a bug in the DirectShow backend. This means it is affected when using Windows and MinGW compiler.

        See bug status here.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Good, I stand corrected, that's at least something that might be fixable

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          PopQtP 1 Reply Last reply
          0
          • SGaistS SGaist

            Good, I stand corrected, that's at least something that might be fixable

            PopQtP Offline
            PopQtP Offline
            PopQt
            wrote on last edited by
            #5

            @SGaist is this bug cleared? I mean, can we load media files from .qrc ?

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              Yes, it is fixed since Qt 5.6.2, as the linked bug report suggests.

              (Z(:^

              1 Reply Last reply
              3

              • Login

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