Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Multimedia
  4. QMediaplayer 6 bad performance
Forum Updated to NodeBB v4.3 + New Features

QMediaplayer 6 bad performance

Scheduled Pinned Locked Moved Unsolved Qt Multimedia
qmediaplayer6.2
11 Posts 3 Posters 1.5k Views 1 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.
  • F Offline
    F Offline
    Faust Faust
    wrote on last edited by
    #2

    I meant to write "At first the QMediaplayer 6..."!

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

      Hi,

      The multimedia module has seen a big rewrite. The current default backend is ffmpeg which should work pretty well.
      Do you have references for the videos that triggers these issues ?
      Are you using widgets or QtQuick ?

      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
      • F Offline
        F Offline
        Faust Faust
        wrote on last edited by Faust Faust
        #4

        Widgets. Works fine on Linux not Windows.
        I noticed that some versions QtQuick worked, Widgets didn't.
        None of the videos work well, some aren't even visible.

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

          Which exact version of Qt are you testing ?

          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
          • F Offline
            F Offline
            Faust Faust
            wrote on last edited by
            #6

            Currently the latest, but from 6 onwards it has never worked on Windows.
            I tested on several computers. Currently the QMediaplayer library works on Linux (previously not or badly), but not on Windows. On Linux updates often caused problems.
            Version 5 works perfectly on Windows and is able to play any video well and with minimal CPU usage!

            1 Reply Last reply
            0
            • F Offline
              F Offline
              Faust Faust
              wrote on last edited by
              #7

              From the tests I'm doing on all types of videos and encodings, it appears that players based on Qt 5 play videos better, at least on Windows, with greater fluidity, safety in repositioning, without flickering, and with minimal use of the CPU, always less than 1%.
              New technologies are not always the best!
              Let's hope the design team of the library in question manages to achieve a miracle again.
              It must be said that the ffplay player included in ffmpeg gives the same excellent results. So it's not ffmpeg that's the problem, I guess.

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

                Can you check wether you have the same issue with QtQuick ?

                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
                • F Offline
                  F Offline
                  Faust Faust
                  wrote on last edited by
                  #9

                  The problem could be due to directx 12 and some drivers. Maybe a bug.
                  I saw that VLC also has a similar problem, but it is solved by changing the hardware encoding from automatic to directx 11.
                  It is likely and explains why 5, the integrated player of ffmpeg and other players work perfectly, with excellent performance with any video.
                  Is there a way to force the use of directx 11 in mediaplayer via code or something else?
                  How can you use the vlc library in a Qt project?

                  1 Reply Last reply
                  0
                  • Nhan NguyenN Nhan Nguyen moved this topic from General and Desktop on
                  • F Offline
                    F Offline
                    Faust Faust
                    wrote last edited by
                    #10

                    Yes, it's as you say. It's a bug.
                    I created a player using the VLC library and solved it with:

                    if (player) {
                    libvlc_media_player_stop(player);

                    player = NULL;
                    }

                    source = QDir::toNativeSeparators(source);

                    libvlc_media_t *vlcMedia = libvlc_media_new_path(instance, source.toStdString().c_str());

                    libvlc_media_add_option(vlcMedia, ":avcodec-hw=d3d11va");

                    The Qt 5-based player is unbeatable on Windows!
                    Too bad!

                    1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      Nils Petter Skalerud
                      wrote last edited by
                      #11

                      Sounds like something we should improve in Qt 6 then. Could you please submit a bugreport to https://bugreports.qt.io, along with the following info?

                      • The Qt version tested
                      • Details on your machine (Windows in this case)
                      • The media backend used (Windows-native vs FFmpeg)
                      • A reproducer (including a video sample that we can use for testing)
                      1 Reply Last reply
                      0

                      • Login

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