QMediaplayer 6 bad performance
-
I had fun building a player with QT all versions up to 5 and these players work great in every operating system and play all types of videos.
From version 6 to the current one this is not the case.
At first the QMediaplayer 5 does not work on Linux or Windows. Then it started working on Linux, although it had problems with every update. For better or worse it works on Linux and plays all types of videos. Recently you see some videos on Windows, but others play badly and stutter. They are videos that other players on the same computer play well and with low CPU usage (minus 1% with the version of my player based on Qt 5).
I've been wondering for months why Media player 5 works so well and Media player 6 doesn't. I also tried changing the backend. But nothing!
I use a translator, English is not my language, sorry. -
I meant to write "At first the QMediaplayer 6..."!
-
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 ? -
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. -
Which exact version of Qt are you testing ?
-
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! -
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. -
Can you check wether you have the same issue with QtQuick ?
-
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?