Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. play mp4 video on qt performance high cpu than chrome
QtWS25 Last Chance

play mp4 video on qt performance high cpu than chrome

Scheduled Pinned Locked Moved Solved Qt WebKit
8 Posts 2 Posters 1.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.
  • L Offline
    L Offline
    lingxing
    wrote on 14 Nov 2023, 10:16 last edited by lingxing
    #1

    i play the video whith gpu "nvidia gtx1060"。may be the gpu drive is older。
    then i play a video on my demo and chrome。the chrome main process cost cpu is low, but qt is high。
    12345.jpg

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lingxing
      wrote on 14 Nov 2023, 10:26 last edited by
      #2

      my sample code is below:
      1.jpg

      2.jpg
      video.html main code is below:
      <video controls id="videoPlayer" width="1280px" height="780" src="https://res.war6sky.com/package/temp/testdemo.mp4" loop>
      </video>

      J 1 Reply Last reply 14 Nov 2023, 18:56
      0
      • L lingxing
        14 Nov 2023, 10:26

        my sample code is below:
        1.jpg

        2.jpg
        video.html main code is below:
        <video controls id="videoPlayer" width="1280px" height="780" src="https://res.war6sky.com/package/temp/testdemo.mp4" loop>
        </video>

        J Offline
        J Offline
        JoeCFD
        wrote on 14 Nov 2023, 18:56 last edited by JoeCFD
        #3

        @lingxing if your qt app has quick loops(video update), CPU will be busier for your app.
        And if qt code for video play uses more GPU, CPU may be less busier.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lingxing
          wrote on 15 Nov 2023, 07:24 last edited by
          #4

          my test is qtdemo6(the code just the pic above)。i found the blink use ffmpeg to decode video both my demo and chrome。but chrome peformance better than my demo。the render process i think is the same。but my demo main process may performance low efficiency。
          may be my gpu drive is older,i found the blink have not use gpu to decode。so my gpu always usage zero。

          J 1 Reply Last reply 16 Nov 2023, 00:23
          0
          • L lingxing
            15 Nov 2023, 07:24

            my test is qtdemo6(the code just the pic above)。i found the blink use ffmpeg to decode video both my demo and chrome。but chrome peformance better than my demo。the render process i think is the same。but my demo main process may performance low efficiency。
            may be my gpu drive is older,i found the blink have not use gpu to decode。so my gpu always usage zero。

            J Offline
            J Offline
            JoeCFD
            wrote on 16 Nov 2023, 00:23 last edited by JoeCFD
            #5

            @lingxing what is your os? What is blick?

            L 1 Reply Last reply 16 Nov 2023, 10:07
            0
            • J JoeCFD
              16 Nov 2023, 00:23

              @lingxing what is your os? What is blick?

              L Offline
              L Offline
              lingxing
              wrote on 16 Nov 2023, 10:07 last edited by
              #6

              win11 professional。i think this is not only my os。if you computer have two gpu,and the gpu drive is older。then you disable one gpu,let one gpu with the older dirve to work。then you will find the difference。

              J 1 Reply Last reply 16 Nov 2023, 15:09
              0
              • L lingxing
                16 Nov 2023, 10:07

                win11 professional。i think this is not only my os。if you computer have two gpu,and the gpu drive is older。then you disable one gpu,let one gpu with the older dirve to work。then you will find the difference。

                J Offline
                J Offline
                JoeCFD
                wrote on 16 Nov 2023, 15:09 last edited by JoeCFD
                #7

                @lingxing Try to use a ffmpeg pipeline from command line to play a video and check if your GPU is busy. If yes, dig into the source of Qt multimedia code to find out the reasons. For example, it was likely that GPU acceleration was not on when gstreamer was used in Qt. Possibly, playbin element was applied for playing videos. Extra settings have to be added to trigger hardware acceleration. If playing video is an important feature in your app, you may use FFMpeg directly in a qt sink and will have more control over all features.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  lingxing
                  wrote on 23 Nov 2023, 08:15 last edited by
                  #8

                  thank you for suggest。i will try later。

                  1 Reply Last reply
                  0
                  • L lingxing has marked this topic as solved on 1 Dec 2023, 09:06

                  6/8

                  16 Nov 2023, 10:07

                  • Login

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