Hello all,
We are using QT 5.4, and trying to load an video file.
Below is the qml code which is put under QRC
Rectangle {
width: 480
height: 270
color:"white"
MediaPlayer {
id: player
// source: "file:video.avi"
source: "file:///P2952/Sprint21/Animation_Demos/video.avi"
autoPlay: true
autoLoad: true
}
VideoOutput {
source: player
anchors.fill: parent
}
Component.onCompleted: {
player.play();
}
}
Rectangle {
width: 480
height: 270
color:"white"
MediaPlayer {
id: player
// source: "file:video.avi"
source: "file:///P2952/Sprint21/Animation_Demos/video.avi"
autoPlay: true
autoLoad: true
}
VideoOutput {
source: player
anchors.fill: parent
}
Component.onCompleted: {
player.play();
}
}
To copy to clipboard, switch view to plain text mode
If we put video file inside QRC resource, Memory allocation errors are coming.
Can anyone help how to access external video files ( placed out of QRC files) and display using qt.
Thanks in advance
Bookmarks