Important: Please read the Qt Code of Conduct -

Adding custom video format to Qt using QtMultimedia

  • Hi all,

    I've a proprietary video format and need to implement it in Qt. As always there are multiple solutions available. This time I picked the one to implement my custom QMediaService and QMediaObjects.
    Unfortunally I cannot play it. My observations:

    1. Qt loads the plugin (metadata contains the org.qt-project.qt.mediaplayer service)
    2. Qt loads the system plugin (DirectShow plugin)
    3. Playback file does have a custom file format and mime type, registered by creating an additional mime type database according to the docs (XML)
    4. Plugin provides the Playback feature
    5. Plugin provides the QMediaServiceSupportedFormatsInterface (for the specific mime type)
    6. The provided QVideoRendererControl in my plugin is never called, instead Qt picks DirectShow to try playback

    It seems that QMediaPlayer is careless when it comes to mime types. It just picks the first available media service and tries it. And if it fails then that's it.

    Some extra information regarding my system:
    Windows 8.1
    Visual Studio 2015
    Qt 5.9.0 (x86 build as provided by Qt)

    Did someone encountered the same problem and have some advice to tackle it? Or did I just stumble upon a Qt bug / design issue?

    Another option would be not using the plugin system, but hey I thought it is made for it, so lets try it out...


  • Lifetime Qt Champion


    As a workaround, you can move the Qt plugins out of the corresponding folder so yours can be loaded.

    You situation is likely related to this QTBUG-32783.

  • Thanks, didn't found the mentioned bugreport earlier. Probably due to it is not on the QMultimedia board.
    It is not the workaround I'm looking for because the support for all other formats are gone then. For know I will make a custom QObject that can be attached to a VideoOutput object. That's ok for now.

Log in to reply