Playing 4K video with QML

habersaa alexandre.habersaat at gmail.com
Tue Apr 28 16:18:54 UTC 2020


Hi !

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
there!)

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 ?

Thank you very much and best regards !
Alex




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list