Qt 6.11 is out! See what's new in the release
blog
How to display Gstreamer video using vaapisink inside QVideoWidget by QMediaPlayer?
-
I'm using Qt5.12 and gcc+-8 on Debian 11, desktop is Weston compositor. Gstreamer version is 1.0. I want to display a video by Gstreamer with vaapisink renderer on a QVideoWidget by QMediaPlayer on my application.
There is an example on this site QMediaPlayer example
player = new QMediaPlayer; videoWidget = new QVideoWidget; videoWidget->show(); player->setVideoOutput(videoWidget); player->setMedia(QUrl("gst-pipeline: videotestsrc ! xvimagesink name=\"qtvideosink\"")); player->play();I've tried this and video can run ok inside QVideoWidget. But when I tried with my video from Jellyfish and with vaapisink filter, video is displayed outside the QVideoWidget. The QVideoWidget only shows black. My code is like:
player = new QMediaPlayer; videoWidget = new QVideoWidget; videoWidget->show(); player->setVideoOutput(videoWidget); player->setMedia(QUrl("gst-pipeline: filesrc location=jellyfish-10-mbps-hd-h264.mkv ! matroskademux ! h264parse ! vaapih264dec ! vaapisink name=\"qtvideosink\")); player->play();Do you know this problem and how to fix this?
-
Hi and welcome to devnet,
Probably related to QTBUG-91677.
-
Hi and welcome to devnet,
Probably related to QTBUG-91677.
-
The common point between the two is the use of the vaapisink hence my suggestion.