Warning: "A lot of buffers are being dropped." for mp4 720p video on mx6 hardware (Yocto)
-
I am trying to render a mp4 720p video on mx6 hardware (Yocto) using Qtmultimeadia. I am getting a Warning: "A lot of buffers are being dropped." So video is getting struck.
I am using qt 5.9 and Qtmultimedia 5.0.
When play video on cmd using "gst-launch-1.0 filesrc location=<path_to_video.mp4> ! decodebin ! videoconvert ! videoscale add-borders=false ! video/x-raw,width=1280,height=720 ! kmssink connector-id=33 sync=false can-scale=false force-modesetting=false" vidoe is playing properly. Can you please suggest me a solution? -
Hi and welcome to devnet,
If you can update your Qt version to something more recent, you could make use of a custom GStreamer pipeline so that it might work better.
-
Hi Sgaist,
Thanks for your reply. I am bit new to QML. I have gone though the coustom gst pipeline, but could not get a clear picture.
Below is my code. can you please suggest me how can i use the coustom gst pipeline if I updae Qt version.
main.cpp
#include <QtQuick>
int main(int argc, char *argv[])
{
QGuiApplication app(argc,argv);
QQuickView view;
view.setSource(QUrl("qrc:/main.qml"));
view.show();
return app.exec();
}main.qml
import QtQuick 2.7
import QtMultimedia 5.0
Rectangle {
visible: true
width: 1920
height: 720
color: "blue"MediaPlayer { id: mediaplayer autoPlay: true source: BigBuckBunny.mp4" }
VideoOutput {
anchors.fill: parent
source: mediaplayer
}
}Can you please suggest me how can use coustom gst pipeline for cmd "gst-launch-1.0 filesrc location=<path_to_video.mp4> ! decodebin ! videoconvert ! videoscale add-borders=false ! video/x-raw,width=1280,height=720 ! kmssink connector-id=33 sync=false can-scale=false force-modesetting=false" .
Regards,
Asgo -
Good question, I thought you were using widgets and there you can do it with QMediaPlayer.
-
I see following information in QMl. But my question is how to use the cmd "gst-launch-1.0 filesrc location=<path_to_video.mp4> ! decodebin ! videoconvert ! videoscale add-borders=false ! video/x-raw,width=1280,height=720 ! kmssink connector-id=33 sync=false can-scale=false force-modesetting=false"
And also it is not mentioned where to provide the actual path of media file. So I am confused.
Can you please help me with this?
Regards,
Asgo -
The arguments after
gst-pipeline:
are the ones you feed togst-launch
. -
Below one is correct?
MediaPlayer{
id: mediaplayer
source: " "gst-pipeline: filesrc location=<path_to_video.mp4> ! decodebin ! videoconvert ! videoscale add-borders=false ! video/x-raw,width=1280,height=720 ! kmssink connector-id=33 sync=false can-scale=false force-modesetting=false""
} -
You are missing the final sink so that it output to your application.