QMediaPlayer playing very slow or low frame rate.
Solved
Mobile and Embedded
-
Qt Version = Qt 5.15
Development = Linux OS on SOC.VideoPlayerForm::VideoPlayerForm(QWidget *parent) : QDialog(parent) , ui(new Ui::VideoPlayerForm) { ui->setupUi(this); ui->videoPlayerWidget->setAspectRatioMode(Qt::IgnoreAspectRatio); qDebug() << "playing video"; player = new QMediaPlayer(this); player->setVideoOutput(ui->videoPlayerWidget); //player->setMedia(QUrl("gst-pipeline: gst-launch-1.0 playbin uri=file:/home/root/video.mkv")); player->setMedia(QUrl::fromLocalFile("/home/root/video.mkv")); player->play(); }
When using " player->setMedia(QUrl::fromLocalFile("/home/root/video.mkv"));" its running very slow.
And when I use "player->setMedia(QUrl("gst-pipeline: gst-launch-1.0 playbin uri=file:/home/root/video.mkv"));"
video plays fine but its open in another window rather than the video widget.Please help!!
-