QtMultimedia using QML Video play is not working
-
Hello,
I am trying to play a video on Raspberry pi-3 and Made cross compile setup on Linux host machine and the problem is video play is not working on Raspberry pi but the same code will work on Linux machine.
Also i have tried the Qt widget example for video play, it is working fine.
and the qml code is hereimport QtQuick 2.12
import QtQuick.Window 2.12
import QtMultimedia 5.12
import Directory 1.0Window {
visible: true
width: 640
height: 480
color: "#000000"
title: qsTr("Hello World")Rectangle { id: rectangle width: 400 height: 246 color: "#00000000" border.width: 7 border.color: "#8a8b91" MediaPlayer { id: player source: "./foggy_road_timelapse_256.webm" autoPlay: true } VideoOutput { id: output anchors.fill: parent autoOrientation: true source: player } }
}
For this only blank screen is coming in Raspberry, Kindly suggest where i am doing wrong
-
Please any one assist me for the above issue ....
-
Hi,
Did you deploy that video file on your device in the save folder as your application ?
-
@macfanpl said in QtMultimedia using QML Video play is not working:
Was it meant to substitute your lack of knowledge?
Please don't get personal and read https://forum.qt.io/topic/113070/qt-code-of-conduct
-
@macfanpl said in QtMultimedia using QML Video play is not working:
VideoOutput { (...) anchors.fill: parent (...) }
It clearly says that yes, he deployed to the same folder as app. So I dont understand your question. Was it meant to substitute your lack of knowledge?
First thing: please stay polite.
As for the question I asked to @Kallappa-M-B, no it does not say that. Especially in the part you are quoting.
Code does not ensure that the file is available anywhere.
In the case of @Kallappa-M-B, the video path is
"./foggy_road_timelapse_256.webm"
which means that it is relative to the executable path. @Kallappa-M-B is cross-compiling his application. At no point does he mention that he also copied the file over to his Raspberry Pi-3 in the same folder where his application resides on the device. -
Does it play correctly if you do that using GStreamer directly ?
-
The idea is that you try playing your video using the GStreamer command line tool as GStreamer is used as backend on Linux for multimedia related stuff.