I am trying to get alpha blending effect in QML with video in RGBA.
Now the problem is that the video element provided by QtMultimedia actually opens the overlay window in the QtQuick frame, so I donโt think it is possible to alpha mix other QML elements with the Video element (I hope I am wrong, but I canโt find decision).
So another way is to render the video in a class that inherits from QQuickItem in the updatePaintNode method.
Has anyone seen anything like this before? Is it possible if the guys from QtMultimedia can not achieve this?
Can I change the background of a MediaPlayer element, maybe be transparent or just a color in QML?
So far I have been thinking about QAbstractVideoSurface and QVideoFrame, but I have no idea how to display it on QSG or even how GeometryNode is looking for video.
A better solution would be to get alpha blending with other QML elements, for example:
Rectangle { width: 1024 height: 768 color: "yellow" focus: true Video { id: video anchors.fill: parent source: "alpha-video.mov" autoPlay: true } }
Thanks in advance!
qt alphablending qml qtquick2
Mac
source share