QmlVlc
QmlVlc copied to clipboard
Shaking video when using an animation on top of it
I am succesfully using the QmlVlc with Qt 5.3. I can play a video just fine, however, I want to overlay some text on it. That works just fine and the text is nicely over the video. But when I do a rotationanimation on the text, the video is shaking.
On the same hardware I tried the qml library of the VlcQt project. It is not as nicely programmed as your library(crashed on stop of the video), but the one thing that I could do was animate text over the video, and also the video itself. So I guess it should be possible to get it working. The Qml file I am using is:
import QtQuick 2.0
import QmlVlc 0.1
Rectangle {
width: 1920
height: 1080
color: "black"
VlcPlayer {
id: vlcPlayer;
mrl: "file:///media/video/test.ts";
}
VlcVideoSurface {
id: videoOutput
anchors.fill: parent
source: vlcPlayer
MouseArea {
anchors.fill: parent
onClicked: {
vlcPlayer.togglePause()
}
}
// RotationAnimation on rotation {
// loops: Animation.Infinite
// from: 0
// to: 3
// }
}
Text {
anchors.centerIn: parent
color: "#ffffff"
style: Text.Outline
styleColor: "#606060"
font.pixelSize: 28
text: "I am the overlay!"
RotationAnimation on rotation {
loops: Animation.Infinite
from: -90
to: 90
}
NumberAnimation on opacity {
loops: Animation.Infinite
from: 0.5
to: 1
}
}
}
Thanks for report, I'll look. Btw, did you try to do the same with VlcMmPlayer + VideoOutput ?
I just tried using QtMultimedia and that works like a charm! No shaking and it works great. For me it is a solution, so feel free to close this issue if you like.
That just proves it's a bug in VlcVideoSurface :) But of course you free to use VlcMmPlayer, it's just adds QtMultimedia dependancy, which I tried to avoid by VlcVideoSurface.
What OS and hardware do you have?
This is a Intel Atom board "CedarView", and I am using buildroot to build my OS. I am now using the latest version with Qt 5.3. I use the cedarview driver, and it must have kernel 3.2.55, mesa version 7.11.2 and Xorg server 7.11.4. I also use enlightenment as window manager and enable the composite module.
Ouch... it will be hard to find such hardware for tests...
on Intel i3-3225 (with integrated video HD 4000) + Windows 7 / Ubuntu 14 your code works without any problem...