I'm trying to play a 4K video (mov and mp4) in a QtQuick2/QML application,
on Windows 10 with on MSVC 2019 (64 bits) and I'm looking for some help !
I have built GStreamer from the "gst-build" repo with meson, including the
Qt plugin (plugins-good/ext/qt).
Then I could build the QML Player example from
"gst-examples\playback\player\qt" and run it successfully. (~15 hours to get
The player works well when playing normal videos. However, when I play a 4K
video on a 4K screen, the player starts lagging after a few seconds, and I
get debug messages about dropped buffers or gst_base_sink_is_too_late().
When looking at the performance, the player uses ~80% of CPU and 0% of GPU.
For the same video file with the Windows 10 "Movies & TV" app, it uses 2%
CPU and 26% GPU and plays without any lag.
1) What performance should I expect from GStreamer? Should get much more
hardware acceleration (% GPU)?
I thought that the QML sink might be slower, but when I try to play the
video with this command:
.\gst-launch-1.0.exe filesrc location=C:/C0108.MP4 ! decodebin name=decoder
decoder. ! queue ! videoconvert ! autovideosink
It is also lagging and dropping frames in a similar way.
However, when I use the downloaded windows binaries from the official
website and run the same command, it works much better, with only 40% CPU
and 25% GPU, and it doesn't drop frames !
2) What could be different between the official Wdinwos binaries and my
binaries? How are they compiled?
I first had a "debugoptimized" compilation, but then I switched to "release"
and recompiled everything, but unfortunately it made no difference.
I'm new to GStreamer and I don't really get the differences between all the
possible ways to create pipelines.
3) What typical pipeline should I setup to display 4K .mov and .mp4 videos
on Windows in order to achieve the best results?
As the video seems able to play well for a few seconds, I'm wondering
whether some cache or buffers are too small and start to overflow.
4) Is there any way to check that or to set bigger buffers ?
Regarding 2), I have run the same command ".\gst-launch-1.0.exe -v playbin
uri=file:///C:/Users/myuser/Desktop/4K.MOV" in both GStreamer downloaded
from the website (1.16.2) and the one compiled from the master head of
"gst-build", in release.
Could anyone please help me to understand what could cause my compiled
version to hang/lag from the logs below ? Is it the "master" code that is
broken, or rather some differences in the compilation (compilation flags,
missing plugins, etc)?
Thanks a lot!