play mp4 video on qt performance high cpu than chrome
-
wrote on 14 Nov 2023, 10:16 last edited by lingxing
-
wrote on 14 Nov 2023, 10:26 last edited by
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> -
my sample code is below:
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> -
wrote on 15 Nov 2023, 07:24 last edited by
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。 -
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。 -
wrote on 16 Nov 2023, 10:07 last edited by
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。
-
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。
wrote on 16 Nov 2023, 15:09 last edited by JoeCFD@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.
-
wrote on 23 Nov 2023, 08:15 last edited by
thank you for suggest。i will try later。
-
7/8