I can't see any stuttering when using the following code. Even though I'm not using python it shouldn't make any difference. If you want to get better answers you need to provide code in order to understand what you are doing.
import QtQuick
import QtMultimedia
Window {
id: root
width: 640
height: 480
visible: true
title: qsTr("Hello Shader")
Item {
anchors.fill: parent
layer.enabled: true
layer.effect: ShaderEffect {
fragmentShader: "gray.frag.qsb"
}
Grid {
rows: 2; columns: 2
Repeater {
id: repeater
model: ["qrc:/video0.mp4", "qrc:/video1.mp4", "qrc:/video2.mp4", "qrc:/video3.mp4"]
Video {
id: video
width: 320; height: 240
source: modelData
loops: MediaPlayer.Infinite
}
}
}
}
Component.onCompleted: {
for (let i = 0; i < repeater.count; ++i)
repeater.itemAt(i).play()
}
}
gray.frag
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
layout(location = 0) out vec4 fragColor;
layout(std140, binding = 0) uniform buf {
mat4 qt_Matrix;
float qt_Opacity;
};
layout(binding = 1) uniform sampler2D source;
void main() {
vec4 p = texture(source, qt_TexCoord0);
float g = dot(p.xyz, vec3(0.344, 0.5, 0.156));
fragColor = vec4(g, g, g, p.a) * qt_Opacity;
}
As reference without the ShaderEffect
applied.

With ShaderEffect
applied. The "stuttering" in the gif originates from me being to lazy creating a perfected looped video. So it is just starting from the beginning again hence the quick stutter.
